From 6c78efbcb704716fd5ced4c394e662807b56f544 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 11:17:47 +0100 Subject: [PATCH 01/41] protobuf-demo: Add package --- packages/protobuf-demo/.eslintignore | 1 + packages/protobuf-demo/.gitignore | 4 ++ packages/protobuf-demo/README.md | 10 +++++ packages/protobuf-demo/jasmine-testrunner.js | 26 +++++++++++ packages/protobuf-demo/karma.conf.js | 47 ++++++++++++++++++++ packages/protobuf-demo/nonces/README.txt | 1 + packages/protobuf-demo/package.json | 36 +++++++++++++++ packages/protobuf-demo/tsconfig.json | 12 +++++ packages/protobuf-demo/typedoc.js | 14 ++++++ packages/protobuf-demo/webpack.web.config.js | 19 ++++++++ 10 files changed, 170 insertions(+) create mode 120000 packages/protobuf-demo/.eslintignore create mode 100644 packages/protobuf-demo/.gitignore create mode 100644 packages/protobuf-demo/README.md create mode 100755 packages/protobuf-demo/jasmine-testrunner.js create mode 100644 packages/protobuf-demo/karma.conf.js create mode 100644 packages/protobuf-demo/nonces/README.txt create mode 100644 packages/protobuf-demo/package.json create mode 100644 packages/protobuf-demo/tsconfig.json create mode 100644 packages/protobuf-demo/typedoc.js create mode 100644 packages/protobuf-demo/webpack.web.config.js diff --git a/packages/protobuf-demo/.eslintignore b/packages/protobuf-demo/.eslintignore new file mode 120000 index 00000000..86039baf --- /dev/null +++ b/packages/protobuf-demo/.eslintignore @@ -0,0 +1 @@ +../../.eslintignore \ No newline at end of file diff --git a/packages/protobuf-demo/.gitignore b/packages/protobuf-demo/.gitignore new file mode 100644 index 00000000..1f68d6fa --- /dev/null +++ b/packages/protobuf-demo/.gitignore @@ -0,0 +1,4 @@ +build/ +dist/ +docs/ +proto/ diff --git a/packages/protobuf-demo/README.md b/packages/protobuf-demo/README.md new file mode 100644 index 00000000..dd72f354 --- /dev/null +++ b/packages/protobuf-demo/README.md @@ -0,0 +1,10 @@ +# @cosmjs/protobuf-demo + +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/protobuf-demo/jasmine-testrunner.js b/packages/protobuf-demo/jasmine-testrunner.js new file mode 100755 index 00000000..9fada59b --- /dev/null +++ b/packages/protobuf-demo/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/protobuf-demo/karma.conf.js b/packages/protobuf-demo/karma.conf.js new file mode 100644 index 00000000..006da5fe --- /dev/null +++ b/packages/protobuf-demo/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/protobuf-demo/nonces/README.txt b/packages/protobuf-demo/nonces/README.txt new file mode 100644 index 00000000..092fe732 --- /dev/null +++ b/packages/protobuf-demo/nonces/README.txt @@ -0,0 +1 @@ +Directory used to trigger lerna package updates for all packages diff --git a/packages/protobuf-demo/package.json b/packages/protobuf-demo/package.json new file mode 100644 index 00000000..39ad8a0d --- /dev/null +++ b/packages/protobuf-demo/package.json @@ -0,0 +1,36 @@ +{ + "name": "@cosmjs/protobuf-demo", + "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/sdk38" + }, + "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 && 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" + } +} diff --git a/packages/protobuf-demo/tsconfig.json b/packages/protobuf-demo/tsconfig.json new file mode 100644 index 00000000..167e8c02 --- /dev/null +++ b/packages/protobuf-demo/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "baseUrl": ".", + "outDir": "build", + "declarationDir": "build/types", + "rootDir": "src" + }, + "include": [ + "src/**/*" + ] +} diff --git a/packages/protobuf-demo/typedoc.js b/packages/protobuf-demo/typedoc.js new file mode 100644 index 00000000..e2387c7d --- /dev/null +++ b/packages/protobuf-demo/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/protobuf-demo/webpack.web.config.js b/packages/protobuf-demo/webpack.web.config.js new file mode 100644 index 00000000..7373cace --- /dev/null +++ b/packages/protobuf-demo/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"])], + }, +]; From b3645db66c29dd3b2c0b3a887e032009a0f09c03 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 11:19:43 +0100 Subject: [PATCH 02/41] protobuf-demo: Add protobufjs dependency --- packages/protobuf-demo/package.json | 3 + yarn.lock | 87 +++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/packages/protobuf-demo/package.json b/packages/protobuf-demo/package.json index 39ad8a0d..b339f175 100644 --- a/packages/protobuf-demo/package.json +++ b/packages/protobuf-demo/package.json @@ -32,5 +32,8 @@ "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" + }, + "devDependencies": { + "protobufjs": "^6.9.0" } } diff --git a/yarn.lock b/yarn.lock index 901a2270..a79e7f54 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" From 7a2e264155376e059ac562ccf1eb516f730e6801 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 11:22:57 +0100 Subject: [PATCH 03/41] protobuf-demo: Add get-proto script --- packages/protobuf-demo/package.json | 3 ++- packages/protobuf-demo/scripts/get-proto.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 packages/protobuf-demo/scripts/get-proto.sh diff --git a/packages/protobuf-demo/package.json b/packages/protobuf-demo/package.json index b339f175..e5d33de2 100644 --- a/packages/protobuf-demo/package.json +++ b/packages/protobuf-demo/package.json @@ -31,7 +31,8 @@ "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" + "pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js", + "get-proto": "./scripts/get-proto.sh" }, "devDependencies": { "protobufjs": "^6.9.0" diff --git a/packages/protobuf-demo/scripts/get-proto.sh b/packages/protobuf-demo/scripts/get-proto.sh new file mode 100755 index 00000000..87ad5e63 --- /dev/null +++ b/packages/protobuf-demo/scripts/get-proto.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -o errexit -o nounset -o pipefail +command -v shellcheck > /dev/null && shellcheck "$0" + +PROTO_DIR="./proto" +COSMOS_DIR="$PROTO_DIR/cosmos" + +mkdir -p $COSMOS_DIR + +svn export "https://github.com/cosmos/cosmos-sdk/trunk" "$COSMOS_DIR/cosmos-sdk" +# svn export "https://github.com/cosmos/cosmos-sdk/tags/v0.38.4" "$COSMOS_DIR/cosmos-sdk" From b9bdf5581ee8ad4e226bf81e2969839e2eafd9f6 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 11:26:45 +0100 Subject: [PATCH 04/41] protobuf-demo: Add scripts to pack proto definitions --- packages/protobuf-demo/package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/protobuf-demo/package.json b/packages/protobuf-demo/package.json index e5d33de2..cdb1a478 100644 --- a/packages/protobuf-demo/package.json +++ b/packages/protobuf-demo/package.json @@ -32,7 +32,10 @@ "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": "./scripts/get-proto.sh" + "get-proto": "./scripts/get-proto.sh", + "prepack-proto": "mkdir -p src/generated", + "pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.js ./proto/**/*.proto", + "define-proto": "pbts src/generated/codecimpl.js -o src/generated/codecimpl.d.ts" }, "devDependencies": { "protobufjs": "^6.9.0" From 655965a34dd7262702740500fddbb4200518cfa4 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 11:26:56 +0100 Subject: [PATCH 05/41] protobuf-demo: Add protobuf generated code --- .../src/generated/codecimpl.d.ts | 22678 ++++++ .../protobuf-demo/src/generated/codecimpl.js | 58070 ++++++++++++++++ 2 files changed, 80748 insertions(+) create mode 100644 packages/protobuf-demo/src/generated/codecimpl.d.ts create mode 100644 packages/protobuf-demo/src/generated/codecimpl.js diff --git a/packages/protobuf-demo/src/generated/codecimpl.d.ts b/packages/protobuf-demo/src/generated/codecimpl.d.ts new file mode 100644 index 00000000..7cbc3bb3 --- /dev/null +++ b/packages/protobuf-demo/src/generated/codecimpl.d.ts @@ -0,0 +1,22678 @@ +import * as $protobuf from "protobufjs"; +/** Namespace cosmos_sdk. */ +export namespace cosmos_sdk { + + /** Namespace codec. */ + namespace codec { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a Dog. */ + interface IDog { + + /** Dog size */ + size?: (string|null); + + /** Dog name */ + name?: (string|null); + } + + /** Represents a Dog. */ + class Dog implements IDog { + + /** + * Constructs a new Dog. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IDog); + + /** Dog size. */ + public size: string; + + /** Dog name. */ + public name: string; + + /** + * Creates a new Dog instance using the specified properties. + * @param [properties] Properties to set + * @returns Dog instance + */ + public static create(properties?: cosmos_sdk.codec.v1.IDog): cosmos_sdk.codec.v1.Dog; + + /** + * Encodes the specified Dog message. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. + * @param message Dog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.IDog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dog message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. + * @param message Dog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.codec.v1.IDog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.Dog; + + /** + * Decodes a Dog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.Dog; + + /** + * Verifies a Dog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Dog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dog + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.Dog; + + /** + * Creates a plain object from a Dog message. Also converts values to other types if specified. + * @param message Dog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.codec.v1.Dog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Cat. */ + interface ICat { + + /** Cat moniker */ + moniker?: (string|null); + + /** Cat lives */ + lives?: (number|null); + } + + /** Represents a Cat. */ + class Cat implements ICat { + + /** + * Constructs a new Cat. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.ICat); + + /** Cat moniker. */ + public moniker: string; + + /** Cat lives. */ + public lives: number; + + /** + * Creates a new Cat instance using the specified properties. + * @param [properties] Properties to set + * @returns Cat instance + */ + public static create(properties?: cosmos_sdk.codec.v1.ICat): cosmos_sdk.codec.v1.Cat; + + /** + * Encodes the specified Cat message. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. + * @param message Cat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.ICat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cat message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. + * @param message Cat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.codec.v1.ICat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Cat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.Cat; + + /** + * Decodes a Cat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.Cat; + + /** + * Verifies a Cat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Cat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cat + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.Cat; + + /** + * Creates a plain object from a Cat message. Also converts values to other types if specified. + * @param message Cat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.codec.v1.Cat, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Cat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HasAnimal. */ + interface IHasAnimal { + + /** HasAnimal animal */ + animal?: (google.protobuf.IAny|null); + + /** HasAnimal x */ + x?: (number|Long|null); + } + + /** Represents a HasAnimal. */ + class HasAnimal implements IHasAnimal { + + /** + * Constructs a new HasAnimal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IHasAnimal); + + /** HasAnimal animal. */ + public animal?: (google.protobuf.IAny|null); + + /** HasAnimal x. */ + public x: (number|Long); + + /** + * Creates a new HasAnimal instance using the specified properties. + * @param [properties] Properties to set + * @returns HasAnimal instance + */ + public static create(properties?: cosmos_sdk.codec.v1.IHasAnimal): cosmos_sdk.codec.v1.HasAnimal; + + /** + * Encodes the specified HasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. + * @param message HasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.IHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. + * @param message HasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.codec.v1.IHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HasAnimal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.HasAnimal; + + /** + * Decodes a HasAnimal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.HasAnimal; + + /** + * Verifies a HasAnimal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HasAnimal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HasAnimal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasAnimal; + + /** + * Creates a plain object from a HasAnimal message. Also converts values to other types if specified. + * @param message HasAnimal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.codec.v1.HasAnimal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HasAnimal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HasHasAnimal. */ + interface IHasHasAnimal { + + /** HasHasAnimal hasAnimal */ + hasAnimal?: (google.protobuf.IAny|null); + } + + /** Represents a HasHasAnimal. */ + class HasHasAnimal implements IHasHasAnimal { + + /** + * Constructs a new HasHasAnimal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IHasHasAnimal); + + /** HasHasAnimal hasAnimal. */ + public hasAnimal?: (google.protobuf.IAny|null); + + /** + * Creates a new HasHasAnimal instance using the specified properties. + * @param [properties] Properties to set + * @returns HasHasAnimal instance + */ + public static create(properties?: cosmos_sdk.codec.v1.IHasHasAnimal): cosmos_sdk.codec.v1.HasHasAnimal; + + /** + * Encodes the specified HasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. + * @param message HasHasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.IHasHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. + * @param message HasHasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.codec.v1.IHasHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HasHasAnimal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.HasHasAnimal; + + /** + * Decodes a HasHasAnimal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.HasHasAnimal; + + /** + * Verifies a HasHasAnimal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HasHasAnimal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HasHasAnimal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasHasAnimal; + + /** + * Creates a plain object from a HasHasAnimal message. Also converts values to other types if specified. + * @param message HasHasAnimal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.codec.v1.HasHasAnimal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HasHasAnimal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HasHasHasAnimal. */ + interface IHasHasHasAnimal { + + /** HasHasHasAnimal hasHasAnimal */ + hasHasAnimal?: (google.protobuf.IAny|null); + } + + /** Represents a HasHasHasAnimal. */ + class HasHasHasAnimal implements IHasHasHasAnimal { + + /** + * Constructs a new HasHasHasAnimal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IHasHasHasAnimal); + + /** HasHasHasAnimal hasHasAnimal. */ + public hasHasAnimal?: (google.protobuf.IAny|null); + + /** + * Creates a new HasHasHasAnimal instance using the specified properties. + * @param [properties] Properties to set + * @returns HasHasHasAnimal instance + */ + public static create(properties?: cosmos_sdk.codec.v1.IHasHasHasAnimal): cosmos_sdk.codec.v1.HasHasHasAnimal; + + /** + * Encodes the specified HasHasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. + * @param message HasHasHasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.IHasHasHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HasHasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. + * @param message HasHasHasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.codec.v1.IHasHasHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HasHasHasAnimal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HasHasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.HasHasHasAnimal; + + /** + * Decodes a HasHasHasAnimal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HasHasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.HasHasHasAnimal; + + /** + * Verifies a HasHasHasAnimal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HasHasHasAnimal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HasHasHasAnimal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasHasHasAnimal; + + /** + * Creates a plain object from a HasHasHasAnimal message. Also converts values to other types if specified. + * @param message HasHasHasAnimal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.codec.v1.HasHasHasAnimal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HasHasHasAnimal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a TestService */ + class TestService extends $protobuf.rpc.Service { + + /** + * Constructs a new TestService 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 TestService 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): TestService; + + /** + * Calls Echo. + * @param request EchoRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EchoResponse + */ + public echo(request: cosmos_sdk.codec.v1.IEchoRequest, callback: cosmos_sdk.codec.v1.TestService.EchoCallback): void; + + /** + * Calls Echo. + * @param request EchoRequest message or plain object + * @returns Promise + */ + public echo(request: cosmos_sdk.codec.v1.IEchoRequest): Promise; + + /** + * Calls SayHello. + * @param request SayHelloRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SayHelloResponse + */ + public sayHello(request: cosmos_sdk.codec.v1.ISayHelloRequest, callback: cosmos_sdk.codec.v1.TestService.SayHelloCallback): void; + + /** + * Calls SayHello. + * @param request SayHelloRequest message or plain object + * @returns Promise + */ + public sayHello(request: cosmos_sdk.codec.v1.ISayHelloRequest): Promise; + } + + namespace TestService { + + /** + * Callback as used by {@link cosmos_sdk.codec.v1.TestService#echo}. + * @param error Error, if any + * @param [response] EchoResponse + */ + type EchoCallback = (error: (Error|null), response?: cosmos_sdk.codec.v1.EchoResponse) => void; + + /** + * Callback as used by {@link cosmos_sdk.codec.v1.TestService#sayHello}. + * @param error Error, if any + * @param [response] SayHelloResponse + */ + type SayHelloCallback = (error: (Error|null), response?: cosmos_sdk.codec.v1.SayHelloResponse) => void; + } + + /** Properties of an EchoRequest. */ + interface IEchoRequest { + + /** EchoRequest message */ + message?: (string|null); + } + + /** Represents an EchoRequest. */ + class EchoRequest implements IEchoRequest { + + /** + * Constructs a new EchoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IEchoRequest); + + /** EchoRequest message. */ + public message: string; + + /** + * Creates a new EchoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EchoRequest instance + */ + public static create(properties?: cosmos_sdk.codec.v1.IEchoRequest): cosmos_sdk.codec.v1.EchoRequest; + + /** + * Encodes the specified EchoRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. + * @param message EchoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.IEchoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EchoRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. + * @param message EchoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.codec.v1.IEchoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EchoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EchoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.EchoRequest; + + /** + * Decodes an EchoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EchoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.EchoRequest; + + /** + * Verifies an EchoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EchoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EchoRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.EchoRequest; + + /** + * Creates a plain object from an EchoRequest message. Also converts values to other types if specified. + * @param message EchoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.codec.v1.EchoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EchoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EchoResponse. */ + interface IEchoResponse { + + /** EchoResponse message */ + message?: (string|null); + } + + /** Represents an EchoResponse. */ + class EchoResponse implements IEchoResponse { + + /** + * Constructs a new EchoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IEchoResponse); + + /** EchoResponse message. */ + public message: string; + + /** + * Creates a new EchoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EchoResponse instance + */ + public static create(properties?: cosmos_sdk.codec.v1.IEchoResponse): cosmos_sdk.codec.v1.EchoResponse; + + /** + * Encodes the specified EchoResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. + * @param message EchoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.IEchoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EchoResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. + * @param message EchoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.codec.v1.IEchoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EchoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EchoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.EchoResponse; + + /** + * Decodes an EchoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EchoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.EchoResponse; + + /** + * Verifies an EchoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EchoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EchoResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.EchoResponse; + + /** + * Creates a plain object from an EchoResponse message. Also converts values to other types if specified. + * @param message EchoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.codec.v1.EchoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EchoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SayHelloRequest. */ + interface ISayHelloRequest { + + /** SayHelloRequest name */ + name?: (string|null); + } + + /** Represents a SayHelloRequest. */ + class SayHelloRequest implements ISayHelloRequest { + + /** + * Constructs a new SayHelloRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.ISayHelloRequest); + + /** SayHelloRequest name. */ + public name: string; + + /** + * Creates a new SayHelloRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SayHelloRequest instance + */ + public static create(properties?: cosmos_sdk.codec.v1.ISayHelloRequest): cosmos_sdk.codec.v1.SayHelloRequest; + + /** + * Encodes the specified SayHelloRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. + * @param message SayHelloRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.ISayHelloRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SayHelloRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. + * @param message SayHelloRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.codec.v1.ISayHelloRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SayHelloRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SayHelloRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.SayHelloRequest; + + /** + * Decodes a SayHelloRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SayHelloRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.SayHelloRequest; + + /** + * Verifies a SayHelloRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SayHelloRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SayHelloRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.SayHelloRequest; + + /** + * Creates a plain object from a SayHelloRequest message. Also converts values to other types if specified. + * @param message SayHelloRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.codec.v1.SayHelloRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SayHelloRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SayHelloResponse. */ + interface ISayHelloResponse { + + /** SayHelloResponse greeting */ + greeting?: (string|null); + } + + /** Represents a SayHelloResponse. */ + class SayHelloResponse implements ISayHelloResponse { + + /** + * Constructs a new SayHelloResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.ISayHelloResponse); + + /** SayHelloResponse greeting. */ + public greeting: string; + + /** + * Creates a new SayHelloResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SayHelloResponse instance + */ + public static create(properties?: cosmos_sdk.codec.v1.ISayHelloResponse): cosmos_sdk.codec.v1.SayHelloResponse; + + /** + * Encodes the specified SayHelloResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. + * @param message SayHelloResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.ISayHelloResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SayHelloResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. + * @param message SayHelloResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.codec.v1.ISayHelloResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SayHelloResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SayHelloResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.SayHelloResponse; + + /** + * Decodes a SayHelloResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SayHelloResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.SayHelloResponse; + + /** + * Verifies a SayHelloResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SayHelloResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SayHelloResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.SayHelloResponse; + + /** + * Creates a plain object from a SayHelloResponse message. Also converts values to other types if specified. + * @param message SayHelloResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.codec.v1.SayHelloResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SayHelloResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.crypto.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. + * @param message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.crypto.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.crypto.v1.PublicKey; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.crypto.v1.PublicKey; + + /** + * Verifies a PublicKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublicKey + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.PublicKey; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @param message PublicKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.crypto.v1.PublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublicKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PubKeyMultisigThreshold. */ + interface IPubKeyMultisigThreshold { + + /** PubKeyMultisigThreshold threshold */ + threshold?: (number|null); + + /** PubKeyMultisigThreshold pubkeys */ + pubkeys?: (cosmos_sdk.crypto.v1.IPublicKey[]|null); + } + + /** Represents a PubKeyMultisigThreshold. */ + class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + + /** + * Constructs a new PubKeyMultisigThreshold. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + + /** PubKeyMultisigThreshold threshold. */ + public threshold: number; + + /** PubKeyMultisigThreshold pubkeys. */ + public pubkeys: 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 message PubKeyMultisigThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubKeyMultisigThreshold message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. + * @param message PubKeyMultisigThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + + /** + * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + + /** + * Verifies a PubKeyMultisigThreshold message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubKeyMultisigThreshold message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubKeyMultisigThreshold + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + + /** + * Creates a plain object from a PubKeyMultisigThreshold message. Also converts values to other types if specified. + * @param message PubKeyMultisigThreshold + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.crypto.v1.PubKeyMultisigThreshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubKeyMultisigThreshold to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MultiSignature. */ + interface IMultiSignature { + + /** MultiSignature sigs */ + sigs?: (Uint8Array[]|null); + } + + /** Represents a MultiSignature. */ + class MultiSignature implements IMultiSignature { + + /** + * Constructs a new MultiSignature. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.crypto.v1.IMultiSignature); + + /** MultiSignature sigs. */ + public sigs: 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 message MultiSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.crypto.v1.IMultiSignature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MultiSignature message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. + * @param message MultiSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.crypto.v1.IMultiSignature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MultiSignature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.crypto.v1.MultiSignature; + + /** + * Decodes a MultiSignature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.crypto.v1.MultiSignature; + + /** + * Verifies a MultiSignature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MultiSignature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MultiSignature + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.MultiSignature; + + /** + * Creates a plain object from a MultiSignature message. Also converts values to other types if specified. + * @param message MultiSignature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.crypto.v1.MultiSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MultiSignature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message CompactBitArray message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.crypto.v1.ICompactBitArray, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CompactBitArray message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. + * @param message CompactBitArray message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.crypto.v1.ICompactBitArray, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.crypto.v1.CompactBitArray; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.crypto.v1.CompactBitArray; + + /** + * Verifies a CompactBitArray message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompactBitArray message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompactBitArray + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.CompactBitArray; + + /** + * Creates a plain object from a CompactBitArray message. Also converts values to other types if specified. + * @param message CompactBitArray + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.crypto.v1.CompactBitArray, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompactBitArray to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Tx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.ITx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tx message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. + * @param message Tx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.tx.v1.ITx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.Tx; + + /** + * Decodes a Tx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.Tx; + + /** + * Verifies a Tx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tx + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.Tx; + + /** + * Creates a plain object from a Tx message. Also converts values to other types if specified. + * @param message Tx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.tx.v1.Tx, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message SignDoc message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.ISignDoc, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SignDoc message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. + * @param message SignDoc message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.tx.v1.ISignDoc, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SignDoc message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.SignDoc; + + /** + * Decodes a SignDoc message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.SignDoc; + + /** + * Verifies a SignDoc message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SignDoc message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SignDoc + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.SignDoc; + + /** + * Creates a plain object from a SignDoc message. Also converts values to other types if specified. + * @param message SignDoc + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.tx.v1.SignDoc, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SignDoc to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message TxBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.ITxBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TxBody message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. + * @param message TxBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.tx.v1.ITxBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TxBody message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.TxBody; + + /** + * Decodes a TxBody message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.TxBody; + + /** + * Verifies a TxBody message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TxBody message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TxBody + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.TxBody; + + /** + * Creates a plain object from a TxBody message. Also converts values to other types if specified. + * @param message TxBody + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.tx.v1.TxBody, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TxBody to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message AuthInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.IAuthInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuthInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. + * @param message AuthInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.tx.v1.IAuthInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuthInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.AuthInfo; + + /** + * Decodes an AuthInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.AuthInfo; + + /** + * Verifies an AuthInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuthInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.AuthInfo; + + /** + * Creates a plain object from an AuthInfo message. Also converts values to other types if specified. + * @param message AuthInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.tx.v1.AuthInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuthInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message SignerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.ISignerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SignerInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. + * @param message SignerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.tx.v1.ISignerInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SignerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.SignerInfo; + + /** + * Decodes a SignerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.SignerInfo; + + /** + * Verifies a SignerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SignerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SignerInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.SignerInfo; + + /** + * Creates a plain object from a SignerInfo message. Also converts values to other types if specified. + * @param message SignerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.tx.v1.SignerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SignerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ModeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.IModeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ModeInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. + * @param message ModeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.tx.v1.IModeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.ModeInfo; + + /** + * Decodes a ModeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.ModeInfo; + + /** + * Verifies a ModeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ModeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModeInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo; + + /** + * Creates a plain object from a ModeInfo message. Also converts values to other types if specified. + * @param message ModeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.tx.v1.ModeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ModeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ModeInfo { + + /** Properties of a Single. */ + interface ISingle { + + /** Single mode */ + mode?: (cosmos_sdk.tx.v1.SignMode|null); + } + + /** Represents a Single. */ + class Single implements ISingle { + + /** + * Constructs a new Single. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.tx.v1.ModeInfo.ISingle); + + /** Single mode. */ + public mode: cosmos_sdk.tx.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 message Single message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.ModeInfo.ISingle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. + * @param message Single message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.tx.v1.ModeInfo.ISingle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Single message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.ModeInfo.Single; + + /** + * Decodes a Single message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.ModeInfo.Single; + + /** + * Verifies a Single message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Single message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Single + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo.Single; + + /** + * Creates a plain object from a Single message. Also converts values to other types if specified. + * @param message Single + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.tx.v1.ModeInfo.Single, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Single to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Multi message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.ModeInfo.IMulti, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. + * @param message Multi message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.tx.v1.ModeInfo.IMulti, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Multi message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.ModeInfo.Multi; + + /** + * Decodes a Multi message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.ModeInfo.Multi; + + /** + * Verifies a Multi message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Multi message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Multi + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo.Multi; + + /** + * Creates a plain object from a Multi message. Also converts values to other types if specified. + * @param message Multi + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.tx.v1.ModeInfo.Multi, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Multi to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** SignMode enum. */ + enum SignMode { + SIGN_MODE_UNSPECIFIED = 0, + SIGN_MODE_DIRECT = 1, + SIGN_MODE_TEXTUAL = 2, + SIGN_MODE_LEGACY_AMINO_JSON = 127 + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Fee message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.IFee, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Fee message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. + * @param message Fee message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.tx.v1.IFee, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Fee message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.Fee; + + /** + * Decodes a Fee message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.Fee; + + /** + * Verifies a Fee message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Fee message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Fee + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.Fee; + + /** + * Creates a plain object from a Fee message. Also converts values to other types if specified. + * @param message Fee + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.tx.v1.Fee, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Fee to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Coin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.ICoin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. + * @param message Coin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.ICoin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.Coin; + + /** + * Decodes a Coin message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.Coin; + + /** + * Verifies a Coin message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Coin message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Coin + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.Coin; + + /** + * Creates a plain object from a Coin message. Also converts values to other types if specified. + * @param message Coin + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.Coin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Coin to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message DecCoin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IDecCoin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. + * @param message DecCoin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.IDecCoin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.DecCoin; + + /** + * Decodes a DecCoin message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.DecCoin; + + /** + * Verifies a DecCoin message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DecCoin + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.DecCoin; + + /** + * Creates a plain object from a DecCoin message. Also converts values to other types if specified. + * @param message DecCoin + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.DecCoin, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DecCoin to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an IntProto. */ + interface IIntProto { + + /** IntProto int */ + int?: (string|null); + } + + /** Represents an IntProto. */ + class IntProto implements IIntProto { + + /** + * Constructs a new IntProto. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message IntProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IIntProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. + * @param message IntProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.IIntProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.IntProto; + + /** + * Decodes an IntProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.IntProto; + + /** + * Verifies an IntProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IntProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntProto + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.IntProto; + + /** + * Creates a plain object from an IntProto message. Also converts values to other types if specified. + * @param message IntProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.IntProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IntProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DecProto. */ + interface IDecProto { + + /** DecProto dec */ + dec?: (string|null); + } + + /** Represents a DecProto. */ + class DecProto implements IDecProto { + + /** + * Constructs a new DecProto. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message DecProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IDecProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. + * @param message DecProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.IDecProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.DecProto; + + /** + * Decodes a DecProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.DecProto; + + /** + * Verifies a DecProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DecProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DecProto + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.DecProto; + + /** + * Creates a plain object from a DecProto message. Also converts values to other types if specified. + * @param message DecProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.DecProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DecProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValAddresses. */ + interface IValAddresses { + + /** ValAddresses addresses */ + addresses?: (Uint8Array[]|null); + } + + /** Represents a ValAddresses. */ + class ValAddresses implements IValAddresses { + + /** + * Constructs a new ValAddresses. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ValAddresses message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IValAddresses, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValAddresses message, length delimited. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. + * @param message ValAddresses message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.IValAddresses, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValAddresses message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.ValAddresses; + + /** + * Decodes a ValAddresses message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.ValAddresses; + + /** + * Verifies a ValAddresses message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValAddresses message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValAddresses + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.ValAddresses; + + /** + * Creates a plain object from a ValAddresses message. Also converts values to other types if specified. + * @param message ValAddresses + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.ValAddresses, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValAddresses to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message GasInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IGasInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GasInfo message, length delimited. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. + * @param message GasInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.IGasInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GasInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.GasInfo; + + /** + * Decodes a GasInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.GasInfo; + + /** + * Verifies a GasInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GasInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GasInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.GasInfo; + + /** + * Creates a plain object from a GasInfo message. Also converts values to other types if specified. + * @param message GasInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.GasInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GasInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Result message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.Result; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.Result; + + /** + * Verifies a Result message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Result + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.Result; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @param message Result + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Result to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message SimulationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.ISimulationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SimulationResponse message, length delimited. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. + * @param message SimulationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.ISimulationResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.SimulationResponse; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.SimulationResponse; + + /** + * Verifies a SimulationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SimulationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimulationResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.SimulationResponse; + + /** + * Creates a plain object from a SimulationResponse message. Also converts values to other types if specified. + * @param message SimulationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.SimulationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SimulationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message MsgData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IMsgData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. + * @param message MsgData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.IMsgData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.MsgData; + + /** + * Decodes a MsgData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.MsgData; + + /** + * Verifies a MsgData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgData + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.MsgData; + + /** + * Creates a plain object from a MsgData message. Also converts values to other types if specified. + * @param message MsgData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.MsgData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message TxData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.ITxData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TxData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. + * @param message TxData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.v1.ITxData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TxData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.TxData; + + /** + * Decodes a TxData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.TxData; + + /** + * Verifies a TxData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TxData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TxData + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.TxData; + + /** + * Creates a plain object from a TxData message. Also converts values to other types if specified. + * @param message TxData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.v1.TxData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TxData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace x. */ + namespace x { + + /** Namespace auth. */ + namespace auth { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a BaseAccount. */ + interface IBaseAccount { + + /** BaseAccount address */ + address?: (Uint8Array|null); + + /** BaseAccount pubKey */ + pubKey?: (Uint8Array|null); + + /** BaseAccount accountNumber */ + accountNumber?: (number|Long|null); + + /** BaseAccount sequence */ + sequence?: (number|Long|null); + } + + /** Represents a BaseAccount. */ + class BaseAccount implements IBaseAccount { + + /** + * Constructs a new BaseAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.v1.IBaseAccount); + + /** BaseAccount address. */ + public address: Uint8Array; + + /** BaseAccount pubKey. */ + public pubKey: Uint8Array; + + /** BaseAccount accountNumber. */ + public accountNumber: (number|Long); + + /** BaseAccount sequence. */ + public sequence: (number|Long); + + /** + * Creates a new BaseAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns BaseAccount instance + */ + public static create(properties?: cosmos_sdk.x.auth.v1.IBaseAccount): cosmos_sdk.x.auth.v1.BaseAccount; + + /** + * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. + * @param message BaseAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.auth.v1.IBaseAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. + * @param message BaseAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.auth.v1.IBaseAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BaseAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BaseAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.v1.BaseAccount; + + /** + * Decodes a BaseAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BaseAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.v1.BaseAccount; + + /** + * Verifies a BaseAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BaseAccount + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.BaseAccount; + + /** + * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. + * @param message BaseAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.auth.v1.BaseAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BaseAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ModuleAccount. */ + interface IModuleAccount { + + /** ModuleAccount baseAccount */ + baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); + + /** ModuleAccount name */ + name?: (string|null); + + /** ModuleAccount permissions */ + permissions?: (string[]|null); + } + + /** Represents a ModuleAccount. */ + class ModuleAccount implements IModuleAccount { + + /** + * Constructs a new ModuleAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.v1.IModuleAccount); + + /** ModuleAccount baseAccount. */ + public baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); + + /** ModuleAccount name. */ + public name: string; + + /** ModuleAccount permissions. */ + public permissions: string[]; + + /** + * Creates a new ModuleAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ModuleAccount instance + */ + public static create(properties?: cosmos_sdk.x.auth.v1.IModuleAccount): cosmos_sdk.x.auth.v1.ModuleAccount; + + /** + * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. + * @param message ModuleAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.auth.v1.IModuleAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. + * @param message ModuleAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.auth.v1.IModuleAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModuleAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModuleAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.v1.ModuleAccount; + + /** + * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModuleAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.v1.ModuleAccount; + + /** + * Verifies a ModuleAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ModuleAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModuleAccount + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.ModuleAccount; + + /** + * Creates a plain object from a ModuleAccount message. Also converts values to other types if specified. + * @param message ModuleAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.auth.v1.ModuleAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ModuleAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Params. */ + interface IParams { + + /** Params maxMemoCharacters */ + maxMemoCharacters?: (number|Long|null); + + /** Params txSigLimit */ + txSigLimit?: (number|Long|null); + + /** Params txSizeCostPerByte */ + txSizeCostPerByte?: (number|Long|null); + + /** Params sigVerifyCostEd25519 */ + sigVerifyCostEd25519?: (number|Long|null); + + /** Params sigVerifyCostSecp256k1 */ + sigVerifyCostSecp256k1?: (number|Long|null); + } + + /** Represents a Params. */ + class Params implements IParams { + + /** + * Constructs a new Params. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.v1.IParams); + + /** Params maxMemoCharacters. */ + public maxMemoCharacters: (number|Long); + + /** Params txSigLimit. */ + public txSigLimit: (number|Long); + + /** Params txSizeCostPerByte. */ + public txSizeCostPerByte: (number|Long); + + /** Params sigVerifyCostEd25519. */ + public sigVerifyCostEd25519: (number|Long); + + /** Params sigVerifyCostSecp256k1. */ + public sigVerifyCostSecp256k1: (number|Long); + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: cosmos_sdk.x.auth.v1.IParams): cosmos_sdk.x.auth.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.auth.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.auth.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.v1.Params; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.v1.Params; + + /** + * Verifies a Params message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Params + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.Params; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @param message Params + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.auth.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Params to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace vesting. */ + namespace vesting { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a BaseVestingAccount. */ + interface IBaseVestingAccount { + + /** BaseVestingAccount baseAccount */ + baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); + + /** BaseVestingAccount originalVesting */ + originalVesting?: (cosmos_sdk.v1.ICoin[]|null); + + /** BaseVestingAccount delegatedFree */ + delegatedFree?: (cosmos_sdk.v1.ICoin[]|null); + + /** BaseVestingAccount delegatedVesting */ + delegatedVesting?: (cosmos_sdk.v1.ICoin[]|null); + + /** BaseVestingAccount endTime */ + endTime?: (number|Long|null); + } + + /** Represents a BaseVestingAccount. */ + class BaseVestingAccount implements IBaseVestingAccount { + + /** + * Constructs a new BaseVestingAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount); + + /** BaseVestingAccount baseAccount. */ + public baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); + + /** BaseVestingAccount originalVesting. */ + public originalVesting: cosmos_sdk.v1.ICoin[]; + + /** BaseVestingAccount delegatedFree. */ + public delegatedFree: cosmos_sdk.v1.ICoin[]; + + /** BaseVestingAccount delegatedVesting. */ + public delegatedVesting: cosmos_sdk.v1.ICoin[]; + + /** BaseVestingAccount endTime. */ + public endTime: (number|Long); + + /** + * Creates a new BaseVestingAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns BaseVestingAccount instance + */ + public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; + + /** + * Encodes the specified BaseVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. + * @param message BaseVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BaseVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. + * @param message BaseVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BaseVestingAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BaseVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; + + /** + * Decodes a BaseVestingAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BaseVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; + + /** + * Verifies a BaseVestingAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BaseVestingAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BaseVestingAccount + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; + + /** + * Creates a plain object from a BaseVestingAccount message. Also converts values to other types if specified. + * @param message BaseVestingAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BaseVestingAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContinuousVestingAccount. */ + interface IContinuousVestingAccount { + + /** ContinuousVestingAccount baseVestingAccount */ + baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); + + /** ContinuousVestingAccount startTime */ + startTime?: (number|Long|null); + } + + /** Represents a ContinuousVestingAccount. */ + class ContinuousVestingAccount implements IContinuousVestingAccount { + + /** + * Constructs a new ContinuousVestingAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount); + + /** ContinuousVestingAccount baseVestingAccount. */ + public baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); + + /** ContinuousVestingAccount startTime. */ + public startTime: (number|Long); + + /** + * Creates a new ContinuousVestingAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ContinuousVestingAccount instance + */ + public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; + + /** + * Encodes the specified ContinuousVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. + * @param message ContinuousVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContinuousVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. + * @param message ContinuousVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContinuousVestingAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContinuousVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; + + /** + * Decodes a ContinuousVestingAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContinuousVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; + + /** + * Verifies a ContinuousVestingAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContinuousVestingAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContinuousVestingAccount + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; + + /** + * Creates a plain object from a ContinuousVestingAccount message. Also converts values to other types if specified. + * @param message ContinuousVestingAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContinuousVestingAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DelayedVestingAccount. */ + interface IDelayedVestingAccount { + + /** DelayedVestingAccount baseVestingAccount */ + baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); + } + + /** Represents a DelayedVestingAccount. */ + class DelayedVestingAccount implements IDelayedVestingAccount { + + /** + * Constructs a new DelayedVestingAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount); + + /** DelayedVestingAccount baseVestingAccount. */ + public baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); + + /** + * Creates a new DelayedVestingAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns DelayedVestingAccount instance + */ + public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; + + /** + * Encodes the specified DelayedVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. + * @param message DelayedVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DelayedVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. + * @param message DelayedVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DelayedVestingAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DelayedVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; + + /** + * Decodes a DelayedVestingAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DelayedVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; + + /** + * Verifies a DelayedVestingAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DelayedVestingAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DelayedVestingAccount + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; + + /** + * Creates a plain object from a DelayedVestingAccount message. Also converts values to other types if specified. + * @param message DelayedVestingAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DelayedVestingAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Period. */ + interface IPeriod { + + /** Period length */ + length?: (number|Long|null); + + /** Period amount */ + amount?: (cosmos_sdk.v1.ICoin[]|null); + } + + /** Represents a Period. */ + class Period implements IPeriod { + + /** + * Constructs a new Period. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriod); + + /** Period length. */ + public length: (number|Long); + + /** Period amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new Period instance using the specified properties. + * @param [properties] Properties to set + * @returns Period instance + */ + public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriod): cosmos_sdk.x.auth.vesting.v1.Period; + + /** + * Encodes the specified Period message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. + * @param message Period message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.auth.vesting.v1.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Period message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. + * @param message Period message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Period message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.Period; + + /** + * Decodes a Period message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.Period; + + /** + * Verifies a Period message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Period message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Period + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.Period; + + /** + * Creates a plain object from a Period message. Also converts values to other types if specified. + * @param message Period + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.auth.vesting.v1.Period, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Period to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PeriodicVestingAccount. */ + interface IPeriodicVestingAccount { + + /** PeriodicVestingAccount baseVestingAccount */ + baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); + + /** PeriodicVestingAccount startTime */ + startTime?: (number|Long|null); + + /** PeriodicVestingAccount vestingPeriods */ + vestingPeriods?: (cosmos_sdk.x.auth.vesting.v1.IPeriod[]|null); + } + + /** Represents a PeriodicVestingAccount. */ + class PeriodicVestingAccount implements IPeriodicVestingAccount { + + /** + * Constructs a new PeriodicVestingAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount); + + /** PeriodicVestingAccount baseVestingAccount. */ + public baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); + + /** PeriodicVestingAccount startTime. */ + public startTime: (number|Long); + + /** PeriodicVestingAccount vestingPeriods. */ + public vestingPeriods: cosmos_sdk.x.auth.vesting.v1.IPeriod[]; + + /** + * Creates a new PeriodicVestingAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns PeriodicVestingAccount instance + */ + public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; + + /** + * Encodes the specified PeriodicVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. + * @param message PeriodicVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PeriodicVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. + * @param message PeriodicVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PeriodicVestingAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PeriodicVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; + + /** + * Decodes a PeriodicVestingAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PeriodicVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; + + /** + * Verifies a PeriodicVestingAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PeriodicVestingAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PeriodicVestingAccount + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; + + /** + * Creates a plain object from a PeriodicVestingAccount message. Also converts values to other types if specified. + * @param message PeriodicVestingAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PeriodicVestingAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace bank. */ + namespace bank { + + /** Namespace v1. */ + namespace v1 { + + /** Represents a Query */ + class Query extends $protobuf.rpc.Service { + + /** + * Constructs a new Query 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 Query 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): Query; + + /** + * Calls Balance. + * @param request QueryBalanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryBalanceResponse + */ + public balance(request: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, callback: cosmos_sdk.x.bank.v1.Query.BalanceCallback): void; + + /** + * Calls Balance. + * @param request QueryBalanceRequest message or plain object + * @returns Promise + */ + public balance(request: cosmos_sdk.x.bank.v1.IQueryBalanceRequest): Promise; + + /** + * Calls AllBalances. + * @param request QueryAllBalancesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryAllBalancesResponse + */ + public allBalances(request: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, callback: cosmos_sdk.x.bank.v1.Query.AllBalancesCallback): void; + + /** + * Calls AllBalances. + * @param request QueryAllBalancesRequest message or plain object + * @returns Promise + */ + public allBalances(request: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest): Promise; + + /** + * Calls TotalSupply. + * @param request QueryTotalSupplyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryTotalSupplyResponse + */ + public totalSupply(request: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, callback: cosmos_sdk.x.bank.v1.Query.TotalSupplyCallback): void; + + /** + * Calls TotalSupply. + * @param request QueryTotalSupplyRequest message or plain object + * @returns Promise + */ + public totalSupply(request: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest): Promise; + + /** + * Calls SupplyOf. + * @param request QuerySupplyOfRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QuerySupplyOfResponse + */ + public supplyOf(request: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, callback: cosmos_sdk.x.bank.v1.Query.SupplyOfCallback): void; + + /** + * Calls SupplyOf. + * @param request QuerySupplyOfRequest message or plain object + * @returns Promise + */ + public supplyOf(request: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest): Promise; + } + + namespace Query { + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#balance}. + * @param error Error, if any + * @param [response] QueryBalanceResponse + */ + type BalanceCallback = (error: (Error|null), response?: cosmos_sdk.x.bank.v1.QueryBalanceResponse) => void; + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#allBalances}. + * @param error Error, if any + * @param [response] QueryAllBalancesResponse + */ + type AllBalancesCallback = (error: (Error|null), response?: cosmos_sdk.x.bank.v1.QueryAllBalancesResponse) => void; + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#totalSupply}. + * @param error Error, if any + * @param [response] QueryTotalSupplyResponse + */ + type TotalSupplyCallback = (error: (Error|null), response?: cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse) => void; + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#supplyOf}. + * @param error Error, if any + * @param [response] QuerySupplyOfResponse + */ + type SupplyOfCallback = (error: (Error|null), response?: cosmos_sdk.x.bank.v1.QuerySupplyOfResponse) => void; + } + + /** Properties of a QueryBalanceRequest. */ + interface IQueryBalanceRequest { + + /** QueryBalanceRequest address */ + address?: (Uint8Array|null); + + /** QueryBalanceRequest denom */ + denom?: (string|null); + } + + /** Represents a QueryBalanceRequest. */ + class QueryBalanceRequest implements IQueryBalanceRequest { + + /** + * Constructs a new QueryBalanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest); + + /** QueryBalanceRequest address. */ + public address: Uint8Array; + + /** QueryBalanceRequest denom. */ + public denom: string; + + /** + * Creates a new QueryBalanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryBalanceRequest instance + */ + public static create(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest): cosmos_sdk.x.bank.v1.QueryBalanceRequest; + + /** + * Encodes the specified QueryBalanceRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. + * @param message QueryBalanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryBalanceRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. + * @param message QueryBalanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryBalanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryBalanceRequest; + + /** + * Decodes a QueryBalanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryBalanceRequest; + + /** + * Verifies a QueryBalanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryBalanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryBalanceRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryBalanceRequest; + + /** + * Creates a plain object from a QueryBalanceRequest message. Also converts values to other types if specified. + * @param message QueryBalanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.QueryBalanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryBalanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryBalanceResponse. */ + interface IQueryBalanceResponse { + + /** QueryBalanceResponse balance */ + balance?: (cosmos_sdk.v1.ICoin|null); + } + + /** Represents a QueryBalanceResponse. */ + class QueryBalanceResponse implements IQueryBalanceResponse { + + /** + * Constructs a new QueryBalanceResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse); + + /** QueryBalanceResponse balance. */ + public balance?: (cosmos_sdk.v1.ICoin|null); + + /** + * Creates a new QueryBalanceResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryBalanceResponse instance + */ + public static create(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse): cosmos_sdk.x.bank.v1.QueryBalanceResponse; + + /** + * Encodes the specified QueryBalanceResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. + * @param message QueryBalanceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryBalanceResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. + * @param message QueryBalanceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryBalanceResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryBalanceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryBalanceResponse; + + /** + * Decodes a QueryBalanceResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryBalanceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryBalanceResponse; + + /** + * Verifies a QueryBalanceResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryBalanceResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryBalanceResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryBalanceResponse; + + /** + * Creates a plain object from a QueryBalanceResponse message. Also converts values to other types if specified. + * @param message QueryBalanceResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.QueryBalanceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryBalanceResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryAllBalancesRequest. */ + interface IQueryAllBalancesRequest { + + /** QueryAllBalancesRequest address */ + address?: (Uint8Array|null); + } + + /** Represents a QueryAllBalancesRequest. */ + class QueryAllBalancesRequest implements IQueryAllBalancesRequest { + + /** + * Constructs a new QueryAllBalancesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest); + + /** QueryAllBalancesRequest address. */ + public address: Uint8Array; + + /** + * Creates a new QueryAllBalancesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAllBalancesRequest instance + */ + public static create(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; + + /** + * Encodes the specified QueryAllBalancesRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. + * @param message QueryAllBalancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAllBalancesRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. + * @param message QueryAllBalancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAllBalancesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAllBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; + + /** + * Decodes a QueryAllBalancesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAllBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; + + /** + * Verifies a QueryAllBalancesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryAllBalancesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAllBalancesRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; + + /** + * Creates a plain object from a QueryAllBalancesRequest message. Also converts values to other types if specified. + * @param message QueryAllBalancesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.QueryAllBalancesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAllBalancesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryAllBalancesResponse. */ + interface IQueryAllBalancesResponse { + + /** QueryAllBalancesResponse balances */ + balances?: (cosmos_sdk.v1.ICoin[]|null); + } + + /** Represents a QueryAllBalancesResponse. */ + class QueryAllBalancesResponse implements IQueryAllBalancesResponse { + + /** + * Constructs a new QueryAllBalancesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse); + + /** QueryAllBalancesResponse balances. */ + public balances: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new QueryAllBalancesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAllBalancesResponse instance + */ + public static create(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; + + /** + * Encodes the specified QueryAllBalancesResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. + * @param message QueryAllBalancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryAllBalancesResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. + * @param message QueryAllBalancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryAllBalancesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAllBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; + + /** + * Decodes a QueryAllBalancesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAllBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; + + /** + * Verifies a QueryAllBalancesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryAllBalancesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAllBalancesResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; + + /** + * Creates a plain object from a QueryAllBalancesResponse message. Also converts values to other types if specified. + * @param message QueryAllBalancesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.QueryAllBalancesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryAllBalancesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryTotalSupplyRequest. */ + interface IQueryTotalSupplyRequest { + } + + /** Represents a QueryTotalSupplyRequest. */ + class QueryTotalSupplyRequest implements IQueryTotalSupplyRequest { + + /** + * Constructs a new QueryTotalSupplyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest); + + /** + * Creates a new QueryTotalSupplyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryTotalSupplyRequest instance + */ + public static create(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; + + /** + * Encodes the specified QueryTotalSupplyRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. + * @param message QueryTotalSupplyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryTotalSupplyRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. + * @param message QueryTotalSupplyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; + + /** + * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; + + /** + * Verifies a QueryTotalSupplyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryTotalSupplyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryTotalSupplyRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; + + /** + * Creates a plain object from a QueryTotalSupplyRequest message. Also converts values to other types if specified. + * @param message QueryTotalSupplyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryTotalSupplyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryTotalSupplyResponse. */ + interface IQueryTotalSupplyResponse { + + /** QueryTotalSupplyResponse supply */ + supply?: (cosmos_sdk.v1.ICoin[]|null); + } + + /** Represents a QueryTotalSupplyResponse. */ + class QueryTotalSupplyResponse implements IQueryTotalSupplyResponse { + + /** + * Constructs a new QueryTotalSupplyResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse); + + /** QueryTotalSupplyResponse supply. */ + public supply: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new QueryTotalSupplyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryTotalSupplyResponse instance + */ + public static create(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; + + /** + * Encodes the specified QueryTotalSupplyResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. + * @param message QueryTotalSupplyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QueryTotalSupplyResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. + * @param message QueryTotalSupplyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; + + /** + * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; + + /** + * Verifies a QueryTotalSupplyResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QueryTotalSupplyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryTotalSupplyResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; + + /** + * Creates a plain object from a QueryTotalSupplyResponse message. Also converts values to other types if specified. + * @param message QueryTotalSupplyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QueryTotalSupplyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QuerySupplyOfRequest. */ + interface IQuerySupplyOfRequest { + + /** QuerySupplyOfRequest denom */ + denom?: (string|null); + } + + /** Represents a QuerySupplyOfRequest. */ + class QuerySupplyOfRequest implements IQuerySupplyOfRequest { + + /** + * Constructs a new QuerySupplyOfRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest); + + /** QuerySupplyOfRequest denom. */ + public denom: string; + + /** + * Creates a new QuerySupplyOfRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QuerySupplyOfRequest instance + */ + public static create(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; + + /** + * Encodes the specified QuerySupplyOfRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. + * @param message QuerySupplyOfRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuerySupplyOfRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. + * @param message QuerySupplyOfRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuerySupplyOfRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuerySupplyOfRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; + + /** + * Decodes a QuerySupplyOfRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuerySupplyOfRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; + + /** + * Verifies a QuerySupplyOfRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuerySupplyOfRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuerySupplyOfRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; + + /** + * Creates a plain object from a QuerySupplyOfRequest message. Also converts values to other types if specified. + * @param message QuerySupplyOfRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.QuerySupplyOfRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuerySupplyOfRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QuerySupplyOfResponse. */ + interface IQuerySupplyOfResponse { + + /** QuerySupplyOfResponse amount */ + amount?: (string|null); + } + + /** Represents a QuerySupplyOfResponse. */ + class QuerySupplyOfResponse implements IQuerySupplyOfResponse { + + /** + * Constructs a new QuerySupplyOfResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse); + + /** QuerySupplyOfResponse amount. */ + public amount: string; + + /** + * Creates a new QuerySupplyOfResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QuerySupplyOfResponse instance + */ + public static create(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; + + /** + * Encodes the specified QuerySupplyOfResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. + * @param message QuerySupplyOfResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuerySupplyOfResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. + * @param message QuerySupplyOfResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuerySupplyOfResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuerySupplyOfResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; + + /** + * Decodes a QuerySupplyOfResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuerySupplyOfResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; + + /** + * Verifies a QuerySupplyOfResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuerySupplyOfResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuerySupplyOfResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; + + /** + * Creates a plain object from a QuerySupplyOfResponse message. Also converts values to other types if specified. + * @param message QuerySupplyOfResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.QuerySupplyOfResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuerySupplyOfResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message MsgSend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IMsgSend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. + * @param message MsgSend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IMsgSend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgSend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.MsgSend; + + /** + * Decodes a MsgSend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.MsgSend; + + /** + * Verifies a MsgSend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgSend + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.MsgSend; + + /** + * Creates a plain object from a MsgSend message. Also converts values to other types if specified. + * @param message MsgSend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.MsgSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgSend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Input message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. + * @param message Input message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Input message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.Input; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.Input; + + /** + * Verifies an Input message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Input message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Input + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Input; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @param message Input + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.Input, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Input to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Output message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. + * @param message Output message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Output message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.Output; + + /** + * Decodes an Output message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.Output; + + /** + * Verifies an Output message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Output message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Output + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Output; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @param message Output + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.Output, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Output to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message MsgMultiSend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.IMsgMultiSend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. + * @param message MsgMultiSend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IMsgMultiSend, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.MsgMultiSend; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.MsgMultiSend; + + /** + * Verifies a MsgMultiSend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgMultiSend + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.MsgMultiSend; + + /** + * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. + * @param message MsgMultiSend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.MsgMultiSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgMultiSend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Supply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.bank.v1.ISupply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. + * @param message Supply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.bank.v1.ISupply, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Supply message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.Supply; + + /** + * Decodes a Supply message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.Supply; + + /** + * Verifies a Supply message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Supply message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Supply + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Supply; + + /** + * Creates a plain object from a Supply message. Also converts values to other types if specified. + * @param message Supply + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.bank.v1.Supply, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Supply to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace capability. */ + namespace capability { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a Capability. */ + interface ICapability { + + /** Capability index */ + index?: (number|Long|null); + } + + /** Represents a Capability. */ + class Capability implements ICapability { + + /** + * Constructs a new Capability. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.capability.v1.ICapability); + + /** Capability index. */ + public index: (number|Long); + + /** + * Creates a new Capability instance using the specified properties. + * @param [properties] Properties to set + * @returns Capability instance + */ + public static create(properties?: cosmos_sdk.x.capability.v1.ICapability): cosmos_sdk.x.capability.v1.Capability; + + /** + * Encodes the specified Capability message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. + * @param message Capability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.capability.v1.ICapability, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Capability message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. + * @param message Capability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.capability.v1.ICapability, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Capability message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Capability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.capability.v1.Capability; + + /** + * Decodes a Capability message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Capability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.capability.v1.Capability; + + /** + * Verifies a Capability message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Capability message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Capability + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.Capability; + + /** + * Creates a plain object from a Capability message. Also converts values to other types if specified. + * @param message Capability + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.capability.v1.Capability, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Capability to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Owner. */ + interface IOwner { + + /** Owner module */ + module?: (string|null); + + /** Owner name */ + name?: (string|null); + } + + /** Represents an Owner. */ + class Owner implements IOwner { + + /** + * Constructs a new Owner. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.capability.v1.IOwner); + + /** Owner module. */ + public module: string; + + /** Owner name. */ + public name: string; + + /** + * Creates a new Owner instance using the specified properties. + * @param [properties] Properties to set + * @returns Owner instance + */ + public static create(properties?: cosmos_sdk.x.capability.v1.IOwner): cosmos_sdk.x.capability.v1.Owner; + + /** + * Encodes the specified Owner message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. + * @param message Owner message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.capability.v1.IOwner, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Owner message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. + * @param message Owner message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.capability.v1.IOwner, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Owner message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Owner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.capability.v1.Owner; + + /** + * Decodes an Owner message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Owner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.capability.v1.Owner; + + /** + * Verifies an Owner message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Owner message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Owner + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.Owner; + + /** + * Creates a plain object from an Owner message. Also converts values to other types if specified. + * @param message Owner + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.capability.v1.Owner, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Owner to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CapabilityOwners. */ + interface ICapabilityOwners { + + /** CapabilityOwners owners */ + owners?: (cosmos_sdk.x.capability.v1.IOwner[]|null); + } + + /** Represents a CapabilityOwners. */ + class CapabilityOwners implements ICapabilityOwners { + + /** + * Constructs a new CapabilityOwners. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.capability.v1.ICapabilityOwners); + + /** CapabilityOwners owners. */ + public owners: cosmos_sdk.x.capability.v1.IOwner[]; + + /** + * Creates a new CapabilityOwners instance using the specified properties. + * @param [properties] Properties to set + * @returns CapabilityOwners instance + */ + public static create(properties?: cosmos_sdk.x.capability.v1.ICapabilityOwners): cosmos_sdk.x.capability.v1.CapabilityOwners; + + /** + * Encodes the specified CapabilityOwners message. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. + * @param message CapabilityOwners message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.capability.v1.ICapabilityOwners, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CapabilityOwners message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. + * @param message CapabilityOwners message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.capability.v1.ICapabilityOwners, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CapabilityOwners message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CapabilityOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.capability.v1.CapabilityOwners; + + /** + * Decodes a CapabilityOwners message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CapabilityOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.capability.v1.CapabilityOwners; + + /** + * Verifies a CapabilityOwners message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CapabilityOwners message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CapabilityOwners + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.CapabilityOwners; + + /** + * Creates a plain object from a CapabilityOwners message. Also converts values to other types if specified. + * @param message CapabilityOwners + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.capability.v1.CapabilityOwners, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CapabilityOwners to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace crisis. */ + namespace crisis { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgVerifyInvariant. */ + interface IMsgVerifyInvariant { + + /** MsgVerifyInvariant sender */ + sender?: (Uint8Array|null); + + /** MsgVerifyInvariant invariantModuleName */ + invariantModuleName?: (string|null); + + /** MsgVerifyInvariant invariantRoute */ + invariantRoute?: (string|null); + } + + /** Represents a MsgVerifyInvariant. */ + class MsgVerifyInvariant implements IMsgVerifyInvariant { + + /** + * Constructs a new MsgVerifyInvariant. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant); + + /** MsgVerifyInvariant sender. */ + public sender: Uint8Array; + + /** MsgVerifyInvariant invariantModuleName. */ + public invariantModuleName: string; + + /** MsgVerifyInvariant invariantRoute. */ + public invariantRoute: string; + + /** + * Creates a new MsgVerifyInvariant instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgVerifyInvariant instance + */ + public static create(properties?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; + + /** + * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. + * @param message MsgVerifyInvariant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgVerifyInvariant message, length delimited. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. + * @param message MsgVerifyInvariant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; + + /** + * Verifies a MsgVerifyInvariant message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgVerifyInvariant message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgVerifyInvariant + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; + + /** + * Creates a plain object from a MsgVerifyInvariant message. Also converts values to other types if specified. + * @param message MsgVerifyInvariant + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.crisis.v1.MsgVerifyInvariant, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgVerifyInvariant to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace distribution. */ + namespace distribution { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgSetWithdrawAddress. */ + interface IMsgSetWithdrawAddress { + + /** MsgSetWithdrawAddress delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** MsgSetWithdrawAddress withdrawAddress */ + withdrawAddress?: (Uint8Array|null); + } + + /** Represents a MsgSetWithdrawAddress. */ + class MsgSetWithdrawAddress implements IMsgSetWithdrawAddress { + + /** + * Constructs a new MsgSetWithdrawAddress. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress); + + /** MsgSetWithdrawAddress delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgSetWithdrawAddress withdrawAddress. */ + public withdrawAddress: Uint8Array; + + /** + * Creates a new MsgSetWithdrawAddress instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSetWithdrawAddress instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; + + /** + * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. + * @param message MsgSetWithdrawAddress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgSetWithdrawAddress message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. + * @param message MsgSetWithdrawAddress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; + + /** + * Verifies a MsgSetWithdrawAddress message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgSetWithdrawAddress message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgSetWithdrawAddress + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; + + /** + * Creates a plain object from a MsgSetWithdrawAddress message. Also converts values to other types if specified. + * @param message MsgSetWithdrawAddress + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgSetWithdrawAddress to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgWithdrawDelegatorReward. */ + interface IMsgWithdrawDelegatorReward { + + /** MsgWithdrawDelegatorReward delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** MsgWithdrawDelegatorReward validatorAddress */ + validatorAddress?: (Uint8Array|null); + } + + /** Represents a MsgWithdrawDelegatorReward. */ + class MsgWithdrawDelegatorReward implements IMsgWithdrawDelegatorReward { + + /** + * Constructs a new MsgWithdrawDelegatorReward. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward); + + /** MsgWithdrawDelegatorReward delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgWithdrawDelegatorReward validatorAddress. */ + public validatorAddress: Uint8Array; + + /** + * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawDelegatorReward instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @param message MsgWithdrawDelegatorReward message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @param message MsgWithdrawDelegatorReward message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; + + /** + * Verifies a MsgWithdrawDelegatorReward message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgWithdrawDelegatorReward message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgWithdrawDelegatorReward + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; + + /** + * Creates a plain object from a MsgWithdrawDelegatorReward message. Also converts values to other types if specified. + * @param message MsgWithdrawDelegatorReward + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgWithdrawDelegatorReward to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgWithdrawValidatorCommission. */ + interface IMsgWithdrawValidatorCommission { + + /** MsgWithdrawValidatorCommission validatorAddress */ + validatorAddress?: (Uint8Array|null); + } + + /** Represents a MsgWithdrawValidatorCommission. */ + class MsgWithdrawValidatorCommission implements IMsgWithdrawValidatorCommission { + + /** + * Constructs a new MsgWithdrawValidatorCommission. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission); + + /** MsgWithdrawValidatorCommission validatorAddress. */ + public validatorAddress: Uint8Array; + + /** + * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawValidatorCommission instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @param message MsgWithdrawValidatorCommission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @param message MsgWithdrawValidatorCommission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; + + /** + * Verifies a MsgWithdrawValidatorCommission message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgWithdrawValidatorCommission message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgWithdrawValidatorCommission + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; + + /** + * Creates a plain object from a MsgWithdrawValidatorCommission message. Also converts values to other types if specified. + * @param message MsgWithdrawValidatorCommission + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgWithdrawValidatorCommission to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgFundCommunityPool. */ + interface IMsgFundCommunityPool { + + /** MsgFundCommunityPool amount */ + amount?: (cosmos_sdk.v1.ICoin[]|null); + + /** MsgFundCommunityPool depositor */ + depositor?: (Uint8Array|null); + } + + /** Represents a MsgFundCommunityPool. */ + class MsgFundCommunityPool implements IMsgFundCommunityPool { + + /** + * Constructs a new MsgFundCommunityPool. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool); + + /** MsgFundCommunityPool amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** MsgFundCommunityPool depositor. */ + public depositor: Uint8Array; + + /** + * Creates a new MsgFundCommunityPool instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgFundCommunityPool instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; + + /** + * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. + * @param message MsgFundCommunityPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgFundCommunityPool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. + * @param message MsgFundCommunityPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; + + /** + * Verifies a MsgFundCommunityPool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgFundCommunityPool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgFundCommunityPool + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; + + /** + * Creates a plain object from a MsgFundCommunityPool message. Also converts values to other types if specified. + * @param message MsgFundCommunityPool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.MsgFundCommunityPool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgFundCommunityPool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Params. */ + interface IParams { + + /** Params communityTax */ + communityTax?: (string|null); + + /** Params baseProposerReward */ + baseProposerReward?: (string|null); + + /** Params bonusProposerReward */ + bonusProposerReward?: (string|null); + + /** Params withdrawAddrEnabled */ + withdrawAddrEnabled?: (boolean|null); + } + + /** Represents a Params. */ + class Params implements IParams { + + /** + * Constructs a new Params. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IParams); + + /** Params communityTax. */ + public communityTax: string; + + /** Params baseProposerReward. */ + public baseProposerReward: string; + + /** Params bonusProposerReward. */ + public bonusProposerReward: string; + + /** Params withdrawAddrEnabled. */ + public withdrawAddrEnabled: boolean; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IParams): cosmos_sdk.x.distribution.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.Params; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.Params; + + /** + * Verifies a Params message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Params + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.Params; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @param message Params + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Params to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorHistoricalRewards. */ + interface IValidatorHistoricalRewards { + + /** ValidatorHistoricalRewards cumulativeRewardRatio */ + cumulativeRewardRatio?: (cosmos_sdk.v1.IDecCoin[]|null); + + /** ValidatorHistoricalRewards referenceCount */ + referenceCount?: (number|null); + } + + /** Represents a ValidatorHistoricalRewards. */ + class ValidatorHistoricalRewards implements IValidatorHistoricalRewards { + + /** + * Constructs a new ValidatorHistoricalRewards. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards); + + /** ValidatorHistoricalRewards cumulativeRewardRatio. */ + public cumulativeRewardRatio: cosmos_sdk.v1.IDecCoin[]; + + /** ValidatorHistoricalRewards referenceCount. */ + public referenceCount: number; + + /** + * Creates a new ValidatorHistoricalRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorHistoricalRewards instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; + + /** + * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. + * @param message ValidatorHistoricalRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidatorHistoricalRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. + * @param message ValidatorHistoricalRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; + + /** + * Verifies a ValidatorHistoricalRewards message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidatorHistoricalRewards message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorHistoricalRewards + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; + + /** + * Creates a plain object from a ValidatorHistoricalRewards message. Also converts values to other types if specified. + * @param message ValidatorHistoricalRewards + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidatorHistoricalRewards to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorCurrentRewards. */ + interface IValidatorCurrentRewards { + + /** ValidatorCurrentRewards rewards */ + rewards?: (cosmos_sdk.v1.IDecCoin[]|null); + + /** ValidatorCurrentRewards period */ + period?: (number|Long|null); + } + + /** Represents a ValidatorCurrentRewards. */ + class ValidatorCurrentRewards implements IValidatorCurrentRewards { + + /** + * Constructs a new ValidatorCurrentRewards. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards); + + /** ValidatorCurrentRewards rewards. */ + public rewards: cosmos_sdk.v1.IDecCoin[]; + + /** ValidatorCurrentRewards period. */ + public period: (number|Long); + + /** + * Creates a new ValidatorCurrentRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorCurrentRewards instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; + + /** + * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. + * @param message ValidatorCurrentRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidatorCurrentRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. + * @param message ValidatorCurrentRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; + + /** + * Verifies a ValidatorCurrentRewards message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidatorCurrentRewards message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorCurrentRewards + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; + + /** + * Creates a plain object from a ValidatorCurrentRewards message. Also converts values to other types if specified. + * @param message ValidatorCurrentRewards + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidatorCurrentRewards to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorAccumulatedCommission. */ + interface IValidatorAccumulatedCommission { + + /** ValidatorAccumulatedCommission commission */ + commission?: (cosmos_sdk.v1.IDecCoin[]|null); + } + + /** Represents a ValidatorAccumulatedCommission. */ + class ValidatorAccumulatedCommission implements IValidatorAccumulatedCommission { + + /** + * Constructs a new ValidatorAccumulatedCommission. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission); + + /** ValidatorAccumulatedCommission commission. */ + public commission: cosmos_sdk.v1.IDecCoin[]; + + /** + * Creates a new ValidatorAccumulatedCommission instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorAccumulatedCommission instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; + + /** + * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. + * @param message ValidatorAccumulatedCommission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidatorAccumulatedCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. + * @param message ValidatorAccumulatedCommission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; + + /** + * Verifies a ValidatorAccumulatedCommission message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidatorAccumulatedCommission message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorAccumulatedCommission + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; + + /** + * Creates a plain object from a ValidatorAccumulatedCommission message. Also converts values to other types if specified. + * @param message ValidatorAccumulatedCommission + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidatorAccumulatedCommission to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorOutstandingRewards. */ + interface IValidatorOutstandingRewards { + + /** ValidatorOutstandingRewards rewards */ + rewards?: (cosmos_sdk.v1.IDecCoin[]|null); + } + + /** Represents a ValidatorOutstandingRewards. */ + class ValidatorOutstandingRewards implements IValidatorOutstandingRewards { + + /** + * Constructs a new ValidatorOutstandingRewards. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards); + + /** ValidatorOutstandingRewards rewards. */ + public rewards: cosmos_sdk.v1.IDecCoin[]; + + /** + * Creates a new ValidatorOutstandingRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorOutstandingRewards instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; + + /** + * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. + * @param message ValidatorOutstandingRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidatorOutstandingRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. + * @param message ValidatorOutstandingRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; + + /** + * Verifies a ValidatorOutstandingRewards message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidatorOutstandingRewards message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorOutstandingRewards + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; + + /** + * Creates a plain object from a ValidatorOutstandingRewards message. Also converts values to other types if specified. + * @param message ValidatorOutstandingRewards + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidatorOutstandingRewards to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorSlashEvent. */ + interface IValidatorSlashEvent { + + /** ValidatorSlashEvent validatorPeriod */ + validatorPeriod?: (number|Long|null); + + /** ValidatorSlashEvent fraction */ + fraction?: (string|null); + } + + /** Represents a ValidatorSlashEvent. */ + class ValidatorSlashEvent implements IValidatorSlashEvent { + + /** + * Constructs a new ValidatorSlashEvent. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent); + + /** ValidatorSlashEvent validatorPeriod. */ + public validatorPeriod: (number|Long); + + /** ValidatorSlashEvent fraction. */ + public fraction: string; + + /** + * Creates a new ValidatorSlashEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSlashEvent instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; + + /** + * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. + * @param message ValidatorSlashEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidatorSlashEvent message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. + * @param message ValidatorSlashEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; + + /** + * Verifies a ValidatorSlashEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidatorSlashEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorSlashEvent + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; + + /** + * Creates a plain object from a ValidatorSlashEvent message. Also converts values to other types if specified. + * @param message ValidatorSlashEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorSlashEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidatorSlashEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorSlashEvents. */ + interface IValidatorSlashEvents { + + /** ValidatorSlashEvents validatorSlashEvents */ + validatorSlashEvents?: (cosmos_sdk.x.distribution.v1.IValidatorSlashEvent[]|null); + } + + /** Represents a ValidatorSlashEvents. */ + class ValidatorSlashEvents implements IValidatorSlashEvents { + + /** + * Constructs a new ValidatorSlashEvents. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents); + + /** ValidatorSlashEvents validatorSlashEvents. */ + public validatorSlashEvents: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent[]; + + /** + * Creates a new ValidatorSlashEvents instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSlashEvents instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; + + /** + * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. + * @param message ValidatorSlashEvents message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidatorSlashEvents message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. + * @param message ValidatorSlashEvents message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; + + /** + * Verifies a ValidatorSlashEvents message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidatorSlashEvents message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorSlashEvents + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; + + /** + * Creates a plain object from a ValidatorSlashEvents message. Also converts values to other types if specified. + * @param message ValidatorSlashEvents + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorSlashEvents, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidatorSlashEvents to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FeePool. */ + interface IFeePool { + + /** FeePool communityPool */ + communityPool?: (cosmos_sdk.v1.IDecCoin[]|null); + } + + /** Represents a FeePool. */ + class FeePool implements IFeePool { + + /** + * Constructs a new FeePool. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IFeePool); + + /** FeePool communityPool. */ + public communityPool: cosmos_sdk.v1.IDecCoin[]; + + /** + * Creates a new FeePool instance using the specified properties. + * @param [properties] Properties to set + * @returns FeePool instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IFeePool): cosmos_sdk.x.distribution.v1.FeePool; + + /** + * Encodes the specified FeePool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. + * @param message FeePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IFeePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeePool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. + * @param message FeePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IFeePool, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.FeePool; + + /** + * Decodes a FeePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.FeePool; + + /** + * Verifies a FeePool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeePool + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.FeePool; + + /** + * Creates a plain object from a FeePool message. Also converts values to other types if specified. + * @param message FeePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.FeePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommunityPoolSpendProposal. */ + interface ICommunityPoolSpendProposal { + + /** CommunityPoolSpendProposal title */ + title?: (string|null); + + /** CommunityPoolSpendProposal description */ + description?: (string|null); + + /** CommunityPoolSpendProposal recipient */ + recipient?: (Uint8Array|null); + + /** CommunityPoolSpendProposal amount */ + amount?: (cosmos_sdk.v1.ICoin[]|null); + } + + /** Represents a CommunityPoolSpendProposal. */ + class CommunityPoolSpendProposal implements ICommunityPoolSpendProposal { + + /** + * Constructs a new CommunityPoolSpendProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal); + + /** CommunityPoolSpendProposal title. */ + public title: string; + + /** CommunityPoolSpendProposal description. */ + public description: string; + + /** CommunityPoolSpendProposal recipient. */ + public recipient: Uint8Array; + + /** CommunityPoolSpendProposal amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new CommunityPoolSpendProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns CommunityPoolSpendProposal instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; + + /** + * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. + * @param message CommunityPoolSpendProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommunityPoolSpendProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. + * @param message CommunityPoolSpendProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; + + /** + * Verifies a CommunityPoolSpendProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommunityPoolSpendProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommunityPoolSpendProposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; + + /** + * Creates a plain object from a CommunityPoolSpendProposal message. Also converts values to other types if specified. + * @param message CommunityPoolSpendProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommunityPoolSpendProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DelegatorStartingInfo. */ + interface IDelegatorStartingInfo { + + /** DelegatorStartingInfo previousPeriod */ + previousPeriod?: (number|Long|null); + + /** DelegatorStartingInfo stake */ + stake?: (string|null); + + /** DelegatorStartingInfo height */ + height?: (number|Long|null); + } + + /** Represents a DelegatorStartingInfo. */ + class DelegatorStartingInfo implements IDelegatorStartingInfo { + + /** + * Constructs a new DelegatorStartingInfo. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo); + + /** DelegatorStartingInfo previousPeriod. */ + public previousPeriod: (number|Long); + + /** DelegatorStartingInfo stake. */ + public stake: string; + + /** DelegatorStartingInfo height. */ + public height: (number|Long); + + /** + * Creates a new DelegatorStartingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DelegatorStartingInfo instance + */ + public static create(properties?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; + + /** + * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. + * @param message DelegatorStartingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DelegatorStartingInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. + * @param message DelegatorStartingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; + + /** + * Verifies a DelegatorStartingInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DelegatorStartingInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DelegatorStartingInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; + + /** + * Creates a plain object from a DelegatorStartingInfo message. Also converts values to other types if specified. + * @param message DelegatorStartingInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.distribution.v1.DelegatorStartingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DelegatorStartingInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace evidence. */ + namespace evidence { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgSubmitEvidence. */ + interface IMsgSubmitEvidence { + + /** MsgSubmitEvidence submitter */ + submitter?: (Uint8Array|null); + + /** MsgSubmitEvidence evidence */ + evidence?: (google.protobuf.IAny|null); + } + + /** Represents a MsgSubmitEvidence. */ + class MsgSubmitEvidence implements IMsgSubmitEvidence { + + /** + * Constructs a new MsgSubmitEvidence. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence); + + /** MsgSubmitEvidence submitter. */ + public submitter: Uint8Array; + + /** MsgSubmitEvidence evidence. */ + public evidence?: (google.protobuf.IAny|null); + + /** + * Creates a new MsgSubmitEvidence instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSubmitEvidence instance + */ + public static create(properties?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; + + /** + * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. + * @param message MsgSubmitEvidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgSubmitEvidence message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. + * @param message MsgSubmitEvidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; + + /** + * Verifies a MsgSubmitEvidence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgSubmitEvidence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgSubmitEvidence + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; + + /** + * Creates a plain object from a MsgSubmitEvidence message. Also converts values to other types if specified. + * @param message MsgSubmitEvidence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.evidence.v1.MsgSubmitEvidence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgSubmitEvidence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Equivocation. */ + interface IEquivocation { + + /** Equivocation height */ + height?: (number|Long|null); + + /** Equivocation time */ + time?: (google.protobuf.ITimestamp|null); + + /** Equivocation power */ + power?: (number|Long|null); + + /** Equivocation consensusAddress */ + consensusAddress?: (Uint8Array|null); + } + + /** Represents an Equivocation. */ + class Equivocation implements IEquivocation { + + /** + * Constructs a new Equivocation. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.evidence.v1.IEquivocation); + + /** Equivocation height. */ + public height: (number|Long); + + /** Equivocation time. */ + public time?: (google.protobuf.ITimestamp|null); + + /** Equivocation power. */ + public power: (number|Long); + + /** Equivocation consensusAddress. */ + public consensusAddress: Uint8Array; + + /** + * Creates a new Equivocation instance using the specified properties. + * @param [properties] Properties to set + * @returns Equivocation instance + */ + public static create(properties?: cosmos_sdk.x.evidence.v1.IEquivocation): cosmos_sdk.x.evidence.v1.Equivocation; + + /** + * Encodes the specified Equivocation message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. + * @param message Equivocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.evidence.v1.IEquivocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Equivocation message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. + * @param message Equivocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.evidence.v1.IEquivocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Equivocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Equivocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.evidence.v1.Equivocation; + + /** + * Decodes an Equivocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Equivocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.evidence.v1.Equivocation; + + /** + * Verifies an Equivocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Equivocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Equivocation + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.evidence.v1.Equivocation; + + /** + * Creates a plain object from an Equivocation message. Also converts values to other types if specified. + * @param message Equivocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.evidence.v1.Equivocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Equivocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace gov. */ + namespace gov { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgSubmitProposal. */ + interface IMsgSubmitProposal { + + /** MsgSubmitProposal content */ + content?: (google.protobuf.IAny|null); + + /** MsgSubmitProposal initialDeposit */ + initialDeposit?: (cosmos_sdk.v1.ICoin[]|null); + + /** MsgSubmitProposal proposer */ + proposer?: (Uint8Array|null); + } + + /** Represents a MsgSubmitProposal. */ + class MsgSubmitProposal implements IMsgSubmitProposal { + + /** + * Constructs a new MsgSubmitProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal); + + /** MsgSubmitProposal content. */ + public content?: (google.protobuf.IAny|null); + + /** MsgSubmitProposal initialDeposit. */ + public initialDeposit: cosmos_sdk.v1.ICoin[]; + + /** MsgSubmitProposal proposer. */ + public proposer: Uint8Array; + + /** + * Creates a new MsgSubmitProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSubmitProposal instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal): cosmos_sdk.x.gov.v1.MsgSubmitProposal; + + /** + * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. + * @param message MsgSubmitProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. + * @param message MsgSubmitProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.MsgSubmitProposal; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.MsgSubmitProposal; + + /** + * Verifies a MsgSubmitProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgSubmitProposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgSubmitProposal; + + /** + * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. + * @param message MsgSubmitProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.gov.v1.MsgSubmitProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgSubmitProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgVote. */ + interface IMsgVote { + + /** MsgVote proposalId */ + proposalId?: (number|Long|null); + + /** MsgVote voter */ + voter?: (Uint8Array|null); + + /** MsgVote option */ + option?: (cosmos_sdk.x.gov.v1.VoteOption|null); + } + + /** Represents a MsgVote. */ + class MsgVote implements IMsgVote { + + /** + * Constructs a new MsgVote. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IMsgVote); + + /** MsgVote proposalId. */ + public proposalId: (number|Long); + + /** MsgVote voter. */ + public voter: Uint8Array; + + /** MsgVote option. */ + public option: cosmos_sdk.x.gov.v1.VoteOption; + + /** + * Creates a new MsgVote instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgVote instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IMsgVote): cosmos_sdk.x.gov.v1.MsgVote; + + /** + * Encodes the specified MsgVote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. + * @param message MsgVote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.gov.v1.IMsgVote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgVote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. + * @param message MsgVote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IMsgVote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgVote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.MsgVote; + + /** + * Decodes a MsgVote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.MsgVote; + + /** + * Verifies a MsgVote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgVote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgVote + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgVote; + + /** + * Creates a plain object from a MsgVote message. Also converts values to other types if specified. + * @param message MsgVote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.gov.v1.MsgVote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgVote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgDeposit. */ + interface IMsgDeposit { + + /** MsgDeposit proposalId */ + proposalId?: (number|Long|null); + + /** MsgDeposit depositor */ + depositor?: (Uint8Array|null); + + /** MsgDeposit amount */ + amount?: (cosmos_sdk.v1.ICoin[]|null); + } + + /** Represents a MsgDeposit. */ + class MsgDeposit implements IMsgDeposit { + + /** + * Constructs a new MsgDeposit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IMsgDeposit); + + /** MsgDeposit proposalId. */ + public proposalId: (number|Long); + + /** MsgDeposit depositor. */ + public depositor: Uint8Array; + + /** MsgDeposit amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new MsgDeposit instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgDeposit instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IMsgDeposit): cosmos_sdk.x.gov.v1.MsgDeposit; + + /** + * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. + * @param message MsgDeposit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.gov.v1.IMsgDeposit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgDeposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. + * @param message MsgDeposit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IMsgDeposit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.MsgDeposit; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.MsgDeposit; + + /** + * Verifies a MsgDeposit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgDeposit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgDeposit + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgDeposit; + + /** + * Creates a plain object from a MsgDeposit message. Also converts values to other types if specified. + * @param message MsgDeposit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.gov.v1.MsgDeposit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgDeposit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** VoteOption enum. */ + enum VoteOption { + VOTE_OPTION_UNSPECIFIED = 0, + VOTE_OPTION_YES = 1, + VOTE_OPTION_ABSTAIN = 2, + VOTE_OPTION_NO = 3, + VOTE_OPTION_NO_WITH_VETO = 4 + } + + /** Properties of a TextProposal. */ + interface ITextProposal { + + /** TextProposal title */ + title?: (string|null); + + /** TextProposal description */ + description?: (string|null); + } + + /** Represents a TextProposal. */ + class TextProposal implements ITextProposal { + + /** + * Constructs a new TextProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.ITextProposal); + + /** TextProposal title. */ + public title: string; + + /** TextProposal description. */ + public description: string; + + /** + * Creates a new TextProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns TextProposal instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.ITextProposal): cosmos_sdk.x.gov.v1.TextProposal; + + /** + * Encodes the specified TextProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. + * @param message TextProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.gov.v1.ITextProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. + * @param message TextProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.gov.v1.ITextProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TextProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.TextProposal; + + /** + * Decodes a TextProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.TextProposal; + + /** + * Verifies a TextProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TextProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextProposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.TextProposal; + + /** + * Creates a plain object from a TextProposal message. Also converts values to other types if specified. + * @param message TextProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.gov.v1.TextProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TextProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Deposit. */ + interface IDeposit { + + /** Deposit proposalId */ + proposalId?: (number|Long|null); + + /** Deposit depositor */ + depositor?: (Uint8Array|null); + + /** Deposit amount */ + amount?: (cosmos_sdk.v1.ICoin[]|null); + } + + /** Represents a Deposit. */ + class Deposit implements IDeposit { + + /** + * Constructs a new Deposit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IDeposit); + + /** Deposit proposalId. */ + public proposalId: (number|Long); + + /** Deposit depositor. */ + public depositor: Uint8Array; + + /** Deposit amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new Deposit instance using the specified properties. + * @param [properties] Properties to set + * @returns Deposit instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IDeposit): cosmos_sdk.x.gov.v1.Deposit; + + /** + * Encodes the specified Deposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. + * @param message Deposit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.gov.v1.IDeposit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. + * @param message Deposit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IDeposit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Deposit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.Deposit; + + /** + * Decodes a Deposit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.Deposit; + + /** + * Verifies a Deposit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Deposit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deposit + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Deposit; + + /** + * Creates a plain object from a Deposit message. Also converts values to other types if specified. + * @param message Deposit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.gov.v1.Deposit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Deposit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Proposal. */ + interface IProposal { + + /** Proposal proposalId */ + proposalId?: (number|Long|null); + + /** Proposal content */ + content?: (google.protobuf.IAny|null); + + /** Proposal status */ + status?: (cosmos_sdk.x.gov.v1.ProposalStatus|null); + + /** Proposal finalTallyResult */ + finalTallyResult?: (cosmos_sdk.x.gov.v1.ITallyResult|null); + + /** Proposal submitTime */ + submitTime?: (google.protobuf.ITimestamp|null); + + /** Proposal depositEndTime */ + depositEndTime?: (google.protobuf.ITimestamp|null); + + /** Proposal totalDeposit */ + totalDeposit?: (cosmos_sdk.v1.ICoin[]|null); + + /** Proposal votingStartTime */ + votingStartTime?: (google.protobuf.ITimestamp|null); + + /** Proposal votingEndTime */ + votingEndTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Proposal. */ + class Proposal implements IProposal { + + /** + * Constructs a new Proposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IProposal); + + /** Proposal proposalId. */ + public proposalId: (number|Long); + + /** Proposal content. */ + public content?: (google.protobuf.IAny|null); + + /** Proposal status. */ + public status: cosmos_sdk.x.gov.v1.ProposalStatus; + + /** Proposal finalTallyResult. */ + public finalTallyResult?: (cosmos_sdk.x.gov.v1.ITallyResult|null); + + /** Proposal submitTime. */ + public submitTime?: (google.protobuf.ITimestamp|null); + + /** Proposal depositEndTime. */ + public depositEndTime?: (google.protobuf.ITimestamp|null); + + /** Proposal totalDeposit. */ + public totalDeposit: cosmos_sdk.v1.ICoin[]; + + /** Proposal votingStartTime. */ + public votingStartTime?: (google.protobuf.ITimestamp|null); + + /** Proposal votingEndTime. */ + public votingEndTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Proposal instance using the specified properties. + * @param [properties] Properties to set + * @returns Proposal instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IProposal): cosmos_sdk.x.gov.v1.Proposal; + + /** + * Encodes the specified Proposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. + * @param message Proposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.gov.v1.IProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. + * @param message Proposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Proposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.Proposal; + + /** + * Decodes a Proposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.Proposal; + + /** + * Verifies a Proposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Proposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Proposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Proposal; + + /** + * Creates a plain object from a Proposal message. Also converts values to other types if specified. + * @param message Proposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.gov.v1.Proposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Proposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** ProposalStatus enum. */ + enum ProposalStatus { + PROPOSAL_STATUS_UNSPECIFIED = 0, + PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, + PROPOSAL_STATUS_VOTING_PERIOD = 2, + PROPOSAL_STATUS_PASSED = 3, + PROPOSAL_STATUS_REJECTED = 4, + PROPOSAL_STATUS_FAILED = 5 + } + + /** Properties of a TallyResult. */ + interface ITallyResult { + + /** TallyResult yes */ + yes?: (string|null); + + /** TallyResult abstain */ + abstain?: (string|null); + + /** TallyResult no */ + no?: (string|null); + + /** TallyResult noWithVeto */ + noWithVeto?: (string|null); + } + + /** Represents a TallyResult. */ + class TallyResult implements ITallyResult { + + /** + * Constructs a new TallyResult. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.ITallyResult); + + /** TallyResult yes. */ + public yes: string; + + /** TallyResult abstain. */ + public abstain: string; + + /** TallyResult no. */ + public no: string; + + /** TallyResult noWithVeto. */ + public noWithVeto: string; + + /** + * Creates a new TallyResult instance using the specified properties. + * @param [properties] Properties to set + * @returns TallyResult instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.ITallyResult): cosmos_sdk.x.gov.v1.TallyResult; + + /** + * Encodes the specified TallyResult message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. + * @param message TallyResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.gov.v1.ITallyResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. + * @param message TallyResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.gov.v1.ITallyResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TallyResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.TallyResult; + + /** + * Decodes a TallyResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.TallyResult; + + /** + * Verifies a TallyResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TallyResult + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.TallyResult; + + /** + * Creates a plain object from a TallyResult message. Also converts values to other types if specified. + * @param message TallyResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.gov.v1.TallyResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TallyResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Vote. */ + interface IVote { + + /** Vote proposalId */ + proposalId?: (number|Long|null); + + /** Vote voter */ + voter?: (Uint8Array|null); + + /** Vote option */ + option?: (cosmos_sdk.x.gov.v1.VoteOption|null); + } + + /** Represents a Vote. */ + class Vote implements IVote { + + /** + * Constructs a new Vote. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IVote); + + /** Vote proposalId. */ + public proposalId: (number|Long); + + /** Vote voter. */ + public voter: Uint8Array; + + /** Vote option. */ + public option: cosmos_sdk.x.gov.v1.VoteOption; + + /** + * Creates a new Vote instance using the specified properties. + * @param [properties] Properties to set + * @returns Vote instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IVote): cosmos_sdk.x.gov.v1.Vote; + + /** + * Encodes the specified Vote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. + * @param message Vote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.gov.v1.IVote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. + * @param message Vote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IVote, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Vote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.Vote; + + /** + * Decodes a Vote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.Vote; + + /** + * Verifies a Vote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Vote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Vote + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Vote; + + /** + * Creates a plain object from a Vote message. Also converts values to other types if specified. + * @param message Vote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.gov.v1.Vote, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Vote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace transfer. */ + namespace transfer { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgTransfer. */ + interface IMsgTransfer { + + /** MsgTransfer sourcePort */ + sourcePort?: (string|null); + + /** MsgTransfer sourceChannel */ + sourceChannel?: (string|null); + + /** MsgTransfer amount */ + amount?: (cosmos_sdk.v1.ICoin[]|null); + + /** MsgTransfer sender */ + sender?: (Uint8Array|null); + + /** MsgTransfer receiver */ + receiver?: (string|null); + + /** MsgTransfer timeoutHeight */ + timeoutHeight?: (number|Long|null); + + /** MsgTransfer timeoutTimestamp */ + timeoutTimestamp?: (number|Long|null); + } + + /** Represents a MsgTransfer. */ + class MsgTransfer implements IMsgTransfer { + + /** + * Constructs a new MsgTransfer. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.transfer.v1.IMsgTransfer); + + /** MsgTransfer sourcePort. */ + public sourcePort: string; + + /** MsgTransfer sourceChannel. */ + public sourceChannel: string; + + /** MsgTransfer amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** MsgTransfer sender. */ + public sender: Uint8Array; + + /** MsgTransfer receiver. */ + public receiver: string; + + /** MsgTransfer timeoutHeight. */ + public timeoutHeight: (number|Long); + + /** MsgTransfer timeoutTimestamp. */ + public timeoutTimestamp: (number|Long); + + /** + * Creates a new MsgTransfer instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgTransfer instance + */ + public static create(properties?: cosmos_sdk.x.transfer.v1.IMsgTransfer): cosmos_sdk.x.transfer.v1.MsgTransfer; + + /** + * Encodes the specified MsgTransfer message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. + * @param message MsgTransfer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.transfer.v1.IMsgTransfer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. + * @param message MsgTransfer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.transfer.v1.IMsgTransfer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.transfer.v1.MsgTransfer; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.transfer.v1.MsgTransfer; + + /** + * Verifies a MsgTransfer message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgTransfer + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.transfer.v1.MsgTransfer; + + /** + * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. + * @param message MsgTransfer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.transfer.v1.MsgTransfer, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgTransfer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FungibleTokenPacketData. */ + interface IFungibleTokenPacketData { + + /** FungibleTokenPacketData amount */ + amount?: (cosmos_sdk.v1.ICoin[]|null); + + /** FungibleTokenPacketData sender */ + sender?: (string|null); + + /** FungibleTokenPacketData receiver */ + receiver?: (string|null); + } + + /** Represents a FungibleTokenPacketData. */ + class FungibleTokenPacketData implements IFungibleTokenPacketData { + + /** + * Constructs a new FungibleTokenPacketData. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData); + + /** FungibleTokenPacketData amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** FungibleTokenPacketData sender. */ + public sender: string; + + /** FungibleTokenPacketData receiver. */ + public receiver: string; + + /** + * Creates a new FungibleTokenPacketData instance using the specified properties. + * @param [properties] Properties to set + * @returns FungibleTokenPacketData instance + */ + public static create(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; + + /** + * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. + * @param message FungibleTokenPacketData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. + * @param message FungibleTokenPacketData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FungibleTokenPacketData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FungibleTokenPacketData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; + + /** + * Decodes a FungibleTokenPacketData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FungibleTokenPacketData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; + + /** + * Verifies a FungibleTokenPacketData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FungibleTokenPacketData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FungibleTokenPacketData + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; + + /** + * Creates a plain object from a FungibleTokenPacketData message. Also converts values to other types if specified. + * @param message FungibleTokenPacketData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.transfer.v1.FungibleTokenPacketData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FungibleTokenPacketData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FungibleTokenPacketAcknowledgement. */ + interface IFungibleTokenPacketAcknowledgement { + + /** FungibleTokenPacketAcknowledgement success */ + success?: (boolean|null); + + /** FungibleTokenPacketAcknowledgement error */ + error?: (string|null); + } + + /** Represents a FungibleTokenPacketAcknowledgement. */ + class FungibleTokenPacketAcknowledgement implements IFungibleTokenPacketAcknowledgement { + + /** + * Constructs a new FungibleTokenPacketAcknowledgement. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement); + + /** FungibleTokenPacketAcknowledgement success. */ + public success: boolean; + + /** FungibleTokenPacketAcknowledgement error. */ + public error: string; + + /** + * Creates a new FungibleTokenPacketAcknowledgement instance using the specified properties. + * @param [properties] Properties to set + * @returns FungibleTokenPacketAcknowledgement instance + */ + public static create(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; + + /** + * Encodes the specified FungibleTokenPacketAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. + * @param message FungibleTokenPacketAcknowledgement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FungibleTokenPacketAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. + * @param message FungibleTokenPacketAcknowledgement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FungibleTokenPacketAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; + + /** + * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FungibleTokenPacketAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; + + /** + * Verifies a FungibleTokenPacketAcknowledgement message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FungibleTokenPacketAcknowledgement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FungibleTokenPacketAcknowledgement + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; + + /** + * Creates a plain object from a FungibleTokenPacketAcknowledgement message. Also converts values to other types if specified. + * @param message FungibleTokenPacketAcknowledgement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FungibleTokenPacketAcknowledgement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace ibc. */ + namespace ibc { + + /** Namespace connection. */ + namespace connection { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgConnectionOpenInit. */ + interface IMsgConnectionOpenInit { + + /** MsgConnectionOpenInit clientId */ + clientId?: (string|null); + + /** MsgConnectionOpenInit connectionId */ + connectionId?: (string|null); + + /** MsgConnectionOpenInit counterparty */ + counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); + + /** MsgConnectionOpenInit signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgConnectionOpenInit. */ + class MsgConnectionOpenInit implements IMsgConnectionOpenInit { + + /** + * Constructs a new MsgConnectionOpenInit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit); + + /** MsgConnectionOpenInit clientId. */ + public clientId: string; + + /** MsgConnectionOpenInit connectionId. */ + public connectionId: string; + + /** MsgConnectionOpenInit counterparty. */ + public counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); + + /** MsgConnectionOpenInit signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgConnectionOpenInit instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgConnectionOpenInit instance + */ + public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; + + /** + * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. + * @param message MsgConnectionOpenInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. + * @param message MsgConnectionOpenInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgConnectionOpenInit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgConnectionOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; + + /** + * Decodes a MsgConnectionOpenInit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgConnectionOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; + + /** + * Verifies a MsgConnectionOpenInit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgConnectionOpenInit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgConnectionOpenInit + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; + + /** + * Creates a plain object from a MsgConnectionOpenInit message. Also converts values to other types if specified. + * @param message MsgConnectionOpenInit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgConnectionOpenInit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgConnectionOpenTry. */ + interface IMsgConnectionOpenTry { + + /** MsgConnectionOpenTry clientId */ + clientId?: (string|null); + + /** MsgConnectionOpenTry connectionId */ + connectionId?: (string|null); + + /** MsgConnectionOpenTry counterparty */ + counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); + + /** MsgConnectionOpenTry counterpartyVersions */ + counterpartyVersions?: (string[]|null); + + /** MsgConnectionOpenTry proofInit */ + proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenTry proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgConnectionOpenTry proofConsensus */ + proofConsensus?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenTry consensusHeight */ + consensusHeight?: (number|Long|null); + + /** MsgConnectionOpenTry signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgConnectionOpenTry. */ + class MsgConnectionOpenTry implements IMsgConnectionOpenTry { + + /** + * Constructs a new MsgConnectionOpenTry. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry); + + /** MsgConnectionOpenTry clientId. */ + public clientId: string; + + /** MsgConnectionOpenTry connectionId. */ + public connectionId: string; + + /** MsgConnectionOpenTry counterparty. */ + public counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); + + /** MsgConnectionOpenTry counterpartyVersions. */ + public counterpartyVersions: string[]; + + /** MsgConnectionOpenTry proofInit. */ + public proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenTry proofHeight. */ + public proofHeight: (number|Long); + + /** MsgConnectionOpenTry proofConsensus. */ + public proofConsensus?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenTry consensusHeight. */ + public consensusHeight: (number|Long); + + /** MsgConnectionOpenTry signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgConnectionOpenTry instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgConnectionOpenTry instance + */ + public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; + + /** + * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. + * @param message MsgConnectionOpenTry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. + * @param message MsgConnectionOpenTry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgConnectionOpenTry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgConnectionOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; + + /** + * Decodes a MsgConnectionOpenTry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgConnectionOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; + + /** + * Verifies a MsgConnectionOpenTry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgConnectionOpenTry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgConnectionOpenTry + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; + + /** + * Creates a plain object from a MsgConnectionOpenTry message. Also converts values to other types if specified. + * @param message MsgConnectionOpenTry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgConnectionOpenTry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgConnectionOpenAck. */ + interface IMsgConnectionOpenAck { + + /** MsgConnectionOpenAck connectionId */ + connectionId?: (string|null); + + /** MsgConnectionOpenAck version */ + version?: (string|null); + + /** MsgConnectionOpenAck proofTry */ + proofTry?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenAck proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgConnectionOpenAck proofConsensus */ + proofConsensus?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenAck consensusHeight */ + consensusHeight?: (number|Long|null); + + /** MsgConnectionOpenAck signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgConnectionOpenAck. */ + class MsgConnectionOpenAck implements IMsgConnectionOpenAck { + + /** + * Constructs a new MsgConnectionOpenAck. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck); + + /** MsgConnectionOpenAck connectionId. */ + public connectionId: string; + + /** MsgConnectionOpenAck version. */ + public version: string; + + /** MsgConnectionOpenAck proofTry. */ + public proofTry?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenAck proofHeight. */ + public proofHeight: (number|Long); + + /** MsgConnectionOpenAck proofConsensus. */ + public proofConsensus?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenAck consensusHeight. */ + public consensusHeight: (number|Long); + + /** MsgConnectionOpenAck signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgConnectionOpenAck instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgConnectionOpenAck instance + */ + public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; + + /** + * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. + * @param message MsgConnectionOpenAck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. + * @param message MsgConnectionOpenAck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgConnectionOpenAck message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgConnectionOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; + + /** + * Decodes a MsgConnectionOpenAck message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgConnectionOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; + + /** + * Verifies a MsgConnectionOpenAck message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgConnectionOpenAck message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgConnectionOpenAck + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; + + /** + * Creates a plain object from a MsgConnectionOpenAck message. Also converts values to other types if specified. + * @param message MsgConnectionOpenAck + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgConnectionOpenAck to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgConnectionOpenConfirm. */ + interface IMsgConnectionOpenConfirm { + + /** MsgConnectionOpenConfirm connectionId */ + connectionId?: (string|null); + + /** MsgConnectionOpenConfirm proofAck */ + proofAck?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenConfirm proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgConnectionOpenConfirm signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgConnectionOpenConfirm. */ + class MsgConnectionOpenConfirm implements IMsgConnectionOpenConfirm { + + /** + * Constructs a new MsgConnectionOpenConfirm. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm); + + /** MsgConnectionOpenConfirm connectionId. */ + public connectionId: string; + + /** MsgConnectionOpenConfirm proofAck. */ + public proofAck?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgConnectionOpenConfirm proofHeight. */ + public proofHeight: (number|Long); + + /** MsgConnectionOpenConfirm signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgConnectionOpenConfirm instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgConnectionOpenConfirm instance + */ + public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; + + /** + * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. + * @param message MsgConnectionOpenConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. + * @param message MsgConnectionOpenConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgConnectionOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; + + /** + * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgConnectionOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; + + /** + * Verifies a MsgConnectionOpenConfirm message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgConnectionOpenConfirm message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgConnectionOpenConfirm + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; + + /** + * Creates a plain object from a MsgConnectionOpenConfirm message. Also converts values to other types if specified. + * @param message MsgConnectionOpenConfirm + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgConnectionOpenConfirm to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ConnectionEnd. */ + interface IConnectionEnd { + + /** ConnectionEnd id */ + id?: (string|null); + + /** ConnectionEnd clientId */ + clientId?: (string|null); + + /** ConnectionEnd versions */ + versions?: (string[]|null); + + /** ConnectionEnd state */ + state?: (cosmos_sdk.x.ibc.connection.v1.State|null); + + /** ConnectionEnd counterparty */ + counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); + } + + /** Represents a ConnectionEnd. */ + class ConnectionEnd implements IConnectionEnd { + + /** + * Constructs a new ConnectionEnd. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd); + + /** ConnectionEnd id. */ + public id: string; + + /** ConnectionEnd clientId. */ + public clientId: string; + + /** ConnectionEnd versions. */ + public versions: string[]; + + /** ConnectionEnd state. */ + public state: cosmos_sdk.x.ibc.connection.v1.State; + + /** ConnectionEnd counterparty. */ + public counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); + + /** + * Creates a new ConnectionEnd instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectionEnd instance + */ + public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; + + /** + * Encodes the specified ConnectionEnd message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. + * @param message ConnectionEnd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. + * @param message ConnectionEnd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConnectionEnd message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectionEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; + + /** + * Decodes a ConnectionEnd message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectionEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; + + /** + * Verifies a ConnectionEnd message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConnectionEnd message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectionEnd + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; + + /** + * Creates a plain object from a ConnectionEnd message. Also converts values to other types if specified. + * @param message ConnectionEnd + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.connection.v1.ConnectionEnd, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConnectionEnd to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNINITIALIZED_UNSPECIFIED = 0, + STATE_INIT = 1, + STATE_TRYOPEN = 2, + STATE_OPEN = 3 + } + + /** Properties of a Counterparty. */ + interface ICounterparty { + + /** Counterparty clientId */ + clientId?: (string|null); + + /** Counterparty connectionId */ + connectionId?: (string|null); + + /** Counterparty prefix */ + prefix?: (cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix|null); + } + + /** Represents a Counterparty. */ + class Counterparty implements ICounterparty { + + /** + * Constructs a new Counterparty. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.ICounterparty); + + /** Counterparty clientId. */ + public clientId: string; + + /** Counterparty connectionId. */ + public connectionId: string; + + /** Counterparty prefix. */ + public prefix?: (cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix|null); + + /** + * Creates a new Counterparty instance using the specified properties. + * @param [properties] Properties to set + * @returns Counterparty instance + */ + public static create(properties?: cosmos_sdk.x.ibc.connection.v1.ICounterparty): cosmos_sdk.x.ibc.connection.v1.Counterparty; + + /** + * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. + * @param message Counterparty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.connection.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. + * @param message Counterparty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Counterparty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.Counterparty; + + /** + * Decodes a Counterparty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.Counterparty; + + /** + * Verifies a Counterparty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Counterparty + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.Counterparty; + + /** + * Creates a plain object from a Counterparty message. Also converts values to other types if specified. + * @param message Counterparty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.connection.v1.Counterparty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Counterparty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClientPaths. */ + interface IClientPaths { + + /** ClientPaths paths */ + paths?: (string[]|null); + } + + /** Represents a ClientPaths. */ + class ClientPaths implements IClientPaths { + + /** + * Constructs a new ClientPaths. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IClientPaths); + + /** ClientPaths paths. */ + public paths: string[]; + + /** + * Creates a new ClientPaths instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientPaths instance + */ + public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IClientPaths): cosmos_sdk.x.ibc.connection.v1.ClientPaths; + + /** + * Encodes the specified ClientPaths message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. + * @param message ClientPaths message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.connection.v1.IClientPaths, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientPaths message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. + * @param message ClientPaths message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IClientPaths, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientPaths message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.ClientPaths; + + /** + * Decodes a ClientPaths message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.ClientPaths; + + /** + * Verifies a ClientPaths message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientPaths message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientPaths + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.ClientPaths; + + /** + * Creates a plain object from a ClientPaths message. Also converts values to other types if specified. + * @param message ClientPaths + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.connection.v1.ClientPaths, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientPaths to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace channel. */ + namespace channel { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgChannelOpenInit. */ + interface IMsgChannelOpenInit { + + /** MsgChannelOpenInit portId */ + portId?: (string|null); + + /** MsgChannelOpenInit channelId */ + channelId?: (string|null); + + /** MsgChannelOpenInit channel */ + channel?: (cosmos_sdk.x.ibc.channel.v1.IChannel|null); + + /** MsgChannelOpenInit signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgChannelOpenInit. */ + class MsgChannelOpenInit implements IMsgChannelOpenInit { + + /** + * Constructs a new MsgChannelOpenInit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit); + + /** MsgChannelOpenInit portId. */ + public portId: string; + + /** MsgChannelOpenInit channelId. */ + public channelId: string; + + /** MsgChannelOpenInit channel. */ + public channel?: (cosmos_sdk.x.ibc.channel.v1.IChannel|null); + + /** MsgChannelOpenInit signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelOpenInit instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelOpenInit instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; + + /** + * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. + * @param message MsgChannelOpenInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. + * @param message MsgChannelOpenInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgChannelOpenInit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; + + /** + * Decodes a MsgChannelOpenInit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; + + /** + * Verifies a MsgChannelOpenInit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgChannelOpenInit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelOpenInit + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; + + /** + * Creates a plain object from a MsgChannelOpenInit message. Also converts values to other types if specified. + * @param message MsgChannelOpenInit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgChannelOpenInit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelOpenTry. */ + interface IMsgChannelOpenTry { + + /** MsgChannelOpenTry portId */ + portId?: (string|null); + + /** MsgChannelOpenTry channelId */ + channelId?: (string|null); + + /** MsgChannelOpenTry channel */ + channel?: (cosmos_sdk.x.ibc.channel.v1.IChannel|null); + + /** MsgChannelOpenTry counterpartyVersion */ + counterpartyVersion?: (string|null); + + /** MsgChannelOpenTry proofInit */ + proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgChannelOpenTry proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgChannelOpenTry signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgChannelOpenTry. */ + class MsgChannelOpenTry implements IMsgChannelOpenTry { + + /** + * Constructs a new MsgChannelOpenTry. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry); + + /** MsgChannelOpenTry portId. */ + public portId: string; + + /** MsgChannelOpenTry channelId. */ + public channelId: string; + + /** MsgChannelOpenTry channel. */ + public channel?: (cosmos_sdk.x.ibc.channel.v1.IChannel|null); + + /** MsgChannelOpenTry counterpartyVersion. */ + public counterpartyVersion: string; + + /** MsgChannelOpenTry proofInit. */ + public proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgChannelOpenTry proofHeight. */ + public proofHeight: (number|Long); + + /** MsgChannelOpenTry signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelOpenTry instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelOpenTry instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; + + /** + * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. + * @param message MsgChannelOpenTry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. + * @param message MsgChannelOpenTry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgChannelOpenTry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; + + /** + * Decodes a MsgChannelOpenTry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; + + /** + * Verifies a MsgChannelOpenTry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgChannelOpenTry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelOpenTry + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; + + /** + * Creates a plain object from a MsgChannelOpenTry message. Also converts values to other types if specified. + * @param message MsgChannelOpenTry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgChannelOpenTry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelOpenAck. */ + interface IMsgChannelOpenAck { + + /** MsgChannelOpenAck portId */ + portId?: (string|null); + + /** MsgChannelOpenAck channelId */ + channelId?: (string|null); + + /** MsgChannelOpenAck counterpartyVersion */ + counterpartyVersion?: (string|null); + + /** MsgChannelOpenAck proofTry */ + proofTry?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgChannelOpenAck proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgChannelOpenAck signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgChannelOpenAck. */ + class MsgChannelOpenAck implements IMsgChannelOpenAck { + + /** + * Constructs a new MsgChannelOpenAck. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck); + + /** MsgChannelOpenAck portId. */ + public portId: string; + + /** MsgChannelOpenAck channelId. */ + public channelId: string; + + /** MsgChannelOpenAck counterpartyVersion. */ + public counterpartyVersion: string; + + /** MsgChannelOpenAck proofTry. */ + public proofTry?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgChannelOpenAck proofHeight. */ + public proofHeight: (number|Long); + + /** MsgChannelOpenAck signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelOpenAck instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelOpenAck instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; + + /** + * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. + * @param message MsgChannelOpenAck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. + * @param message MsgChannelOpenAck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgChannelOpenAck message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; + + /** + * Decodes a MsgChannelOpenAck message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; + + /** + * Verifies a MsgChannelOpenAck message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgChannelOpenAck message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelOpenAck + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; + + /** + * Creates a plain object from a MsgChannelOpenAck message. Also converts values to other types if specified. + * @param message MsgChannelOpenAck + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgChannelOpenAck to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelOpenConfirm. */ + interface IMsgChannelOpenConfirm { + + /** MsgChannelOpenConfirm portId */ + portId?: (string|null); + + /** MsgChannelOpenConfirm channelId */ + channelId?: (string|null); + + /** MsgChannelOpenConfirm proofAck */ + proofAck?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgChannelOpenConfirm proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgChannelOpenConfirm signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgChannelOpenConfirm. */ + class MsgChannelOpenConfirm implements IMsgChannelOpenConfirm { + + /** + * Constructs a new MsgChannelOpenConfirm. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm); + + /** MsgChannelOpenConfirm portId. */ + public portId: string; + + /** MsgChannelOpenConfirm channelId. */ + public channelId: string; + + /** MsgChannelOpenConfirm proofAck. */ + public proofAck?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgChannelOpenConfirm proofHeight. */ + public proofHeight: (number|Long); + + /** MsgChannelOpenConfirm signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelOpenConfirm instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelOpenConfirm instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; + + /** + * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. + * @param message MsgChannelOpenConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. + * @param message MsgChannelOpenConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; + + /** + * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; + + /** + * Verifies a MsgChannelOpenConfirm message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgChannelOpenConfirm message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelOpenConfirm + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; + + /** + * Creates a plain object from a MsgChannelOpenConfirm message. Also converts values to other types if specified. + * @param message MsgChannelOpenConfirm + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgChannelOpenConfirm to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelCloseInit. */ + interface IMsgChannelCloseInit { + + /** MsgChannelCloseInit portId */ + portId?: (string|null); + + /** MsgChannelCloseInit channelId */ + channelId?: (string|null); + + /** MsgChannelCloseInit signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgChannelCloseInit. */ + class MsgChannelCloseInit implements IMsgChannelCloseInit { + + /** + * Constructs a new MsgChannelCloseInit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit); + + /** MsgChannelCloseInit portId. */ + public portId: string; + + /** MsgChannelCloseInit channelId. */ + public channelId: string; + + /** MsgChannelCloseInit signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelCloseInit instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelCloseInit instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; + + /** + * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. + * @param message MsgChannelCloseInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. + * @param message MsgChannelCloseInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgChannelCloseInit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelCloseInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; + + /** + * Decodes a MsgChannelCloseInit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelCloseInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; + + /** + * Verifies a MsgChannelCloseInit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgChannelCloseInit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelCloseInit + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; + + /** + * Creates a plain object from a MsgChannelCloseInit message. Also converts values to other types if specified. + * @param message MsgChannelCloseInit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgChannelCloseInit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelCloseConfirm. */ + interface IMsgChannelCloseConfirm { + + /** MsgChannelCloseConfirm portId */ + portId?: (string|null); + + /** MsgChannelCloseConfirm channelId */ + channelId?: (string|null); + + /** MsgChannelCloseConfirm proofInit */ + proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgChannelCloseConfirm proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgChannelCloseConfirm signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgChannelCloseConfirm. */ + class MsgChannelCloseConfirm implements IMsgChannelCloseConfirm { + + /** + * Constructs a new MsgChannelCloseConfirm. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm); + + /** MsgChannelCloseConfirm portId. */ + public portId: string; + + /** MsgChannelCloseConfirm channelId. */ + public channelId: string; + + /** MsgChannelCloseConfirm proofInit. */ + public proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgChannelCloseConfirm proofHeight. */ + public proofHeight: (number|Long); + + /** MsgChannelCloseConfirm signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelCloseConfirm instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelCloseConfirm instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; + + /** + * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. + * @param message MsgChannelCloseConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. + * @param message MsgChannelCloseConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelCloseConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; + + /** + * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelCloseConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; + + /** + * Verifies a MsgChannelCloseConfirm message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgChannelCloseConfirm message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelCloseConfirm + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; + + /** + * Creates a plain object from a MsgChannelCloseConfirm message. Also converts values to other types if specified. + * @param message MsgChannelCloseConfirm + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgChannelCloseConfirm to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgPacket. */ + interface IMsgPacket { + + /** MsgPacket packet */ + packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); + + /** MsgPacket proof */ + proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgPacket proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgPacket signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgPacket. */ + class MsgPacket implements IMsgPacket { + + /** + * Constructs a new MsgPacket. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket); + + /** MsgPacket packet. */ + public packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); + + /** MsgPacket proof. */ + public proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgPacket proofHeight. */ + public proofHeight: (number|Long); + + /** MsgPacket signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgPacket instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgPacket instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket): cosmos_sdk.x.ibc.channel.v1.MsgPacket; + + /** + * Encodes the specified MsgPacket message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. + * @param message MsgPacket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgPacket message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. + * @param message MsgPacket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgPacket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgPacket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgPacket; + + /** + * Decodes a MsgPacket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgPacket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgPacket; + + /** + * Verifies a MsgPacket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgPacket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgPacket + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgPacket; + + /** + * Creates a plain object from a MsgPacket message. Also converts values to other types if specified. + * @param message MsgPacket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgPacket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgPacket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgTimeout. */ + interface IMsgTimeout { + + /** MsgTimeout packet */ + packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); + + /** MsgTimeout proof */ + proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgTimeout proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgTimeout nextSequenceRecv */ + nextSequenceRecv?: (number|Long|null); + + /** MsgTimeout signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgTimeout. */ + class MsgTimeout implements IMsgTimeout { + + /** + * Constructs a new MsgTimeout. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout); + + /** MsgTimeout packet. */ + public packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); + + /** MsgTimeout proof. */ + public proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgTimeout proofHeight. */ + public proofHeight: (number|Long); + + /** MsgTimeout nextSequenceRecv. */ + public nextSequenceRecv: (number|Long); + + /** MsgTimeout signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgTimeout instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgTimeout instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; + + /** + * Encodes the specified MsgTimeout message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. + * @param message MsgTimeout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. + * @param message MsgTimeout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgTimeout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; + + /** + * Decodes a MsgTimeout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; + + /** + * Verifies a MsgTimeout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgTimeout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgTimeout + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; + + /** + * Creates a plain object from a MsgTimeout message. Also converts values to other types if specified. + * @param message MsgTimeout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgTimeout, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgTimeout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgAcknowledgement. */ + interface IMsgAcknowledgement { + + /** MsgAcknowledgement packet */ + packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); + + /** MsgAcknowledgement acknowledgement */ + acknowledgement?: (Uint8Array|null); + + /** MsgAcknowledgement proof */ + proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgAcknowledgement proofHeight */ + proofHeight?: (number|Long|null); + + /** MsgAcknowledgement signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgAcknowledgement. */ + class MsgAcknowledgement implements IMsgAcknowledgement { + + /** + * Constructs a new MsgAcknowledgement. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement); + + /** MsgAcknowledgement packet. */ + public packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); + + /** MsgAcknowledgement acknowledgement. */ + public acknowledgement: Uint8Array; + + /** MsgAcknowledgement proof. */ + public proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + + /** MsgAcknowledgement proofHeight. */ + public proofHeight: (number|Long); + + /** MsgAcknowledgement signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgAcknowledgement instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgAcknowledgement instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; + + /** + * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. + * @param message MsgAcknowledgement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. + * @param message MsgAcknowledgement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgAcknowledgement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; + + /** + * Decodes a MsgAcknowledgement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; + + /** + * Verifies a MsgAcknowledgement message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgAcknowledgement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgAcknowledgement + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; + + /** + * Creates a plain object from a MsgAcknowledgement message. Also converts values to other types if specified. + * @param message MsgAcknowledgement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgAcknowledgement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Channel. */ + interface IChannel { + + /** Channel state */ + state?: (cosmos_sdk.x.ibc.channel.v1.State|null); + + /** Channel ordering */ + ordering?: (cosmos_sdk.x.ibc.channel.v1.Order|null); + + /** Channel counterparty */ + counterparty?: (cosmos_sdk.x.ibc.channel.v1.ICounterparty|null); + + /** Channel connectionHops */ + connectionHops?: (string[]|null); + + /** Channel version */ + version?: (string|null); + } + + /** Represents a Channel. */ + class Channel implements IChannel { + + /** + * Constructs a new Channel. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IChannel); + + /** Channel state. */ + public state: cosmos_sdk.x.ibc.channel.v1.State; + + /** Channel ordering. */ + public ordering: cosmos_sdk.x.ibc.channel.v1.Order; + + /** Channel counterparty. */ + public counterparty?: (cosmos_sdk.x.ibc.channel.v1.ICounterparty|null); + + /** Channel connectionHops. */ + public connectionHops: string[]; + + /** Channel version. */ + public version: string; + + /** + * Creates a new Channel instance using the specified properties. + * @param [properties] Properties to set + * @returns Channel instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IChannel): cosmos_sdk.x.ibc.channel.v1.Channel; + + /** + * Encodes the specified Channel message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. + * @param message Channel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Channel message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. + * @param message Channel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IChannel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Channel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.Channel; + + /** + * Decodes a Channel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.Channel; + + /** + * Verifies a Channel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Channel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Channel + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Channel; + + /** + * Creates a plain object from a Channel message. Also converts values to other types if specified. + * @param message Channel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.Channel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Channel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNINITIALIZED_UNSPECIFIED = 0, + STATE_INIT = 1, + STATE_TRYOPEN = 2, + STATE_OPEN = 3, + STATE_CLOSED = 4 + } + + /** Order enum. */ + enum Order { + ORDER_NONE_UNSPECIFIED = 0, + ORDER_UNORDERED = 1, + ORDER_ORDERED = 2 + } + + /** Properties of a Counterparty. */ + interface ICounterparty { + + /** Counterparty portId */ + portId?: (string|null); + + /** Counterparty channelId */ + channelId?: (string|null); + } + + /** Represents a Counterparty. */ + class Counterparty implements ICounterparty { + + /** + * Constructs a new Counterparty. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.ICounterparty); + + /** Counterparty portId. */ + public portId: string; + + /** Counterparty channelId. */ + public channelId: string; + + /** + * Creates a new Counterparty instance using the specified properties. + * @param [properties] Properties to set + * @returns Counterparty instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.ICounterparty): cosmos_sdk.x.ibc.channel.v1.Counterparty; + + /** + * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. + * @param message Counterparty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. + * @param message Counterparty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Counterparty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.Counterparty; + + /** + * Decodes a Counterparty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.Counterparty; + + /** + * Verifies a Counterparty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Counterparty + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Counterparty; + + /** + * Creates a plain object from a Counterparty message. Also converts values to other types if specified. + * @param message Counterparty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.Counterparty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Counterparty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Packet. */ + interface IPacket { + + /** Packet sequence */ + sequence?: (number|Long|null); + + /** Packet sourcePort */ + sourcePort?: (string|null); + + /** Packet sourceChannel */ + sourceChannel?: (string|null); + + /** Packet destinationPort */ + destinationPort?: (string|null); + + /** Packet destinationChannel */ + destinationChannel?: (string|null); + + /** Packet data */ + data?: (Uint8Array|null); + + /** Packet timeoutHeight */ + timeoutHeight?: (number|Long|null); + + /** Packet timeoutTimestamp */ + timeoutTimestamp?: (number|Long|null); + } + + /** Represents a Packet. */ + class Packet implements IPacket { + + /** + * Constructs a new Packet. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IPacket); + + /** Packet sequence. */ + public sequence: (number|Long); + + /** Packet sourcePort. */ + public sourcePort: string; + + /** Packet sourceChannel. */ + public sourceChannel: string; + + /** Packet destinationPort. */ + public destinationPort: string; + + /** Packet destinationChannel. */ + public destinationChannel: string; + + /** Packet data. */ + public data: Uint8Array; + + /** Packet timeoutHeight. */ + public timeoutHeight: (number|Long); + + /** Packet timeoutTimestamp. */ + public timeoutTimestamp: (number|Long); + + /** + * Creates a new Packet instance using the specified properties. + * @param [properties] Properties to set + * @returns Packet instance + */ + public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IPacket): cosmos_sdk.x.ibc.channel.v1.Packet; + + /** + * Encodes the specified Packet message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. + * @param message Packet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.channel.v1.IPacket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Packet message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. + * @param message Packet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IPacket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Packet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Packet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.Packet; + + /** + * Decodes a Packet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Packet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.Packet; + + /** + * Verifies a Packet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Packet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Packet + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Packet; + + /** + * Creates a plain object from a Packet message. Also converts values to other types if specified. + * @param message Packet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.channel.v1.Packet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Packet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace commitment. */ + namespace commitment { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MerkleRoot. */ + interface IMerkleRoot { + + /** MerkleRoot hash */ + hash?: (Uint8Array|null); + } + + /** Represents a MerkleRoot. */ + class MerkleRoot implements IMerkleRoot { + + /** + * Constructs a new MerkleRoot. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot); + + /** MerkleRoot hash. */ + public hash: Uint8Array; + + /** + * Creates a new MerkleRoot instance using the specified properties. + * @param [properties] Properties to set + * @returns MerkleRoot instance + */ + public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; + + /** + * Encodes the specified MerkleRoot message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. + * @param message MerkleRoot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MerkleRoot message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. + * @param message MerkleRoot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MerkleRoot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerkleRoot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; + + /** + * Decodes a MerkleRoot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerkleRoot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; + + /** + * Verifies a MerkleRoot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MerkleRoot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerkleRoot + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; + + /** + * Creates a plain object from a MerkleRoot message. Also converts values to other types if specified. + * @param message MerkleRoot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.MerkleRoot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MerkleRoot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MerklePrefix. */ + interface IMerklePrefix { + + /** MerklePrefix keyPrefix */ + keyPrefix?: (Uint8Array|null); + } + + /** Represents a MerklePrefix. */ + class MerklePrefix implements IMerklePrefix { + + /** + * Constructs a new MerklePrefix. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix); + + /** MerklePrefix keyPrefix. */ + public keyPrefix: Uint8Array; + + /** + * Creates a new MerklePrefix instance using the specified properties. + * @param [properties] Properties to set + * @returns MerklePrefix instance + */ + public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; + + /** + * Encodes the specified MerklePrefix message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. + * @param message MerklePrefix message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. + * @param message MerklePrefix message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MerklePrefix message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerklePrefix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; + + /** + * Decodes a MerklePrefix message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerklePrefix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; + + /** + * Verifies a MerklePrefix message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MerklePrefix message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerklePrefix + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; + + /** + * Creates a plain object from a MerklePrefix message. Also converts values to other types if specified. + * @param message MerklePrefix + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.MerklePrefix, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MerklePrefix to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MerklePath. */ + interface IMerklePath { + + /** MerklePath keyPath */ + keyPath?: (cosmos_sdk.x.ibc.commitment.v1.IKeyPath|null); + } + + /** Represents a MerklePath. */ + class MerklePath implements IMerklePath { + + /** + * Constructs a new MerklePath. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath); + + /** MerklePath keyPath. */ + public keyPath?: (cosmos_sdk.x.ibc.commitment.v1.IKeyPath|null); + + /** + * Creates a new MerklePath instance using the specified properties. + * @param [properties] Properties to set + * @returns MerklePath instance + */ + public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath): cosmos_sdk.x.ibc.commitment.v1.MerklePath; + + /** + * Encodes the specified MerklePath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. + * @param message MerklePath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. + * @param message MerklePath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MerklePath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerklePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.MerklePath; + + /** + * Decodes a MerklePath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerklePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.MerklePath; + + /** + * Verifies a MerklePath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MerklePath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerklePath + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerklePath; + + /** + * Creates a plain object from a MerklePath message. Also converts values to other types if specified. + * @param message MerklePath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.MerklePath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MerklePath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MerkleProof. */ + interface IMerkleProof { + + /** MerkleProof proof */ + proof?: (tendermint.crypto.merkle.IProof|null); + } + + /** Represents a MerkleProof. */ + class MerkleProof implements IMerkleProof { + + /** + * Constructs a new MerkleProof. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof); + + /** MerkleProof proof. */ + public proof?: (tendermint.crypto.merkle.IProof|null); + + /** + * Creates a new MerkleProof instance using the specified properties. + * @param [properties] Properties to set + * @returns MerkleProof instance + */ + public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; + + /** + * Encodes the specified MerkleProof message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. + * @param message MerkleProof message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. + * @param message MerkleProof message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MerkleProof message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerkleProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; + + /** + * Decodes a MerkleProof message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerkleProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; + + /** + * Verifies a MerkleProof message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MerkleProof message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerkleProof + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; + + /** + * Creates a plain object from a MerkleProof message. Also converts values to other types if specified. + * @param message MerkleProof + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.MerkleProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MerkleProof to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyPath. */ + interface IKeyPath { + + /** KeyPath keys */ + keys?: (cosmos_sdk.x.ibc.commitment.v1.IKey[]|null); + } + + /** Represents a KeyPath. */ + class KeyPath implements IKeyPath { + + /** + * Constructs a new KeyPath. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath); + + /** KeyPath keys. */ + public keys: cosmos_sdk.x.ibc.commitment.v1.IKey[]; + + /** + * Creates a new KeyPath instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyPath instance + */ + public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath): cosmos_sdk.x.ibc.commitment.v1.KeyPath; + + /** + * Encodes the specified KeyPath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. + * @param message KeyPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyPath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. + * @param message KeyPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyPath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.KeyPath; + + /** + * Decodes a KeyPath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.KeyPath; + + /** + * Verifies a KeyPath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyPath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyPath + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.KeyPath; + + /** + * Creates a plain object from a KeyPath message. Also converts values to other types if specified. + * @param message KeyPath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.KeyPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyPath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Key. */ + interface IKey { + + /** Key name */ + name?: (Uint8Array|null); + + /** Key enc */ + enc?: (cosmos_sdk.x.ibc.commitment.v1.KeyEncoding|null); + } + + /** Represents a Key. */ + class Key implements IKey { + + /** + * Constructs a new Key. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IKey); + + /** Key name. */ + public name: Uint8Array; + + /** Key enc. */ + public enc: cosmos_sdk.x.ibc.commitment.v1.KeyEncoding; + + /** + * Creates a new Key instance using the specified properties. + * @param [properties] Properties to set + * @returns Key instance + */ + public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IKey): cosmos_sdk.x.ibc.commitment.v1.Key; + + /** + * Encodes the specified Key message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. + * @param message Key message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Key message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. + * @param message Key message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Key message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.Key; + + /** + * Decodes a Key message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.Key; + + /** + * Verifies a Key message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Key message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Key + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.Key; + + /** + * Creates a plain object from a Key message. Also converts values to other types if specified. + * @param message Key + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.Key, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Key to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** KeyEncoding enum. */ + enum KeyEncoding { + KEY_ENCODING_URL_UNSPECIFIED = 0, + KEY_ENCODING_HEX = 1 + } + } + } + } + + /** Namespace mint. */ + namespace mint { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a Minter. */ + interface IMinter { + + /** Minter inflation */ + inflation?: (string|null); + + /** Minter annualProvisions */ + annualProvisions?: (string|null); + } + + /** Represents a Minter. */ + class Minter implements IMinter { + + /** + * Constructs a new Minter. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.mint.v1.IMinter); + + /** Minter inflation. */ + public inflation: string; + + /** Minter annualProvisions. */ + public annualProvisions: string; + + /** + * Creates a new Minter instance using the specified properties. + * @param [properties] Properties to set + * @returns Minter instance + */ + public static create(properties?: cosmos_sdk.x.mint.v1.IMinter): cosmos_sdk.x.mint.v1.Minter; + + /** + * Encodes the specified Minter message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. + * @param message Minter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.mint.v1.IMinter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Minter message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. + * @param message Minter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.mint.v1.IMinter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Minter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Minter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.mint.v1.Minter; + + /** + * Decodes a Minter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Minter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.mint.v1.Minter; + + /** + * Verifies a Minter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Minter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Minter + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.mint.v1.Minter; + + /** + * Creates a plain object from a Minter message. Also converts values to other types if specified. + * @param message Minter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.mint.v1.Minter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Minter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Params. */ + interface IParams { + + /** Params mintDenom */ + mintDenom?: (string|null); + + /** Params inflationRateChange */ + inflationRateChange?: (string|null); + + /** Params inflationMax */ + inflationMax?: (string|null); + + /** Params inflationMin */ + inflationMin?: (string|null); + + /** Params goalBonded */ + goalBonded?: (string|null); + + /** Params blocksPerYear */ + blocksPerYear?: (number|Long|null); + } + + /** Represents a Params. */ + class Params implements IParams { + + /** + * Constructs a new Params. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.mint.v1.IParams); + + /** Params mintDenom. */ + public mintDenom: string; + + /** Params inflationRateChange. */ + public inflationRateChange: string; + + /** Params inflationMax. */ + public inflationMax: string; + + /** Params inflationMin. */ + public inflationMin: string; + + /** Params goalBonded. */ + public goalBonded: string; + + /** Params blocksPerYear. */ + public blocksPerYear: (number|Long); + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: cosmos_sdk.x.mint.v1.IParams): cosmos_sdk.x.mint.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.mint.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.mint.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.mint.v1.Params; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.mint.v1.Params; + + /** + * Verifies a Params message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Params + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.mint.v1.Params; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @param message Params + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.mint.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Params to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace params. */ + namespace params { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a ParameterChangeProposal. */ + interface IParameterChangeProposal { + + /** ParameterChangeProposal title */ + title?: (string|null); + + /** ParameterChangeProposal description */ + description?: (string|null); + + /** ParameterChangeProposal changes */ + changes?: (cosmos_sdk.x.params.v1.IParamChange[]|null); + } + + /** Represents a ParameterChangeProposal. */ + class ParameterChangeProposal implements IParameterChangeProposal { + + /** + * Constructs a new ParameterChangeProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.params.v1.IParameterChangeProposal); + + /** ParameterChangeProposal title. */ + public title: string; + + /** ParameterChangeProposal description. */ + public description: string; + + /** ParameterChangeProposal changes. */ + public changes: cosmos_sdk.x.params.v1.IParamChange[]; + + /** + * Creates a new ParameterChangeProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns ParameterChangeProposal instance + */ + public static create(properties?: cosmos_sdk.x.params.v1.IParameterChangeProposal): cosmos_sdk.x.params.v1.ParameterChangeProposal; + + /** + * Encodes the specified ParameterChangeProposal message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. + * @param message ParameterChangeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.params.v1.IParameterChangeProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParameterChangeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. + * @param message ParameterChangeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.params.v1.IParameterChangeProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParameterChangeProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParameterChangeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.params.v1.ParameterChangeProposal; + + /** + * Decodes a ParameterChangeProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParameterChangeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.params.v1.ParameterChangeProposal; + + /** + * Verifies a ParameterChangeProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParameterChangeProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParameterChangeProposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.params.v1.ParameterChangeProposal; + + /** + * Creates a plain object from a ParameterChangeProposal message. Also converts values to other types if specified. + * @param message ParameterChangeProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.params.v1.ParameterChangeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParameterChangeProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ParamChange. */ + interface IParamChange { + + /** ParamChange subspace */ + subspace?: (string|null); + + /** ParamChange key */ + key?: (string|null); + + /** ParamChange value */ + value?: (string|null); + } + + /** Represents a ParamChange. */ + class ParamChange implements IParamChange { + + /** + * Constructs a new ParamChange. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.params.v1.IParamChange); + + /** ParamChange subspace. */ + public subspace: string; + + /** ParamChange key. */ + public key: string; + + /** ParamChange value. */ + public value: string; + + /** + * Creates a new ParamChange instance using the specified properties. + * @param [properties] Properties to set + * @returns ParamChange instance + */ + public static create(properties?: cosmos_sdk.x.params.v1.IParamChange): cosmos_sdk.x.params.v1.ParamChange; + + /** + * Encodes the specified ParamChange message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. + * @param message ParamChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.params.v1.IParamChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParamChange message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. + * @param message ParamChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.params.v1.IParamChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParamChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParamChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.params.v1.ParamChange; + + /** + * Decodes a ParamChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParamChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.params.v1.ParamChange; + + /** + * Verifies a ParamChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParamChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParamChange + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.params.v1.ParamChange; + + /** + * Creates a plain object from a ParamChange message. Also converts values to other types if specified. + * @param message ParamChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.params.v1.ParamChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParamChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace slashing. */ + namespace slashing { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgUnjail. */ + interface IMsgUnjail { + + /** MsgUnjail validatorAddr */ + validatorAddr?: (Uint8Array|null); + } + + /** Represents a MsgUnjail. */ + class MsgUnjail implements IMsgUnjail { + + /** + * Constructs a new MsgUnjail. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.slashing.v1.IMsgUnjail); + + /** MsgUnjail validatorAddr. */ + public validatorAddr: Uint8Array; + + /** + * Creates a new MsgUnjail instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgUnjail instance + */ + public static create(properties?: cosmos_sdk.x.slashing.v1.IMsgUnjail): cosmos_sdk.x.slashing.v1.MsgUnjail; + + /** + * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. + * @param message MsgUnjail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.slashing.v1.IMsgUnjail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgUnjail message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. + * @param message MsgUnjail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.slashing.v1.IMsgUnjail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.slashing.v1.MsgUnjail; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.slashing.v1.MsgUnjail; + + /** + * Verifies a MsgUnjail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgUnjail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgUnjail + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.slashing.v1.MsgUnjail; + + /** + * Creates a plain object from a MsgUnjail message. Also converts values to other types if specified. + * @param message MsgUnjail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.slashing.v1.MsgUnjail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgUnjail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorSigningInfo. */ + interface IValidatorSigningInfo { + + /** ValidatorSigningInfo address */ + address?: (Uint8Array|null); + + /** ValidatorSigningInfo startHeight */ + startHeight?: (number|Long|null); + + /** ValidatorSigningInfo indexOffset */ + indexOffset?: (number|Long|null); + + /** ValidatorSigningInfo jailedUntil */ + jailedUntil?: (google.protobuf.ITimestamp|null); + + /** ValidatorSigningInfo tombstoned */ + tombstoned?: (boolean|null); + + /** ValidatorSigningInfo missedBlocksCounter */ + missedBlocksCounter?: (number|Long|null); + } + + /** Represents a ValidatorSigningInfo. */ + class ValidatorSigningInfo implements IValidatorSigningInfo { + + /** + * Constructs a new ValidatorSigningInfo. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo); + + /** ValidatorSigningInfo address. */ + public address: Uint8Array; + + /** ValidatorSigningInfo startHeight. */ + public startHeight: (number|Long); + + /** ValidatorSigningInfo indexOffset. */ + public indexOffset: (number|Long); + + /** ValidatorSigningInfo jailedUntil. */ + public jailedUntil?: (google.protobuf.ITimestamp|null); + + /** ValidatorSigningInfo tombstoned. */ + public tombstoned: boolean; + + /** ValidatorSigningInfo missedBlocksCounter. */ + public missedBlocksCounter: (number|Long); + + /** + * Creates a new ValidatorSigningInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSigningInfo instance + */ + public static create(properties?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; + + /** + * Encodes the specified ValidatorSigningInfo message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. + * @param message ValidatorSigningInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidatorSigningInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. + * @param message ValidatorSigningInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidatorSigningInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorSigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; + + /** + * Decodes a ValidatorSigningInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorSigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; + + /** + * Verifies a ValidatorSigningInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidatorSigningInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorSigningInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; + + /** + * Creates a plain object from a ValidatorSigningInfo message. Also converts values to other types if specified. + * @param message ValidatorSigningInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.slashing.v1.ValidatorSigningInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidatorSigningInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace staking. */ + namespace staking { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgCreateValidator. */ + interface IMsgCreateValidator { + + /** MsgCreateValidator description */ + description?: (cosmos_sdk.x.staking.v1.IDescription|null); + + /** MsgCreateValidator commission */ + commission?: (cosmos_sdk.x.staking.v1.ICommissionRates|null); + + /** MsgCreateValidator minSelfDelegation */ + minSelfDelegation?: (string|null); + + /** MsgCreateValidator delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** MsgCreateValidator validatorAddress */ + validatorAddress?: (Uint8Array|null); + + /** MsgCreateValidator pubkey */ + pubkey?: (string|null); + + /** MsgCreateValidator value */ + value?: (cosmos_sdk.v1.ICoin|null); + } + + /** Represents a MsgCreateValidator. */ + class MsgCreateValidator implements IMsgCreateValidator { + + /** + * Constructs a new MsgCreateValidator. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgCreateValidator); + + /** MsgCreateValidator description. */ + public description?: (cosmos_sdk.x.staking.v1.IDescription|null); + + /** MsgCreateValidator commission. */ + public commission?: (cosmos_sdk.x.staking.v1.ICommissionRates|null); + + /** MsgCreateValidator minSelfDelegation. */ + public minSelfDelegation: string; + + /** MsgCreateValidator delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgCreateValidator validatorAddress. */ + public validatorAddress: Uint8Array; + + /** MsgCreateValidator pubkey. */ + public pubkey: string; + + /** MsgCreateValidator value. */ + public value?: (cosmos_sdk.v1.ICoin|null); + + /** + * Creates a new MsgCreateValidator instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgCreateValidator instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IMsgCreateValidator): cosmos_sdk.x.staking.v1.MsgCreateValidator; + + /** + * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. + * @param message MsgCreateValidator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IMsgCreateValidator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgCreateValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. + * @param message MsgCreateValidator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgCreateValidator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgCreateValidator; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgCreateValidator; + + /** + * Verifies a MsgCreateValidator message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgCreateValidator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgCreateValidator + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgCreateValidator; + + /** + * Creates a plain object from a MsgCreateValidator message. Also converts values to other types if specified. + * @param message MsgCreateValidator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.MsgCreateValidator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgCreateValidator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgEditValidator. */ + interface IMsgEditValidator { + + /** MsgEditValidator description */ + description?: (cosmos_sdk.x.staking.v1.IDescription|null); + + /** MsgEditValidator validatorAddress */ + validatorAddress?: (Uint8Array|null); + + /** MsgEditValidator commissionRate */ + commissionRate?: (string|null); + + /** MsgEditValidator minSelfDelegation */ + minSelfDelegation?: (string|null); + } + + /** Represents a MsgEditValidator. */ + class MsgEditValidator implements IMsgEditValidator { + + /** + * Constructs a new MsgEditValidator. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgEditValidator); + + /** MsgEditValidator description. */ + public description?: (cosmos_sdk.x.staking.v1.IDescription|null); + + /** MsgEditValidator validatorAddress. */ + public validatorAddress: Uint8Array; + + /** MsgEditValidator commissionRate. */ + public commissionRate: string; + + /** MsgEditValidator minSelfDelegation. */ + public minSelfDelegation: string; + + /** + * Creates a new MsgEditValidator instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgEditValidator instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IMsgEditValidator): cosmos_sdk.x.staking.v1.MsgEditValidator; + + /** + * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. + * @param message MsgEditValidator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IMsgEditValidator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgEditValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. + * @param message MsgEditValidator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgEditValidator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgEditValidator; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgEditValidator; + + /** + * Verifies a MsgEditValidator message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgEditValidator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgEditValidator + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgEditValidator; + + /** + * Creates a plain object from a MsgEditValidator message. Also converts values to other types if specified. + * @param message MsgEditValidator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.MsgEditValidator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgEditValidator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgDelegate. */ + interface IMsgDelegate { + + /** MsgDelegate delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** MsgDelegate validatorAddress */ + validatorAddress?: (Uint8Array|null); + + /** MsgDelegate amount */ + amount?: (cosmos_sdk.v1.ICoin|null); + } + + /** Represents a MsgDelegate. */ + class MsgDelegate implements IMsgDelegate { + + /** + * Constructs a new MsgDelegate. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgDelegate); + + /** MsgDelegate delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgDelegate validatorAddress. */ + public validatorAddress: Uint8Array; + + /** MsgDelegate amount. */ + public amount?: (cosmos_sdk.v1.ICoin|null); + + /** + * Creates a new MsgDelegate instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgDelegate instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IMsgDelegate): cosmos_sdk.x.staking.v1.MsgDelegate; + + /** + * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. + * @param message MsgDelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IMsgDelegate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgDelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. + * @param message MsgDelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgDelegate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgDelegate; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgDelegate; + + /** + * Verifies a MsgDelegate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgDelegate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgDelegate + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgDelegate; + + /** + * Creates a plain object from a MsgDelegate message. Also converts values to other types if specified. + * @param message MsgDelegate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.MsgDelegate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgDelegate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgBeginRedelegate. */ + interface IMsgBeginRedelegate { + + /** MsgBeginRedelegate delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** MsgBeginRedelegate validatorSrcAddress */ + validatorSrcAddress?: (Uint8Array|null); + + /** MsgBeginRedelegate validatorDstAddress */ + validatorDstAddress?: (Uint8Array|null); + + /** MsgBeginRedelegate amount */ + amount?: (cosmos_sdk.v1.ICoin|null); + } + + /** Represents a MsgBeginRedelegate. */ + class MsgBeginRedelegate implements IMsgBeginRedelegate { + + /** + * Constructs a new MsgBeginRedelegate. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate); + + /** MsgBeginRedelegate delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgBeginRedelegate validatorSrcAddress. */ + public validatorSrcAddress: Uint8Array; + + /** MsgBeginRedelegate validatorDstAddress. */ + public validatorDstAddress: Uint8Array; + + /** MsgBeginRedelegate amount. */ + public amount?: (cosmos_sdk.v1.ICoin|null); + + /** + * Creates a new MsgBeginRedelegate instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgBeginRedelegate instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; + + /** + * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. + * @param message MsgBeginRedelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgBeginRedelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. + * @param message MsgBeginRedelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; + + /** + * Verifies a MsgBeginRedelegate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgBeginRedelegate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgBeginRedelegate + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; + + /** + * Creates a plain object from a MsgBeginRedelegate message. Also converts values to other types if specified. + * @param message MsgBeginRedelegate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.MsgBeginRedelegate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgBeginRedelegate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgUndelegate. */ + interface IMsgUndelegate { + + /** MsgUndelegate delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** MsgUndelegate validatorAddress */ + validatorAddress?: (Uint8Array|null); + + /** MsgUndelegate amount */ + amount?: (cosmos_sdk.v1.ICoin|null); + } + + /** Represents a MsgUndelegate. */ + class MsgUndelegate implements IMsgUndelegate { + + /** + * Constructs a new MsgUndelegate. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgUndelegate); + + /** MsgUndelegate delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgUndelegate validatorAddress. */ + public validatorAddress: Uint8Array; + + /** MsgUndelegate amount. */ + public amount?: (cosmos_sdk.v1.ICoin|null); + + /** + * Creates a new MsgUndelegate instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgUndelegate instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IMsgUndelegate): cosmos_sdk.x.staking.v1.MsgUndelegate; + + /** + * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. + * @param message MsgUndelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IMsgUndelegate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgUndelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. + * @param message MsgUndelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgUndelegate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgUndelegate; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgUndelegate; + + /** + * Verifies a MsgUndelegate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgUndelegate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgUndelegate + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgUndelegate; + + /** + * Creates a plain object from a MsgUndelegate message. Also converts values to other types if specified. + * @param message MsgUndelegate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.MsgUndelegate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgUndelegate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HistoricalInfo. */ + interface IHistoricalInfo { + + /** HistoricalInfo header */ + header?: (tendermint.abci.types.IHeader|null); + + /** HistoricalInfo valset */ + valset?: (cosmos_sdk.x.staking.v1.IValidator[]|null); + } + + /** Represents a HistoricalInfo. */ + class HistoricalInfo implements IHistoricalInfo { + + /** + * Constructs a new HistoricalInfo. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IHistoricalInfo); + + /** HistoricalInfo header. */ + public header?: (tendermint.abci.types.IHeader|null); + + /** HistoricalInfo valset. */ + public valset: cosmos_sdk.x.staking.v1.IValidator[]; + + /** + * Creates a new HistoricalInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns HistoricalInfo instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IHistoricalInfo): cosmos_sdk.x.staking.v1.HistoricalInfo; + + /** + * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. + * @param message HistoricalInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IHistoricalInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HistoricalInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. + * @param message HistoricalInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IHistoricalInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.HistoricalInfo; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.HistoricalInfo; + + /** + * Verifies a HistoricalInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HistoricalInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HistoricalInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.HistoricalInfo; + + /** + * Creates a plain object from a HistoricalInfo message. Also converts values to other types if specified. + * @param message HistoricalInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.HistoricalInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HistoricalInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommissionRates. */ + interface ICommissionRates { + + /** CommissionRates rate */ + rate?: (string|null); + + /** CommissionRates maxRate */ + maxRate?: (string|null); + + /** CommissionRates maxChangeRate */ + maxChangeRate?: (string|null); + } + + /** Represents a CommissionRates. */ + class CommissionRates implements ICommissionRates { + + /** + * Constructs a new CommissionRates. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.ICommissionRates); + + /** CommissionRates rate. */ + public rate: string; + + /** CommissionRates maxRate. */ + public maxRate: string; + + /** CommissionRates maxChangeRate. */ + public maxChangeRate: string; + + /** + * Creates a new CommissionRates instance using the specified properties. + * @param [properties] Properties to set + * @returns CommissionRates instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.ICommissionRates): cosmos_sdk.x.staking.v1.CommissionRates; + + /** + * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. + * @param message CommissionRates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.ICommissionRates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommissionRates message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. + * @param message CommissionRates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.ICommissionRates, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommissionRates message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.CommissionRates; + + /** + * Decodes a CommissionRates message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.CommissionRates; + + /** + * Verifies a CommissionRates message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommissionRates message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommissionRates + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.CommissionRates; + + /** + * Creates a plain object from a CommissionRates message. Also converts values to other types if specified. + * @param message CommissionRates + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.CommissionRates, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommissionRates to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Commission. */ + interface ICommission { + + /** Commission commissionRates */ + commissionRates?: (cosmos_sdk.x.staking.v1.ICommissionRates|null); + + /** Commission updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a Commission. */ + class Commission implements ICommission { + + /** + * Constructs a new Commission. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.ICommission); + + /** Commission commissionRates. */ + public commissionRates?: (cosmos_sdk.x.staking.v1.ICommissionRates|null); + + /** Commission updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new Commission instance using the specified properties. + * @param [properties] Properties to set + * @returns Commission instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.ICommission): cosmos_sdk.x.staking.v1.Commission; + + /** + * Encodes the specified Commission message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. + * @param message Commission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.ICommission, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Commission message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. + * @param message Commission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.ICommission, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Commission message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Commission; + + /** + * Decodes a Commission message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Commission; + + /** + * Verifies a Commission message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Commission message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Commission + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Commission; + + /** + * Creates a plain object from a Commission message. Also converts values to other types if specified. + * @param message Commission + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.Commission, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Commission to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Description. */ + interface IDescription { + + /** Description moniker */ + moniker?: (string|null); + + /** Description identity */ + identity?: (string|null); + + /** Description website */ + website?: (string|null); + + /** Description securityContact */ + securityContact?: (string|null); + + /** Description details */ + details?: (string|null); + } + + /** Represents a Description. */ + class Description implements IDescription { + + /** + * Constructs a new Description. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDescription); + + /** Description moniker. */ + public moniker: string; + + /** Description identity. */ + public identity: string; + + /** Description website. */ + public website: string; + + /** Description securityContact. */ + public securityContact: string; + + /** Description details. */ + public details: string; + + /** + * Creates a new Description instance using the specified properties. + * @param [properties] Properties to set + * @returns Description instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IDescription): cosmos_sdk.x.staking.v1.Description; + + /** + * Encodes the specified Description message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. + * @param message Description message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Description message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. + * @param message Description message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Description message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Description; + + /** + * Decodes a Description message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Description; + + /** + * Verifies a Description message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Description message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Description + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Description; + + /** + * Creates a plain object from a Description message. Also converts values to other types if specified. + * @param message Description + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.Description, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Description to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Validator. */ + interface IValidator { + + /** Validator operatorAddress */ + operatorAddress?: (Uint8Array|null); + + /** Validator consensusPubkey */ + consensusPubkey?: (string|null); + + /** Validator jailed */ + jailed?: (boolean|null); + + /** Validator status */ + status?: (number|null); + + /** Validator tokens */ + tokens?: (string|null); + + /** Validator delegatorShares */ + delegatorShares?: (string|null); + + /** Validator description */ + description?: (cosmos_sdk.x.staking.v1.IDescription|null); + + /** Validator unbondingHeight */ + unbondingHeight?: (number|Long|null); + + /** Validator unbondingTime */ + unbondingTime?: (google.protobuf.ITimestamp|null); + + /** Validator commission */ + commission?: (cosmos_sdk.x.staking.v1.ICommission|null); + + /** Validator minSelfDelegation */ + minSelfDelegation?: (string|null); + } + + /** Represents a Validator. */ + class Validator implements IValidator { + + /** + * Constructs a new Validator. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IValidator); + + /** Validator operatorAddress. */ + public operatorAddress: Uint8Array; + + /** Validator consensusPubkey. */ + public consensusPubkey: string; + + /** Validator jailed. */ + public jailed: boolean; + + /** Validator status. */ + public status: number; + + /** Validator tokens. */ + public tokens: string; + + /** Validator delegatorShares. */ + public delegatorShares: string; + + /** Validator description. */ + public description?: (cosmos_sdk.x.staking.v1.IDescription|null); + + /** Validator unbondingHeight. */ + public unbondingHeight: (number|Long); + + /** Validator unbondingTime. */ + public unbondingTime?: (google.protobuf.ITimestamp|null); + + /** Validator commission. */ + public commission?: (cosmos_sdk.x.staking.v1.ICommission|null); + + /** Validator minSelfDelegation. */ + public minSelfDelegation: string; + + /** + * Creates a new Validator instance using the specified properties. + * @param [properties] Properties to set + * @returns Validator instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IValidator): cosmos_sdk.x.staking.v1.Validator; + + /** + * Encodes the specified Validator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. + * @param message Validator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. + * @param message Validator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Validator; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Validator; + + /** + * Verifies a Validator message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Validator + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Validator; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @param message Validator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.Validator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Validator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DVPair. */ + interface IDVPair { + + /** DVPair delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** DVPair validatorAddress */ + validatorAddress?: (Uint8Array|null); + } + + /** Represents a DVPair. */ + class DVPair implements IDVPair { + + /** + * Constructs a new DVPair. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDVPair); + + /** DVPair delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** DVPair validatorAddress. */ + public validatorAddress: Uint8Array; + + /** + * Creates a new DVPair instance using the specified properties. + * @param [properties] Properties to set + * @returns DVPair instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IDVPair): cosmos_sdk.x.staking.v1.DVPair; + + /** + * Encodes the specified DVPair message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. + * @param message DVPair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IDVPair, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DVPair message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. + * @param message DVPair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDVPair, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DVPair message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.DVPair; + + /** + * Decodes a DVPair message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.DVPair; + + /** + * Verifies a DVPair message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DVPair message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DVPair + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVPair; + + /** + * Creates a plain object from a DVPair message. Also converts values to other types if specified. + * @param message DVPair + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.DVPair, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DVPair to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DVPairs. */ + interface IDVPairs { + + /** DVPairs pairs */ + pairs?: (cosmos_sdk.x.staking.v1.IDVPair[]|null); + } + + /** Represents a DVPairs. */ + class DVPairs implements IDVPairs { + + /** + * Constructs a new DVPairs. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDVPairs); + + /** DVPairs pairs. */ + public pairs: cosmos_sdk.x.staking.v1.IDVPair[]; + + /** + * Creates a new DVPairs instance using the specified properties. + * @param [properties] Properties to set + * @returns DVPairs instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IDVPairs): cosmos_sdk.x.staking.v1.DVPairs; + + /** + * Encodes the specified DVPairs message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. + * @param message DVPairs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IDVPairs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DVPairs message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. + * @param message DVPairs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDVPairs, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DVPairs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.DVPairs; + + /** + * Decodes a DVPairs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.DVPairs; + + /** + * Verifies a DVPairs message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DVPairs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DVPairs + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVPairs; + + /** + * Creates a plain object from a DVPairs message. Also converts values to other types if specified. + * @param message DVPairs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.DVPairs, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DVPairs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DVVTriplet. */ + interface IDVVTriplet { + + /** DVVTriplet delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** DVVTriplet validatorSrcAddress */ + validatorSrcAddress?: (Uint8Array|null); + + /** DVVTriplet validatorDstAddress */ + validatorDstAddress?: (Uint8Array|null); + } + + /** Represents a DVVTriplet. */ + class DVVTriplet implements IDVVTriplet { + + /** + * Constructs a new DVVTriplet. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDVVTriplet); + + /** DVVTriplet delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** DVVTriplet validatorSrcAddress. */ + public validatorSrcAddress: Uint8Array; + + /** DVVTriplet validatorDstAddress. */ + public validatorDstAddress: Uint8Array; + + /** + * Creates a new DVVTriplet instance using the specified properties. + * @param [properties] Properties to set + * @returns DVVTriplet instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IDVVTriplet): cosmos_sdk.x.staking.v1.DVVTriplet; + + /** + * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. + * @param message DVVTriplet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IDVVTriplet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DVVTriplet message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. + * @param message DVVTriplet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDVVTriplet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.DVVTriplet; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.DVVTriplet; + + /** + * Verifies a DVVTriplet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DVVTriplet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DVVTriplet + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVVTriplet; + + /** + * Creates a plain object from a DVVTriplet message. Also converts values to other types if specified. + * @param message DVVTriplet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.DVVTriplet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DVVTriplet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DVVTriplets. */ + interface IDVVTriplets { + + /** DVVTriplets triplets */ + triplets?: (cosmos_sdk.x.staking.v1.IDVVTriplet[]|null); + } + + /** Represents a DVVTriplets. */ + class DVVTriplets implements IDVVTriplets { + + /** + * Constructs a new DVVTriplets. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDVVTriplets); + + /** DVVTriplets triplets. */ + public triplets: cosmos_sdk.x.staking.v1.IDVVTriplet[]; + + /** + * Creates a new DVVTriplets instance using the specified properties. + * @param [properties] Properties to set + * @returns DVVTriplets instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IDVVTriplets): cosmos_sdk.x.staking.v1.DVVTriplets; + + /** + * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. + * @param message DVVTriplets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IDVVTriplets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DVVTriplets message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. + * @param message DVVTriplets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDVVTriplets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.DVVTriplets; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.DVVTriplets; + + /** + * Verifies a DVVTriplets message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DVVTriplets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DVVTriplets + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVVTriplets; + + /** + * Creates a plain object from a DVVTriplets message. Also converts values to other types if specified. + * @param message DVVTriplets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.DVVTriplets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DVVTriplets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Delegation. */ + interface IDelegation { + + /** Delegation delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** Delegation validatorAddress */ + validatorAddress?: (Uint8Array|null); + + /** Delegation shares */ + shares?: (string|null); + } + + /** Represents a Delegation. */ + class Delegation implements IDelegation { + + /** + * Constructs a new Delegation. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDelegation); + + /** Delegation delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** Delegation validatorAddress. */ + public validatorAddress: Uint8Array; + + /** Delegation shares. */ + public shares: string; + + /** + * Creates a new Delegation instance using the specified properties. + * @param [properties] Properties to set + * @returns Delegation instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IDelegation): cosmos_sdk.x.staking.v1.Delegation; + + /** + * Encodes the specified Delegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. + * @param message Delegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IDelegation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Delegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. + * @param message Delegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDelegation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Delegation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Delegation; + + /** + * Decodes a Delegation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Delegation; + + /** + * Verifies a Delegation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Delegation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Delegation + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Delegation; + + /** + * Creates a plain object from a Delegation message. Also converts values to other types if specified. + * @param message Delegation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.Delegation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Delegation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnbondingDelegation. */ + interface IUnbondingDelegation { + + /** UnbondingDelegation delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** UnbondingDelegation validatorAddress */ + validatorAddress?: (Uint8Array|null); + + /** UnbondingDelegation entries */ + entries?: (cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry[]|null); + } + + /** Represents an UnbondingDelegation. */ + class UnbondingDelegation implements IUnbondingDelegation { + + /** + * Constructs a new UnbondingDelegation. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegation); + + /** UnbondingDelegation delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** UnbondingDelegation validatorAddress. */ + public validatorAddress: Uint8Array; + + /** UnbondingDelegation entries. */ + public entries: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry[]; + + /** + * Creates a new UnbondingDelegation instance using the specified properties. + * @param [properties] Properties to set + * @returns UnbondingDelegation instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegation): cosmos_sdk.x.staking.v1.UnbondingDelegation; + + /** + * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. + * @param message UnbondingDelegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IUnbondingDelegation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnbondingDelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. + * @param message UnbondingDelegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IUnbondingDelegation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.UnbondingDelegation; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.UnbondingDelegation; + + /** + * Verifies an UnbondingDelegation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UnbondingDelegation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnbondingDelegation + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.UnbondingDelegation; + + /** + * Creates a plain object from an UnbondingDelegation message. Also converts values to other types if specified. + * @param message UnbondingDelegation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.UnbondingDelegation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnbondingDelegation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnbondingDelegationEntry. */ + interface IUnbondingDelegationEntry { + + /** UnbondingDelegationEntry creationHeight */ + creationHeight?: (number|Long|null); + + /** UnbondingDelegationEntry completionTime */ + completionTime?: (google.protobuf.ITimestamp|null); + + /** UnbondingDelegationEntry initialBalance */ + initialBalance?: (string|null); + + /** UnbondingDelegationEntry balance */ + balance?: (string|null); + } + + /** Represents an UnbondingDelegationEntry. */ + class UnbondingDelegationEntry implements IUnbondingDelegationEntry { + + /** + * Constructs a new UnbondingDelegationEntry. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry); + + /** UnbondingDelegationEntry creationHeight. */ + public creationHeight: (number|Long); + + /** UnbondingDelegationEntry completionTime. */ + public completionTime?: (google.protobuf.ITimestamp|null); + + /** UnbondingDelegationEntry initialBalance. */ + public initialBalance: string; + + /** UnbondingDelegationEntry balance. */ + public balance: string; + + /** + * Creates a new UnbondingDelegationEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns UnbondingDelegationEntry instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; + + /** + * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. + * @param message UnbondingDelegationEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnbondingDelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. + * @param message UnbondingDelegationEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; + + /** + * Verifies an UnbondingDelegationEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UnbondingDelegationEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnbondingDelegationEntry + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; + + /** + * Creates a plain object from an UnbondingDelegationEntry message. Also converts values to other types if specified. + * @param message UnbondingDelegationEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.UnbondingDelegationEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnbondingDelegationEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RedelegationEntry. */ + interface IRedelegationEntry { + + /** RedelegationEntry creationHeight */ + creationHeight?: (number|Long|null); + + /** RedelegationEntry completionTime */ + completionTime?: (google.protobuf.ITimestamp|null); + + /** RedelegationEntry initialBalance */ + initialBalance?: (string|null); + + /** RedelegationEntry sharesDst */ + sharesDst?: (string|null); + } + + /** Represents a RedelegationEntry. */ + class RedelegationEntry implements IRedelegationEntry { + + /** + * Constructs a new RedelegationEntry. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IRedelegationEntry); + + /** RedelegationEntry creationHeight. */ + public creationHeight: (number|Long); + + /** RedelegationEntry completionTime. */ + public completionTime?: (google.protobuf.ITimestamp|null); + + /** RedelegationEntry initialBalance. */ + public initialBalance: string; + + /** RedelegationEntry sharesDst. */ + public sharesDst: string; + + /** + * Creates a new RedelegationEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns RedelegationEntry instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IRedelegationEntry): cosmos_sdk.x.staking.v1.RedelegationEntry; + + /** + * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. + * @param message RedelegationEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IRedelegationEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. + * @param message RedelegationEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IRedelegationEntry, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.RedelegationEntry; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.RedelegationEntry; + + /** + * Verifies a RedelegationEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedelegationEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedelegationEntry + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.RedelegationEntry; + + /** + * Creates a plain object from a RedelegationEntry message. Also converts values to other types if specified. + * @param message RedelegationEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.RedelegationEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedelegationEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Redelegation. */ + interface IRedelegation { + + /** Redelegation delegatorAddress */ + delegatorAddress?: (Uint8Array|null); + + /** Redelegation validatorSrcAddress */ + validatorSrcAddress?: (Uint8Array|null); + + /** Redelegation validatorDstAddress */ + validatorDstAddress?: (Uint8Array|null); + + /** Redelegation entries */ + entries?: (cosmos_sdk.x.staking.v1.IRedelegationEntry[]|null); + } + + /** Represents a Redelegation. */ + class Redelegation implements IRedelegation { + + /** + * Constructs a new Redelegation. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IRedelegation); + + /** Redelegation delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** Redelegation validatorSrcAddress. */ + public validatorSrcAddress: Uint8Array; + + /** Redelegation validatorDstAddress. */ + public validatorDstAddress: Uint8Array; + + /** Redelegation entries. */ + public entries: cosmos_sdk.x.staking.v1.IRedelegationEntry[]; + + /** + * Creates a new Redelegation instance using the specified properties. + * @param [properties] Properties to set + * @returns Redelegation instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IRedelegation): cosmos_sdk.x.staking.v1.Redelegation; + + /** + * Encodes the specified Redelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. + * @param message Redelegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IRedelegation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Redelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. + * @param message Redelegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IRedelegation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Redelegation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Redelegation; + + /** + * Decodes a Redelegation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Redelegation; + + /** + * Verifies a Redelegation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Redelegation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Redelegation + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Redelegation; + + /** + * Creates a plain object from a Redelegation message. Also converts values to other types if specified. + * @param message Redelegation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.Redelegation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Redelegation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Params. */ + interface IParams { + + /** Params unbondingTime */ + unbondingTime?: (google.protobuf.IDuration|null); + + /** Params maxValidators */ + maxValidators?: (number|null); + + /** Params maxEntries */ + maxEntries?: (number|null); + + /** Params historicalEntries */ + historicalEntries?: (number|null); + + /** Params bondDenom */ + bondDenom?: (string|null); + } + + /** Represents a Params. */ + class Params implements IParams { + + /** + * Constructs a new Params. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IParams); + + /** Params unbondingTime. */ + public unbondingTime?: (google.protobuf.IDuration|null); + + /** Params maxValidators. */ + public maxValidators: number; + + /** Params maxEntries. */ + public maxEntries: number; + + /** Params historicalEntries. */ + public historicalEntries: number; + + /** Params bondDenom. */ + public bondDenom: string; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IParams): cosmos_sdk.x.staking.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.staking.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Params; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Params; + + /** + * Verifies a Params message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Params + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Params; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @param message Params + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.staking.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Params to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace upgrade. */ + namespace upgrade { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a Plan. */ + interface IPlan { + + /** Plan name */ + name?: (string|null); + + /** Plan time */ + time?: (google.protobuf.ITimestamp|null); + + /** Plan height */ + height?: (number|Long|null); + + /** Plan info */ + info?: (string|null); + } + + /** Represents a Plan. */ + class Plan implements IPlan { + + /** + * Constructs a new Plan. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.upgrade.v1.IPlan); + + /** Plan name. */ + public name: string; + + /** Plan time. */ + public time?: (google.protobuf.ITimestamp|null); + + /** Plan height. */ + public height: (number|Long); + + /** Plan info. */ + public info: string; + + /** + * Creates a new Plan instance using the specified properties. + * @param [properties] Properties to set + * @returns Plan instance + */ + public static create(properties?: cosmos_sdk.x.upgrade.v1.IPlan): cosmos_sdk.x.upgrade.v1.Plan; + + /** + * Encodes the specified Plan message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. + * @param message Plan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.upgrade.v1.IPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. + * @param message Plan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.upgrade.v1.IPlan, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Plan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.upgrade.v1.Plan; + + /** + * Decodes a Plan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.upgrade.v1.Plan; + + /** + * Verifies a Plan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Plan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Plan + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.upgrade.v1.Plan; + + /** + * Creates a plain object from a Plan message. Also converts values to other types if specified. + * @param message Plan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.upgrade.v1.Plan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Plan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SoftwareUpgradeProposal. */ + interface ISoftwareUpgradeProposal { + + /** SoftwareUpgradeProposal title */ + title?: (string|null); + + /** SoftwareUpgradeProposal description */ + description?: (string|null); + + /** SoftwareUpgradeProposal plan */ + plan?: (cosmos_sdk.x.upgrade.v1.IPlan|null); + } + + /** Represents a SoftwareUpgradeProposal. */ + class SoftwareUpgradeProposal implements ISoftwareUpgradeProposal { + + /** + * Constructs a new SoftwareUpgradeProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal); + + /** SoftwareUpgradeProposal title. */ + public title: string; + + /** SoftwareUpgradeProposal description. */ + public description: string; + + /** SoftwareUpgradeProposal plan. */ + public plan?: (cosmos_sdk.x.upgrade.v1.IPlan|null); + + /** + * Creates a new SoftwareUpgradeProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns SoftwareUpgradeProposal instance + */ + public static create(properties?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; + + /** + * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. + * @param message SoftwareUpgradeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. + * @param message SoftwareUpgradeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; + + /** + * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; + + /** + * Verifies a SoftwareUpgradeProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoftwareUpgradeProposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; + + /** + * Creates a plain object from a SoftwareUpgradeProposal message. Also converts values to other types if specified. + * @param message SoftwareUpgradeProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoftwareUpgradeProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelSoftwareUpgradeProposal. */ + interface ICancelSoftwareUpgradeProposal { + + /** CancelSoftwareUpgradeProposal title */ + title?: (string|null); + + /** CancelSoftwareUpgradeProposal description */ + description?: (string|null); + } + + /** Represents a CancelSoftwareUpgradeProposal. */ + class CancelSoftwareUpgradeProposal implements ICancelSoftwareUpgradeProposal { + + /** + * Constructs a new CancelSoftwareUpgradeProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal); + + /** CancelSoftwareUpgradeProposal title. */ + public title: string; + + /** CancelSoftwareUpgradeProposal description. */ + public description: string; + + /** + * Creates a new CancelSoftwareUpgradeProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelSoftwareUpgradeProposal instance + */ + public static create(properties?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; + + /** + * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. + * @param message CancelSoftwareUpgradeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelSoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. + * @param message CancelSoftwareUpgradeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelSoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; + + /** + * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelSoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; + + /** + * Verifies a CancelSoftwareUpgradeProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelSoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelSoftwareUpgradeProposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; + + /** + * Creates a plain object from a CancelSoftwareUpgradeProposal message. Also converts values to other types if specified. + * @param message CancelSoftwareUpgradeProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelSoftwareUpgradeProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace ibc. */ + namespace ibc { + + /** Namespace localhost. */ + namespace localhost { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a MsgCreateClient. */ + interface IMsgCreateClient { + + /** MsgCreateClient signer */ + signer?: (Uint8Array|null); + } + + /** Represents a MsgCreateClient. */ + class MsgCreateClient implements IMsgCreateClient { + + /** + * Constructs a new MsgCreateClient. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient); + + /** MsgCreateClient signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgCreateClient instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgCreateClient instance + */ + public static create(properties?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; + + /** + * Encodes the specified MsgCreateClient message. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. + * @param message MsgCreateClient message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. + * @param message MsgCreateClient message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; + + /** + * Verifies a MsgCreateClient message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgCreateClient + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; + + /** + * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. + * @param message MsgCreateClient + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: cosmos_sdk.ibc.localhost.v1.MsgCreateClient, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MsgCreateClient to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } +} + +/** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Request message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. + * @param message Request message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Request message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Request; + + /** + * Decodes a Request message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Request; + + /** + * Verifies a Request message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Request message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Request + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Request; + + /** + * Creates a plain object from a Request message. Also converts values to other types if specified. + * @param message Request + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Request to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestEcho. */ + interface IRequestEcho { + + /** RequestEcho message */ + message?: (string|null); + } + + /** Represents a RequestEcho. */ + class RequestEcho implements IRequestEcho { + + /** + * Constructs a new RequestEcho. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestEcho message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestEcho, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. + * @param message RequestEcho message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestEcho, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestEcho message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestEcho; + + /** + * Decodes a RequestEcho message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestEcho; + + /** + * Verifies a RequestEcho message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestEcho message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestEcho + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestEcho; + + /** + * Creates a plain object from a RequestEcho message. Also converts values to other types if specified. + * @param message RequestEcho + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestEcho, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestEcho to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestFlush. */ + interface IRequestFlush { + } + + /** Represents a RequestFlush. */ + class RequestFlush implements IRequestFlush { + + /** + * Constructs a new RequestFlush. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestFlush message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestFlush, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. + * @param message RequestFlush message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestFlush, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestFlush message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestFlush; + + /** + * Decodes a RequestFlush message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestFlush; + + /** + * Verifies a RequestFlush message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestFlush message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestFlush + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestFlush; + + /** + * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. + * @param message RequestFlush + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestFlush, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestFlush to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. + * @param message RequestInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestInfo; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestInfo; + + /** + * Verifies a RequestInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestInfo + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestInfo; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @param message RequestInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestSetOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestSetOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. + * @param message RequestSetOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestSetOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestSetOption; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestSetOption; + + /** + * Verifies a RequestSetOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestSetOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestSetOption + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestSetOption; + + /** + * Creates a plain object from a RequestSetOption message. Also converts values to other types if specified. + * @param message RequestSetOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestSetOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestSetOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestInitChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestInitChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. + * @param message RequestInitChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestInitChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestInitChain; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestInitChain; + + /** + * Verifies a RequestInitChain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestInitChain + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestInitChain; + + /** + * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. + * @param message RequestInitChain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestInitChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestInitChain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. + * @param message RequestQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestQuery; + + /** + * Decodes a RequestQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestQuery; + + /** + * Verifies a RequestQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestQuery + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestQuery; + + /** + * Creates a plain object from a RequestQuery message. Also converts values to other types if specified. + * @param message RequestQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestBeginBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestBeginBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. + * @param message RequestBeginBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestBeginBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestBeginBlock; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestBeginBlock; + + /** + * Verifies a RequestBeginBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestBeginBlock + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestBeginBlock; + + /** + * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. + * @param message RequestBeginBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestBeginBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestBeginBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestCheckTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestCheckTx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. + * @param message RequestCheckTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestCheckTx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestCheckTx; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestCheckTx; + + /** + * Verifies a RequestCheckTx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestCheckTx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestCheckTx + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestCheckTx; + + /** + * Creates a plain object from a RequestCheckTx message. Also converts values to other types if specified. + * @param message RequestCheckTx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestCheckTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestCheckTx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestDeliverTx. */ + interface IRequestDeliverTx { + + /** RequestDeliverTx tx */ + tx?: (Uint8Array|null); + } + + /** Represents a RequestDeliverTx. */ + class RequestDeliverTx implements IRequestDeliverTx { + + /** + * Constructs a new RequestDeliverTx. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestDeliverTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestDeliverTx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. + * @param message RequestDeliverTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestDeliverTx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestDeliverTx; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestDeliverTx; + + /** + * Verifies a RequestDeliverTx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestDeliverTx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestDeliverTx + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestDeliverTx; + + /** + * Creates a plain object from a RequestDeliverTx message. Also converts values to other types if specified. + * @param message RequestDeliverTx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestDeliverTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestDeliverTx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestEndBlock. */ + interface IRequestEndBlock { + + /** RequestEndBlock height */ + height?: (number|Long|null); + } + + /** Represents a RequestEndBlock. */ + class RequestEndBlock implements IRequestEndBlock { + + /** + * Constructs a new RequestEndBlock. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestEndBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestEndBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. + * @param message RequestEndBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestEndBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestEndBlock; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestEndBlock; + + /** + * Verifies a RequestEndBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestEndBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestEndBlock + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestEndBlock; + + /** + * Creates a plain object from a RequestEndBlock message. Also converts values to other types if specified. + * @param message RequestEndBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestEndBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestEndBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestCommit. */ + interface IRequestCommit { + } + + /** Represents a RequestCommit. */ + class RequestCommit implements IRequestCommit { + + /** + * Constructs a new RequestCommit. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestCommit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IRequestCommit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. + * @param message RequestCommit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IRequestCommit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestCommit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestCommit; + + /** + * Decodes a RequestCommit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestCommit; + + /** + * Verifies a RequestCommit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestCommit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestCommit + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestCommit; + + /** + * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. + * @param message RequestCommit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.RequestCommit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestCommit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Response message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. + * @param message Response message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Response message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Response; + + /** + * Decodes a Response message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Response; + + /** + * Verifies a Response message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Response message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Response + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Response; + + /** + * Creates a plain object from a Response message. Also converts values to other types if specified. + * @param message Response + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.Response, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Response to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResponseException. */ + interface IResponseException { + + /** ResponseException error */ + error?: (string|null); + } + + /** Represents a ResponseException. */ + class ResponseException implements IResponseException { + + /** + * Constructs a new ResponseException. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ResponseException message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseException, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. + * @param message ResponseException message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseException, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseException message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseException; + + /** + * Decodes a ResponseException message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseException; + + /** + * Verifies a ResponseException message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseException message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseException + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseException; + + /** + * Creates a plain object from a ResponseException message. Also converts values to other types if specified. + * @param message ResponseException + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseException, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseException to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResponseEcho. */ + interface IResponseEcho { + + /** ResponseEcho message */ + message?: (string|null); + } + + /** Represents a ResponseEcho. */ + class ResponseEcho implements IResponseEcho { + + /** + * Constructs a new ResponseEcho. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ResponseEcho message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseEcho, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. + * @param message ResponseEcho message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseEcho, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseEcho; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseEcho; + + /** + * Verifies a ResponseEcho message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseEcho message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseEcho + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseEcho; + + /** + * Creates a plain object from a ResponseEcho message. Also converts values to other types if specified. + * @param message ResponseEcho + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseEcho, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseEcho to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResponseFlush. */ + interface IResponseFlush { + } + + /** Represents a ResponseFlush. */ + class ResponseFlush implements IResponseFlush { + + /** + * Constructs a new ResponseFlush. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ResponseFlush message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseFlush, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. + * @param message ResponseFlush message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseFlush, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseFlush; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseFlush; + + /** + * Verifies a ResponseFlush message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseFlush message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseFlush + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseFlush; + + /** + * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. + * @param message ResponseFlush + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseFlush, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseFlush to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. + * @param message ResponseInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseInfo; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseInfo; + + /** + * Verifies a ResponseInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseInfo + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseInfo; + + /** + * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. + * @param message ResponseInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseSetOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseSetOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. + * @param message ResponseSetOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseSetOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseSetOption; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseSetOption; + + /** + * Verifies a ResponseSetOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseSetOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseSetOption + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseSetOption; + + /** + * Creates a plain object from a ResponseSetOption message. Also converts values to other types if specified. + * @param message ResponseSetOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseSetOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseSetOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseInitChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseInitChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. + * @param message ResponseInitChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseInitChain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseInitChain; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseInitChain; + + /** + * Verifies a ResponseInitChain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseInitChain + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseInitChain; + + /** + * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. + * @param message ResponseInitChain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseInitChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseInitChain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. + * @param message ResponseQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseQuery, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseQuery; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseQuery; + + /** + * Verifies a ResponseQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseQuery + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseQuery; + + /** + * Creates a plain object from a ResponseQuery message. Also converts values to other types if specified. + * @param message ResponseQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseBeginBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseBeginBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. + * @param message ResponseBeginBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseBeginBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseBeginBlock; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseBeginBlock; + + /** + * Verifies a ResponseBeginBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseBeginBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseBeginBlock + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseBeginBlock; + + /** + * Creates a plain object from a ResponseBeginBlock message. Also converts values to other types if specified. + * @param message ResponseBeginBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseBeginBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseBeginBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseCheckTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseCheckTx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. + * @param message ResponseCheckTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseCheckTx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseCheckTx; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseCheckTx; + + /** + * Verifies a ResponseCheckTx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseCheckTx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseCheckTx + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseCheckTx; + + /** + * Creates a plain object from a ResponseCheckTx message. Also converts values to other types if specified. + * @param message ResponseCheckTx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseCheckTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseCheckTx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseDeliverTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseDeliverTx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. + * @param message ResponseDeliverTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseDeliverTx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseDeliverTx; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseDeliverTx; + + /** + * Verifies a ResponseDeliverTx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseDeliverTx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseDeliverTx + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseDeliverTx; + + /** + * Creates a plain object from a ResponseDeliverTx message. Also converts values to other types if specified. + * @param message ResponseDeliverTx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseDeliverTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseDeliverTx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseEndBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseEndBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. + * @param message ResponseEndBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseEndBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseEndBlock; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseEndBlock; + + /** + * Verifies a ResponseEndBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseEndBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseEndBlock + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseEndBlock; + + /** + * Creates a plain object from a ResponseEndBlock message. Also converts values to other types if specified. + * @param message ResponseEndBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseEndBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseEndBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResponseCommit. */ + interface IResponseCommit { + + /** ResponseCommit data */ + data?: (Uint8Array|null); + } + + /** Represents a ResponseCommit. */ + class ResponseCommit implements IResponseCommit { + + /** + * Constructs a new ResponseCommit. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ResponseCommit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IResponseCommit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. + * @param message ResponseCommit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IResponseCommit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseCommit; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseCommit; + + /** + * Verifies a ResponseCommit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseCommit + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseCommit; + + /** + * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. + * @param message ResponseCommit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ResponseCommit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResponseCommit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ConsensusParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IConsensusParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. + * @param message ConsensusParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IConsensusParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ConsensusParams; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ConsensusParams; + + /** + * Verifies a ConsensusParams message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsensusParams + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ConsensusParams; + + /** + * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. + * @param message ConsensusParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ConsensusParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConsensusParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message BlockParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IBlockParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. + * @param message BlockParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IBlockParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.BlockParams; + + /** + * Decodes a BlockParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.BlockParams; + + /** + * Verifies a BlockParams message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlockParams + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.BlockParams; + + /** + * Creates a plain object from a BlockParams message. Also converts values to other types if specified. + * @param message BlockParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.BlockParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BlockParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message EvidenceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IEvidenceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. + * @param message EvidenceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IEvidenceParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.EvidenceParams; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.EvidenceParams; + + /** + * Verifies an EvidenceParams message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvidenceParams + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.EvidenceParams; + + /** + * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. + * @param message EvidenceParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.EvidenceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EvidenceParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorParams. */ + interface IValidatorParams { + + /** ValidatorParams pubKeyTypes */ + pubKeyTypes?: (string[]|null); + } + + /** Represents a ValidatorParams. */ + class ValidatorParams implements IValidatorParams { + + /** + * Constructs a new ValidatorParams. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ValidatorParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IValidatorParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. + * @param message ValidatorParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IValidatorParams, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ValidatorParams; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ValidatorParams; + + /** + * Verifies a ValidatorParams message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorParams + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ValidatorParams; + + /** + * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. + * @param message ValidatorParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ValidatorParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidatorParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message LastCommitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.ILastCommitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. + * @param message LastCommitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.ILastCommitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.LastCommitInfo; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.LastCommitInfo; + + /** + * Verifies a LastCommitInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LastCommitInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LastCommitInfo + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.LastCommitInfo; + + /** + * Creates a plain object from a LastCommitInfo message. Also converts values to other types if specified. + * @param message LastCommitInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.LastCommitInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LastCommitInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Event message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. + * @param message Event message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Event message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Event; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Event; + + /** + * Verifies an Event message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Event + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Event; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @param message Event + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.Event, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Event to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Header message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. + * @param message Header message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Header message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Header; + + /** + * Decodes a Header message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Header; + + /** + * Verifies a Header message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Header message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Header + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Header; + + /** + * Creates a plain object from a Header message. Also converts values to other types if specified. + * @param message Header + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Header to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Version message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Version message, length delimited. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. + * @param message Version message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Version message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Version; + + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Version; + + /** + * Verifies a Version message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Version message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Version + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Version; + + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @param message Version + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Version to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message BlockID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IBlockID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. + * @param message BlockID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IBlockID, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BlockID message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.BlockID; + + /** + * Decodes a BlockID message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.BlockID; + + /** + * Verifies a BlockID message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BlockID message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlockID + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.BlockID; + + /** + * Creates a plain object from a BlockID message. Also converts values to other types if specified. + * @param message BlockID + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.BlockID, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BlockID to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message PartSetHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IPartSetHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. + * @param message PartSetHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IPartSetHeader, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.PartSetHeader; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.PartSetHeader; + + /** + * Verifies a PartSetHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartSetHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartSetHeader + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.PartSetHeader; + + /** + * Creates a plain object from a PartSetHeader message. Also converts values to other types if specified. + * @param message PartSetHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.PartSetHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartSetHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Validator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. + * @param message Validator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Validator; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Validator; + + /** + * Verifies a Validator message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Validator + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Validator; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @param message Validator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.Validator, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Validator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ValidatorUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IValidatorUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. + * @param message ValidatorUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IValidatorUpdate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ValidatorUpdate; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ValidatorUpdate; + + /** + * Verifies a ValidatorUpdate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValidatorUpdate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorUpdate + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ValidatorUpdate; + + /** + * Creates a plain object from a ValidatorUpdate message. Also converts values to other types if specified. + * @param message ValidatorUpdate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.ValidatorUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValidatorUpdate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message VoteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IVoteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. + * @param message VoteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IVoteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VoteInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.VoteInfo; + + /** + * Decodes a VoteInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.VoteInfo; + + /** + * Verifies a VoteInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VoteInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VoteInfo + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.VoteInfo; + + /** + * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. + * @param message VoteInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.VoteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VoteInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message PubKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IPubKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubKey message, length delimited. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. + * @param message PubKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IPubKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.PubKey; + + /** + * Decodes a PubKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.PubKey; + + /** + * Verifies a PubKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubKey + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.PubKey; + + /** + * Creates a plain object from a PubKey message. Also converts values to other types if specified. + * @param message PubKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.PubKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Evidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.abci.types.IEvidence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. + * @param message Evidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.abci.types.IEvidence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Evidence; + + /** + * Decodes an Evidence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Evidence; + + /** + * Verifies an Evidence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Evidence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Evidence + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Evidence; + + /** + * Creates a plain object from an Evidence message. Also converts values to other types if specified. + * @param message Evidence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.abci.types.Evidence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Evidence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ProofOp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.crypto.merkle.IProofOp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. + * @param message ProofOp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.crypto.merkle.IProofOp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProofOp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.crypto.merkle.ProofOp; + + /** + * Decodes a ProofOp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.crypto.merkle.ProofOp; + + /** + * Verifies a ProofOp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProofOp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProofOp + */ + public static fromObject(object: { [k: string]: any }): tendermint.crypto.merkle.ProofOp; + + /** + * Creates a plain object from a ProofOp message. Also converts values to other types if specified. + * @param message ProofOp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.crypto.merkle.ProofOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProofOp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Proof message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.crypto.merkle.IProof, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. + * @param message Proof message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.crypto.merkle.IProof, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Proof message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.crypto.merkle.Proof; + + /** + * Decodes a Proof message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.crypto.merkle.Proof; + + /** + * Verifies a Proof message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Proof message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Proof + */ + public static fromObject(object: { [k: string]: any }): tendermint.crypto.merkle.Proof; + + /** + * Creates a plain object from a Proof message. Also converts values to other types if specified. + * @param message Proof + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.crypto.merkle.Proof, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Proof to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Pair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.libs.kv.IPair, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. + * @param message Pair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.libs.kv.IPair, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Pair message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.libs.kv.Pair; + + /** + * Decodes a Pair message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.libs.kv.Pair; + + /** + * Verifies a Pair message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Pair message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pair + */ + public static fromObject(object: { [k: string]: any }): tendermint.libs.kv.Pair; + + /** + * Creates a plain object from a Pair message. Also converts values to other types if specified. + * @param message Pair + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.libs.kv.Pair, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Pair to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message KI64Pair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.libs.kv.IKI64Pair, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KI64Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. + * @param message KI64Pair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: tendermint.libs.kv.IKI64Pair, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KI64Pair message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.libs.kv.KI64Pair; + + /** + * Decodes a KI64Pair message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.libs.kv.KI64Pair; + + /** + * Verifies a KI64Pair message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KI64Pair message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KI64Pair + */ + public static fromObject(object: { [k: string]: any }): tendermint.libs.kv.KI64Pair; + + /** + * Creates a plain object from a KI64Pair message. Also converts values to other types if specified. + * @param message KI64Pair + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: tendermint.libs.kv.KI64Pair, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KI64Pair to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } +} + +/** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; + + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .gogoproto.goprotoGettersAll */ + ".gogoproto.goprotoGettersAll"?: (boolean|null); + + /** FileOptions .gogoproto.goprotoEnumPrefixAll */ + ".gogoproto.goprotoEnumPrefixAll"?: (boolean|null); + + /** FileOptions .gogoproto.goprotoStringerAll */ + ".gogoproto.goprotoStringerAll"?: (boolean|null); + + /** FileOptions .gogoproto.verboseEqualAll */ + ".gogoproto.verboseEqualAll"?: (boolean|null); + + /** FileOptions .gogoproto.faceAll */ + ".gogoproto.faceAll"?: (boolean|null); + + /** FileOptions .gogoproto.gostringAll */ + ".gogoproto.gostringAll"?: (boolean|null); + + /** FileOptions .gogoproto.populateAll */ + ".gogoproto.populateAll"?: (boolean|null); + + /** FileOptions .gogoproto.stringerAll */ + ".gogoproto.stringerAll"?: (boolean|null); + + /** FileOptions .gogoproto.onlyoneAll */ + ".gogoproto.onlyoneAll"?: (boolean|null); + + /** FileOptions .gogoproto.equalAll */ + ".gogoproto.equalAll"?: (boolean|null); + + /** FileOptions .gogoproto.descriptionAll */ + ".gogoproto.descriptionAll"?: (boolean|null); + + /** FileOptions .gogoproto.testgenAll */ + ".gogoproto.testgenAll"?: (boolean|null); + + /** FileOptions .gogoproto.benchgenAll */ + ".gogoproto.benchgenAll"?: (boolean|null); + + /** FileOptions .gogoproto.marshalerAll */ + ".gogoproto.marshalerAll"?: (boolean|null); + + /** FileOptions .gogoproto.unmarshalerAll */ + ".gogoproto.unmarshalerAll"?: (boolean|null); + + /** FileOptions .gogoproto.stableMarshalerAll */ + ".gogoproto.stableMarshalerAll"?: (boolean|null); + + /** FileOptions .gogoproto.sizerAll */ + ".gogoproto.sizerAll"?: (boolean|null); + + /** FileOptions .gogoproto.goprotoEnumStringerAll */ + ".gogoproto.goprotoEnumStringerAll"?: (boolean|null); + + /** FileOptions .gogoproto.enumStringerAll */ + ".gogoproto.enumStringerAll"?: (boolean|null); + + /** FileOptions .gogoproto.unsafeMarshalerAll */ + ".gogoproto.unsafeMarshalerAll"?: (boolean|null); + + /** FileOptions .gogoproto.unsafeUnmarshalerAll */ + ".gogoproto.unsafeUnmarshalerAll"?: (boolean|null); + + /** FileOptions .gogoproto.goprotoExtensionsMapAll */ + ".gogoproto.goprotoExtensionsMapAll"?: (boolean|null); + + /** FileOptions .gogoproto.goprotoUnrecognizedAll */ + ".gogoproto.goprotoUnrecognizedAll"?: (boolean|null); + + /** FileOptions .gogoproto.gogoprotoImport */ + ".gogoproto.gogoprotoImport"?: (boolean|null); + + /** FileOptions .gogoproto.protosizerAll */ + ".gogoproto.protosizerAll"?: (boolean|null); + + /** FileOptions .gogoproto.compareAll */ + ".gogoproto.compareAll"?: (boolean|null); + + /** FileOptions .gogoproto.typedeclAll */ + ".gogoproto.typedeclAll"?: (boolean|null); + + /** FileOptions .gogoproto.enumdeclAll */ + ".gogoproto.enumdeclAll"?: (boolean|null); + + /** FileOptions .gogoproto.goprotoRegistration */ + ".gogoproto.goprotoRegistration"?: (boolean|null); + + /** FileOptions .gogoproto.messagenameAll */ + ".gogoproto.messagenameAll"?: (boolean|null); + + /** FileOptions .gogoproto.goprotoSizecacheAll */ + ".gogoproto.goprotoSizecacheAll"?: (boolean|null); + + /** FileOptions .gogoproto.goprotoUnkeyedAll */ + ".gogoproto.goprotoUnkeyedAll"?: (boolean|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .cosmos_proto.interfaceType */ + ".cosmos_proto.interfaceType"?: (string|null); + + /** MessageOptions .cosmos_proto.implementsInterface */ + ".cosmos_proto.implementsInterface"?: (string|null); + + /** MessageOptions .gogoproto.goprotoGetters */ + ".gogoproto.goprotoGetters"?: (boolean|null); + + /** MessageOptions .gogoproto.goprotoStringer */ + ".gogoproto.goprotoStringer"?: (boolean|null); + + /** MessageOptions .gogoproto.verboseEqual */ + ".gogoproto.verboseEqual"?: (boolean|null); + + /** MessageOptions .gogoproto.face */ + ".gogoproto.face"?: (boolean|null); + + /** MessageOptions .gogoproto.gostring */ + ".gogoproto.gostring"?: (boolean|null); + + /** MessageOptions .gogoproto.populate */ + ".gogoproto.populate"?: (boolean|null); + + /** MessageOptions .gogoproto.stringer */ + ".gogoproto.stringer"?: (boolean|null); + + /** MessageOptions .gogoproto.onlyone */ + ".gogoproto.onlyone"?: (boolean|null); + + /** MessageOptions .gogoproto.equal */ + ".gogoproto.equal"?: (boolean|null); + + /** MessageOptions .gogoproto.description */ + ".gogoproto.description"?: (boolean|null); + + /** MessageOptions .gogoproto.testgen */ + ".gogoproto.testgen"?: (boolean|null); + + /** MessageOptions .gogoproto.benchgen */ + ".gogoproto.benchgen"?: (boolean|null); + + /** MessageOptions .gogoproto.marshaler */ + ".gogoproto.marshaler"?: (boolean|null); + + /** MessageOptions .gogoproto.unmarshaler */ + ".gogoproto.unmarshaler"?: (boolean|null); + + /** MessageOptions .gogoproto.stableMarshaler */ + ".gogoproto.stableMarshaler"?: (boolean|null); + + /** MessageOptions .gogoproto.sizer */ + ".gogoproto.sizer"?: (boolean|null); + + /** MessageOptions .gogoproto.unsafeMarshaler */ + ".gogoproto.unsafeMarshaler"?: (boolean|null); + + /** MessageOptions .gogoproto.unsafeUnmarshaler */ + ".gogoproto.unsafeUnmarshaler"?: (boolean|null); + + /** MessageOptions .gogoproto.goprotoExtensionsMap */ + ".gogoproto.goprotoExtensionsMap"?: (boolean|null); + + /** MessageOptions .gogoproto.goprotoUnrecognized */ + ".gogoproto.goprotoUnrecognized"?: (boolean|null); + + /** MessageOptions .gogoproto.protosizer */ + ".gogoproto.protosizer"?: (boolean|null); + + /** MessageOptions .gogoproto.compare */ + ".gogoproto.compare"?: (boolean|null); + + /** MessageOptions .gogoproto.typedecl */ + ".gogoproto.typedecl"?: (boolean|null); + + /** MessageOptions .gogoproto.messagename */ + ".gogoproto.messagename"?: (boolean|null); + + /** MessageOptions .gogoproto.goprotoSizecache */ + ".gogoproto.goprotoSizecache"?: (boolean|null); + + /** MessageOptions .gogoproto.goprotoUnkeyed */ + ".gogoproto.goprotoUnkeyed"?: (boolean|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .cosmos_proto.acceptsInterface */ + ".cosmos_proto.acceptsInterface"?: (string|null); + + /** FieldOptions .gogoproto.nullable */ + ".gogoproto.nullable"?: (boolean|null); + + /** FieldOptions .gogoproto.embed */ + ".gogoproto.embed"?: (boolean|null); + + /** FieldOptions .gogoproto.customtype */ + ".gogoproto.customtype"?: (string|null); + + /** FieldOptions .gogoproto.customname */ + ".gogoproto.customname"?: (string|null); + + /** FieldOptions .gogoproto.jsontag */ + ".gogoproto.jsontag"?: (string|null); + + /** FieldOptions .gogoproto.moretags */ + ".gogoproto.moretags"?: (string|null); + + /** FieldOptions .gogoproto.casttype */ + ".gogoproto.casttype"?: (string|null); + + /** FieldOptions .gogoproto.castkey */ + ".gogoproto.castkey"?: (string|null); + + /** FieldOptions .gogoproto.castvalue */ + ".gogoproto.castvalue"?: (string|null); + + /** FieldOptions .gogoproto.stdtime */ + ".gogoproto.stdtime"?: (boolean|null); + + /** FieldOptions .gogoproto.stdduration */ + ".gogoproto.stdduration"?: (boolean|null); + + /** FieldOptions .gogoproto.wktpointer */ + ".gogoproto.wktpointer"?: (boolean|null); + + /** FieldOptions .gogoproto.castrepeated */ + ".gogoproto.castrepeated"?: (string|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** EnumOptions .gogoproto.goprotoEnumPrefix */ + ".gogoproto.goprotoEnumPrefix"?: (boolean|null); + + /** EnumOptions .gogoproto.goprotoEnumStringer */ + ".gogoproto.goprotoEnumStringer"?: (boolean|null); + + /** EnumOptions .gogoproto.enumStringer */ + ".gogoproto.enumStringer"?: (boolean|null); + + /** EnumOptions .gogoproto.enumCustomname */ + ".gogoproto.enumCustomname"?: (string|null); + + /** EnumOptions .gogoproto.enumdecl */ + ".gogoproto.enumdecl"?: (boolean|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** EnumValueOptions .gogoproto.enumvalueCustomname */ + ".gogoproto.enumvalueCustomname"?: (string|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: 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 [properties] Properties to set + */ + constructor(properties?: 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 message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} diff --git a/packages/protobuf-demo/src/generated/codecimpl.js b/packages/protobuf-demo/src/generated/codecimpl.js new file mode 100644 index 00000000..79d7f8cf --- /dev/null +++ b/packages/protobuf-demo/src/generated/codecimpl.js @@ -0,0 +1,58070 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +"use strict"; + +var $protobuf = require("protobufjs/minimal"); + +// Common aliases +var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + +// Exported root namespace +var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); + +$root.cosmos_sdk = (function() { + + /** + * Namespace cosmos_sdk. + * @exports cosmos_sdk + * @namespace + */ + var cosmos_sdk = {}; + + cosmos_sdk.codec = (function() { + + /** + * Namespace codec. + * @memberof cosmos_sdk + * @namespace + */ + var codec = {}; + + codec.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.codec + * @namespace + */ + var v1 = {}; + + v1.Dog = (function() { + + /** + * Properties of a Dog. + * @memberof cosmos_sdk.codec.v1 + * @interface IDog + * @property {string|null} [size] Dog size + * @property {string|null} [name] Dog name + */ + + /** + * Constructs a new Dog. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents a Dog. + * @implements IDog + * @constructor + * @param {cosmos_sdk.codec.v1.IDog=} [properties] Properties to set + */ + function Dog(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Dog size. + * @member {string} size + * @memberof cosmos_sdk.codec.v1.Dog + * @instance + */ + Dog.prototype.size = ""; + + /** + * Dog name. + * @member {string} name + * @memberof cosmos_sdk.codec.v1.Dog + * @instance + */ + Dog.prototype.name = ""; + + /** + * Creates a new Dog instance using the specified properties. + * @function create + * @memberof cosmos_sdk.codec.v1.Dog + * @static + * @param {cosmos_sdk.codec.v1.IDog=} [properties] Properties to set + * @returns {cosmos_sdk.codec.v1.Dog} Dog instance + */ + Dog.create = function create(properties) { + return new Dog(properties); + }; + + /** + * Encodes the specified Dog message. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.codec.v1.Dog + * @static + * @param {cosmos_sdk.codec.v1.IDog} message Dog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.size != null && Object.hasOwnProperty.call(message, "size")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.size); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified Dog message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.codec.v1.Dog + * @static + * @param {cosmos_sdk.codec.v1.IDog} message Dog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dog message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.codec.v1.Dog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.codec.v1.Dog} Dog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dog.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.Dog(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.size = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Dog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.codec.v1.Dog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.codec.v1.Dog} Dog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dog message. + * @function verify + * @memberof cosmos_sdk.codec.v1.Dog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dog.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.size != null && message.hasOwnProperty("size")) + if (!$util.isString(message.size)) + return "size: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a Dog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.codec.v1.Dog + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.codec.v1.Dog} Dog + */ + Dog.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.codec.v1.Dog) + return object; + var message = new $root.cosmos_sdk.codec.v1.Dog(); + if (object.size != null) + message.size = String(object.size); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a Dog message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.codec.v1.Dog + * @static + * @param {cosmos_sdk.codec.v1.Dog} message Dog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dog.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.size = ""; + object.name = ""; + } + if (message.size != null && message.hasOwnProperty("size")) + object.size = message.size; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Dog to JSON. + * @function toJSON + * @memberof cosmos_sdk.codec.v1.Dog + * @instance + * @returns {Object.} JSON object + */ + Dog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Dog; + })(); + + v1.Cat = (function() { + + /** + * Properties of a Cat. + * @memberof cosmos_sdk.codec.v1 + * @interface ICat + * @property {string|null} [moniker] Cat moniker + * @property {number|null} [lives] Cat lives + */ + + /** + * Constructs a new Cat. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents a Cat. + * @implements ICat + * @constructor + * @param {cosmos_sdk.codec.v1.ICat=} [properties] Properties to set + */ + function Cat(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Cat moniker. + * @member {string} moniker + * @memberof cosmos_sdk.codec.v1.Cat + * @instance + */ + Cat.prototype.moniker = ""; + + /** + * Cat lives. + * @member {number} lives + * @memberof cosmos_sdk.codec.v1.Cat + * @instance + */ + Cat.prototype.lives = 0; + + /** + * Creates a new Cat instance using the specified properties. + * @function create + * @memberof cosmos_sdk.codec.v1.Cat + * @static + * @param {cosmos_sdk.codec.v1.ICat=} [properties] Properties to set + * @returns {cosmos_sdk.codec.v1.Cat} Cat instance + */ + Cat.create = function create(properties) { + return new Cat(properties); + }; + + /** + * Encodes the specified Cat message. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.codec.v1.Cat + * @static + * @param {cosmos_sdk.codec.v1.ICat} message Cat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cat.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.moniker); + if (message.lives != null && Object.hasOwnProperty.call(message, "lives")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lives); + return writer; + }; + + /** + * Encodes the specified Cat message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.codec.v1.Cat + * @static + * @param {cosmos_sdk.codec.v1.ICat} message Cat message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cat.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cat message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.codec.v1.Cat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.codec.v1.Cat} Cat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cat.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.Cat(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.moniker = reader.string(); + break; + case 2: + message.lives = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cat message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.codec.v1.Cat + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.codec.v1.Cat} Cat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cat.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cat message. + * @function verify + * @memberof cosmos_sdk.codec.v1.Cat + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cat.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.moniker != null && message.hasOwnProperty("moniker")) + if (!$util.isString(message.moniker)) + return "moniker: string expected"; + if (message.lives != null && message.hasOwnProperty("lives")) + if (!$util.isInteger(message.lives)) + return "lives: integer expected"; + return null; + }; + + /** + * Creates a Cat message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.codec.v1.Cat + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.codec.v1.Cat} Cat + */ + Cat.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.codec.v1.Cat) + return object; + var message = new $root.cosmos_sdk.codec.v1.Cat(); + if (object.moniker != null) + message.moniker = String(object.moniker); + if (object.lives != null) + message.lives = object.lives | 0; + return message; + }; + + /** + * Creates a plain object from a Cat message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.codec.v1.Cat + * @static + * @param {cosmos_sdk.codec.v1.Cat} message Cat + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cat.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.moniker = ""; + object.lives = 0; + } + if (message.moniker != null && message.hasOwnProperty("moniker")) + object.moniker = message.moniker; + if (message.lives != null && message.hasOwnProperty("lives")) + object.lives = message.lives; + return object; + }; + + /** + * Converts this Cat to JSON. + * @function toJSON + * @memberof cosmos_sdk.codec.v1.Cat + * @instance + * @returns {Object.} JSON object + */ + Cat.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Cat; + })(); + + v1.HasAnimal = (function() { + + /** + * Properties of a HasAnimal. + * @memberof cosmos_sdk.codec.v1 + * @interface IHasAnimal + * @property {google.protobuf.IAny|null} [animal] HasAnimal animal + * @property {number|Long|null} [x] HasAnimal x + */ + + /** + * Constructs a new HasAnimal. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents a HasAnimal. + * @implements IHasAnimal + * @constructor + * @param {cosmos_sdk.codec.v1.IHasAnimal=} [properties] Properties to set + */ + function HasAnimal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HasAnimal animal. + * @member {google.protobuf.IAny|null|undefined} animal + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @instance + */ + HasAnimal.prototype.animal = null; + + /** + * HasAnimal x. + * @member {number|Long} x + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @instance + */ + HasAnimal.prototype.x = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HasAnimal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @static + * @param {cosmos_sdk.codec.v1.IHasAnimal=} [properties] Properties to set + * @returns {cosmos_sdk.codec.v1.HasAnimal} HasAnimal instance + */ + HasAnimal.create = function create(properties) { + return new HasAnimal(properties); + }; + + /** + * Encodes the specified HasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @static + * @param {cosmos_sdk.codec.v1.IHasAnimal} message HasAnimal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HasAnimal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.animal != null && Object.hasOwnProperty.call(message, "animal")) + $root.google.protobuf.Any.encode(message.animal, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.x != null && Object.hasOwnProperty.call(message, "x")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.x); + return writer; + }; + + /** + * Encodes the specified HasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @static + * @param {cosmos_sdk.codec.v1.IHasAnimal} message HasAnimal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HasAnimal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HasAnimal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.codec.v1.HasAnimal} HasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HasAnimal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.HasAnimal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.animal = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.x = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HasAnimal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.codec.v1.HasAnimal} HasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HasAnimal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HasAnimal message. + * @function verify + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HasAnimal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.animal != null && message.hasOwnProperty("animal")) { + var error = $root.google.protobuf.Any.verify(message.animal); + if (error) + return "animal." + error; + } + if (message.x != null && message.hasOwnProperty("x")) + if (!$util.isInteger(message.x) && !(message.x && $util.isInteger(message.x.low) && $util.isInteger(message.x.high))) + return "x: integer|Long expected"; + return null; + }; + + /** + * Creates a HasAnimal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.codec.v1.HasAnimal} HasAnimal + */ + HasAnimal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.codec.v1.HasAnimal) + return object; + var message = new $root.cosmos_sdk.codec.v1.HasAnimal(); + if (object.animal != null) { + if (typeof object.animal !== "object") + throw TypeError(".cosmos_sdk.codec.v1.HasAnimal.animal: object expected"); + message.animal = $root.google.protobuf.Any.fromObject(object.animal); + } + if (object.x != null) + if ($util.Long) + (message.x = $util.Long.fromValue(object.x)).unsigned = false; + else if (typeof object.x === "string") + message.x = parseInt(object.x, 10); + else if (typeof object.x === "number") + message.x = object.x; + else if (typeof object.x === "object") + message.x = new $util.LongBits(object.x.low >>> 0, object.x.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a HasAnimal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @static + * @param {cosmos_sdk.codec.v1.HasAnimal} message HasAnimal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HasAnimal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.animal = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.x = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.x = options.longs === String ? "0" : 0; + } + if (message.animal != null && message.hasOwnProperty("animal")) + object.animal = $root.google.protobuf.Any.toObject(message.animal, options); + if (message.x != null && message.hasOwnProperty("x")) + if (typeof message.x === "number") + object.x = options.longs === String ? String(message.x) : message.x; + else + object.x = options.longs === String ? $util.Long.prototype.toString.call(message.x) : options.longs === Number ? new $util.LongBits(message.x.low >>> 0, message.x.high >>> 0).toNumber() : message.x; + return object; + }; + + /** + * Converts this HasAnimal to JSON. + * @function toJSON + * @memberof cosmos_sdk.codec.v1.HasAnimal + * @instance + * @returns {Object.} JSON object + */ + HasAnimal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HasAnimal; + })(); + + v1.HasHasAnimal = (function() { + + /** + * Properties of a HasHasAnimal. + * @memberof cosmos_sdk.codec.v1 + * @interface IHasHasAnimal + * @property {google.protobuf.IAny|null} [hasAnimal] HasHasAnimal hasAnimal + */ + + /** + * Constructs a new HasHasAnimal. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents a HasHasAnimal. + * @implements IHasHasAnimal + * @constructor + * @param {cosmos_sdk.codec.v1.IHasHasAnimal=} [properties] Properties to set + */ + function HasHasAnimal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HasHasAnimal hasAnimal. + * @member {google.protobuf.IAny|null|undefined} hasAnimal + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @instance + */ + HasHasAnimal.prototype.hasAnimal = null; + + /** + * Creates a new HasHasAnimal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @static + * @param {cosmos_sdk.codec.v1.IHasHasAnimal=} [properties] Properties to set + * @returns {cosmos_sdk.codec.v1.HasHasAnimal} HasHasAnimal instance + */ + HasHasAnimal.create = function create(properties) { + return new HasHasAnimal(properties); + }; + + /** + * Encodes the specified HasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @static + * @param {cosmos_sdk.codec.v1.IHasHasAnimal} message HasHasAnimal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HasHasAnimal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hasAnimal != null && Object.hasOwnProperty.call(message, "hasAnimal")) + $root.google.protobuf.Any.encode(message.hasAnimal, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @static + * @param {cosmos_sdk.codec.v1.IHasHasAnimal} message HasHasAnimal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HasHasAnimal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HasHasAnimal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.codec.v1.HasHasAnimal} HasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HasHasAnimal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.HasHasAnimal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hasAnimal = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HasHasAnimal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.codec.v1.HasHasAnimal} HasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HasHasAnimal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HasHasAnimal message. + * @function verify + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HasHasAnimal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hasAnimal != null && message.hasOwnProperty("hasAnimal")) { + var error = $root.google.protobuf.Any.verify(message.hasAnimal); + if (error) + return "hasAnimal." + error; + } + return null; + }; + + /** + * Creates a HasHasAnimal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.codec.v1.HasHasAnimal} HasHasAnimal + */ + HasHasAnimal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.codec.v1.HasHasAnimal) + return object; + var message = new $root.cosmos_sdk.codec.v1.HasHasAnimal(); + if (object.hasAnimal != null) { + if (typeof object.hasAnimal !== "object") + throw TypeError(".cosmos_sdk.codec.v1.HasHasAnimal.hasAnimal: object expected"); + message.hasAnimal = $root.google.protobuf.Any.fromObject(object.hasAnimal); + } + return message; + }; + + /** + * Creates a plain object from a HasHasAnimal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @static + * @param {cosmos_sdk.codec.v1.HasHasAnimal} message HasHasAnimal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HasHasAnimal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.hasAnimal = null; + if (message.hasAnimal != null && message.hasOwnProperty("hasAnimal")) + object.hasAnimal = $root.google.protobuf.Any.toObject(message.hasAnimal, options); + return object; + }; + + /** + * Converts this HasHasAnimal to JSON. + * @function toJSON + * @memberof cosmos_sdk.codec.v1.HasHasAnimal + * @instance + * @returns {Object.} JSON object + */ + HasHasAnimal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HasHasAnimal; + })(); + + v1.HasHasHasAnimal = (function() { + + /** + * Properties of a HasHasHasAnimal. + * @memberof cosmos_sdk.codec.v1 + * @interface IHasHasHasAnimal + * @property {google.protobuf.IAny|null} [hasHasAnimal] HasHasHasAnimal hasHasAnimal + */ + + /** + * Constructs a new HasHasHasAnimal. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents a HasHasHasAnimal. + * @implements IHasHasHasAnimal + * @constructor + * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal=} [properties] Properties to set + */ + function HasHasHasAnimal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HasHasHasAnimal hasHasAnimal. + * @member {google.protobuf.IAny|null|undefined} hasHasAnimal + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @instance + */ + HasHasHasAnimal.prototype.hasHasAnimal = null; + + /** + * Creates a new HasHasHasAnimal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @static + * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal=} [properties] Properties to set + * @returns {cosmos_sdk.codec.v1.HasHasHasAnimal} HasHasHasAnimal instance + */ + HasHasHasAnimal.create = function create(properties) { + return new HasHasHasAnimal(properties); + }; + + /** + * Encodes the specified HasHasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @static + * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal} message HasHasHasAnimal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HasHasHasAnimal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hasHasAnimal != null && Object.hasOwnProperty.call(message, "hasHasAnimal")) + $root.google.protobuf.Any.encode(message.hasHasAnimal, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HasHasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @static + * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal} message HasHasHasAnimal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HasHasHasAnimal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HasHasHasAnimal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.codec.v1.HasHasHasAnimal} HasHasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HasHasHasAnimal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.HasHasHasAnimal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hasHasAnimal = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HasHasHasAnimal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.codec.v1.HasHasHasAnimal} HasHasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HasHasHasAnimal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HasHasHasAnimal message. + * @function verify + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HasHasHasAnimal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hasHasAnimal != null && message.hasOwnProperty("hasHasAnimal")) { + var error = $root.google.protobuf.Any.verify(message.hasHasAnimal); + if (error) + return "hasHasAnimal." + error; + } + return null; + }; + + /** + * Creates a HasHasHasAnimal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.codec.v1.HasHasHasAnimal} HasHasHasAnimal + */ + HasHasHasAnimal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.codec.v1.HasHasHasAnimal) + return object; + var message = new $root.cosmos_sdk.codec.v1.HasHasHasAnimal(); + if (object.hasHasAnimal != null) { + if (typeof object.hasHasAnimal !== "object") + throw TypeError(".cosmos_sdk.codec.v1.HasHasHasAnimal.hasHasAnimal: object expected"); + message.hasHasAnimal = $root.google.protobuf.Any.fromObject(object.hasHasAnimal); + } + return message; + }; + + /** + * Creates a plain object from a HasHasHasAnimal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @static + * @param {cosmos_sdk.codec.v1.HasHasHasAnimal} message HasHasHasAnimal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HasHasHasAnimal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.hasHasAnimal = null; + if (message.hasHasAnimal != null && message.hasOwnProperty("hasHasAnimal")) + object.hasHasAnimal = $root.google.protobuf.Any.toObject(message.hasHasAnimal, options); + return object; + }; + + /** + * Converts this HasHasHasAnimal to JSON. + * @function toJSON + * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal + * @instance + * @returns {Object.} JSON object + */ + HasHasHasAnimal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HasHasHasAnimal; + })(); + + v1.TestService = (function() { + + /** + * Constructs a new TestService service. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents a TestService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function TestService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (TestService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TestService; + + /** + * Creates new TestService service using the specified rpc implementation. + * @function create + * @memberof cosmos_sdk.codec.v1.TestService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {TestService} RPC service. Useful where requests and/or responses are streamed. + */ + TestService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos_sdk.codec.v1.TestService#echo}. + * @memberof cosmos_sdk.codec.v1.TestService + * @typedef EchoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos_sdk.codec.v1.EchoResponse} [response] EchoResponse + */ + + /** + * Calls Echo. + * @function echo + * @memberof cosmos_sdk.codec.v1.TestService + * @instance + * @param {cosmos_sdk.codec.v1.IEchoRequest} request EchoRequest message or plain object + * @param {cosmos_sdk.codec.v1.TestService.EchoCallback} callback Node-style callback called with the error, if any, and EchoResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestService.prototype.echo = function echo(request, callback) { + return this.rpcCall(echo, $root.cosmos_sdk.codec.v1.EchoRequest, $root.cosmos_sdk.codec.v1.EchoResponse, request, callback); + }, "name", { value: "Echo" }); + + /** + * Calls Echo. + * @function echo + * @memberof cosmos_sdk.codec.v1.TestService + * @instance + * @param {cosmos_sdk.codec.v1.IEchoRequest} request EchoRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos_sdk.codec.v1.TestService#sayHello}. + * @memberof cosmos_sdk.codec.v1.TestService + * @typedef SayHelloCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos_sdk.codec.v1.SayHelloResponse} [response] SayHelloResponse + */ + + /** + * Calls SayHello. + * @function sayHello + * @memberof cosmos_sdk.codec.v1.TestService + * @instance + * @param {cosmos_sdk.codec.v1.ISayHelloRequest} request SayHelloRequest message or plain object + * @param {cosmos_sdk.codec.v1.TestService.SayHelloCallback} callback Node-style callback called with the error, if any, and SayHelloResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(TestService.prototype.sayHello = function sayHello(request, callback) { + return this.rpcCall(sayHello, $root.cosmos_sdk.codec.v1.SayHelloRequest, $root.cosmos_sdk.codec.v1.SayHelloResponse, request, callback); + }, "name", { value: "SayHello" }); + + /** + * Calls SayHello. + * @function sayHello + * @memberof cosmos_sdk.codec.v1.TestService + * @instance + * @param {cosmos_sdk.codec.v1.ISayHelloRequest} request SayHelloRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return TestService; + })(); + + v1.EchoRequest = (function() { + + /** + * Properties of an EchoRequest. + * @memberof cosmos_sdk.codec.v1 + * @interface IEchoRequest + * @property {string|null} [message] EchoRequest message + */ + + /** + * Constructs a new EchoRequest. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents an EchoRequest. + * @implements IEchoRequest + * @constructor + * @param {cosmos_sdk.codec.v1.IEchoRequest=} [properties] Properties to set + */ + function EchoRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EchoRequest message. + * @member {string} message + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @instance + */ + EchoRequest.prototype.message = ""; + + /** + * Creates a new EchoRequest instance using the specified properties. + * @function create + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @static + * @param {cosmos_sdk.codec.v1.IEchoRequest=} [properties] Properties to set + * @returns {cosmos_sdk.codec.v1.EchoRequest} EchoRequest instance + */ + EchoRequest.create = function create(properties) { + return new EchoRequest(properties); + }; + + /** + * Encodes the specified EchoRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @static + * @param {cosmos_sdk.codec.v1.IEchoRequest} message EchoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EchoRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified EchoRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @static + * @param {cosmos_sdk.codec.v1.IEchoRequest} message EchoRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EchoRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EchoRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.codec.v1.EchoRequest} EchoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EchoRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.EchoRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EchoRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.codec.v1.EchoRequest} EchoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EchoRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EchoRequest message. + * @function verify + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EchoRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates an EchoRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.codec.v1.EchoRequest} EchoRequest + */ + EchoRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.codec.v1.EchoRequest) + return object; + var message = new $root.cosmos_sdk.codec.v1.EchoRequest(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from an EchoRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @static + * @param {cosmos_sdk.codec.v1.EchoRequest} message EchoRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EchoRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this EchoRequest to JSON. + * @function toJSON + * @memberof cosmos_sdk.codec.v1.EchoRequest + * @instance + * @returns {Object.} JSON object + */ + EchoRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EchoRequest; + })(); + + v1.EchoResponse = (function() { + + /** + * Properties of an EchoResponse. + * @memberof cosmos_sdk.codec.v1 + * @interface IEchoResponse + * @property {string|null} [message] EchoResponse message + */ + + /** + * Constructs a new EchoResponse. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents an EchoResponse. + * @implements IEchoResponse + * @constructor + * @param {cosmos_sdk.codec.v1.IEchoResponse=} [properties] Properties to set + */ + function EchoResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EchoResponse message. + * @member {string} message + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @instance + */ + EchoResponse.prototype.message = ""; + + /** + * Creates a new EchoResponse instance using the specified properties. + * @function create + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @static + * @param {cosmos_sdk.codec.v1.IEchoResponse=} [properties] Properties to set + * @returns {cosmos_sdk.codec.v1.EchoResponse} EchoResponse instance + */ + EchoResponse.create = function create(properties) { + return new EchoResponse(properties); + }; + + /** + * Encodes the specified EchoResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @static + * @param {cosmos_sdk.codec.v1.IEchoResponse} message EchoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EchoResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified EchoResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @static + * @param {cosmos_sdk.codec.v1.IEchoResponse} message EchoResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EchoResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EchoResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.codec.v1.EchoResponse} EchoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EchoResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.EchoResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EchoResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.codec.v1.EchoResponse} EchoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EchoResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EchoResponse message. + * @function verify + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EchoResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates an EchoResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.codec.v1.EchoResponse} EchoResponse + */ + EchoResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.codec.v1.EchoResponse) + return object; + var message = new $root.cosmos_sdk.codec.v1.EchoResponse(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from an EchoResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @static + * @param {cosmos_sdk.codec.v1.EchoResponse} message EchoResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EchoResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this EchoResponse to JSON. + * @function toJSON + * @memberof cosmos_sdk.codec.v1.EchoResponse + * @instance + * @returns {Object.} JSON object + */ + EchoResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EchoResponse; + })(); + + v1.SayHelloRequest = (function() { + + /** + * Properties of a SayHelloRequest. + * @memberof cosmos_sdk.codec.v1 + * @interface ISayHelloRequest + * @property {string|null} [name] SayHelloRequest name + */ + + /** + * Constructs a new SayHelloRequest. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents a SayHelloRequest. + * @implements ISayHelloRequest + * @constructor + * @param {cosmos_sdk.codec.v1.ISayHelloRequest=} [properties] Properties to set + */ + function SayHelloRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SayHelloRequest name. + * @member {string} name + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @instance + */ + SayHelloRequest.prototype.name = ""; + + /** + * Creates a new SayHelloRequest instance using the specified properties. + * @function create + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @static + * @param {cosmos_sdk.codec.v1.ISayHelloRequest=} [properties] Properties to set + * @returns {cosmos_sdk.codec.v1.SayHelloRequest} SayHelloRequest instance + */ + SayHelloRequest.create = function create(properties) { + return new SayHelloRequest(properties); + }; + + /** + * Encodes the specified SayHelloRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @static + * @param {cosmos_sdk.codec.v1.ISayHelloRequest} message SayHelloRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SayHelloRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified SayHelloRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @static + * @param {cosmos_sdk.codec.v1.ISayHelloRequest} message SayHelloRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SayHelloRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SayHelloRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.codec.v1.SayHelloRequest} SayHelloRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SayHelloRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.SayHelloRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SayHelloRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.codec.v1.SayHelloRequest} SayHelloRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SayHelloRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SayHelloRequest message. + * @function verify + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SayHelloRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a SayHelloRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.codec.v1.SayHelloRequest} SayHelloRequest + */ + SayHelloRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.codec.v1.SayHelloRequest) + return object; + var message = new $root.cosmos_sdk.codec.v1.SayHelloRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a SayHelloRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @static + * @param {cosmos_sdk.codec.v1.SayHelloRequest} message SayHelloRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SayHelloRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this SayHelloRequest to JSON. + * @function toJSON + * @memberof cosmos_sdk.codec.v1.SayHelloRequest + * @instance + * @returns {Object.} JSON object + */ + SayHelloRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SayHelloRequest; + })(); + + v1.SayHelloResponse = (function() { + + /** + * Properties of a SayHelloResponse. + * @memberof cosmos_sdk.codec.v1 + * @interface ISayHelloResponse + * @property {string|null} [greeting] SayHelloResponse greeting + */ + + /** + * Constructs a new SayHelloResponse. + * @memberof cosmos_sdk.codec.v1 + * @classdesc Represents a SayHelloResponse. + * @implements ISayHelloResponse + * @constructor + * @param {cosmos_sdk.codec.v1.ISayHelloResponse=} [properties] Properties to set + */ + function SayHelloResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SayHelloResponse greeting. + * @member {string} greeting + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @instance + */ + SayHelloResponse.prototype.greeting = ""; + + /** + * Creates a new SayHelloResponse instance using the specified properties. + * @function create + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @static + * @param {cosmos_sdk.codec.v1.ISayHelloResponse=} [properties] Properties to set + * @returns {cosmos_sdk.codec.v1.SayHelloResponse} SayHelloResponse instance + */ + SayHelloResponse.create = function create(properties) { + return new SayHelloResponse(properties); + }; + + /** + * Encodes the specified SayHelloResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @static + * @param {cosmos_sdk.codec.v1.ISayHelloResponse} message SayHelloResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SayHelloResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.greeting != null && Object.hasOwnProperty.call(message, "greeting")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.greeting); + return writer; + }; + + /** + * Encodes the specified SayHelloResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @static + * @param {cosmos_sdk.codec.v1.ISayHelloResponse} message SayHelloResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SayHelloResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SayHelloResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.codec.v1.SayHelloResponse} SayHelloResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SayHelloResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.SayHelloResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.greeting = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SayHelloResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.codec.v1.SayHelloResponse} SayHelloResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SayHelloResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SayHelloResponse message. + * @function verify + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SayHelloResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.greeting != null && message.hasOwnProperty("greeting")) + if (!$util.isString(message.greeting)) + return "greeting: string expected"; + return null; + }; + + /** + * Creates a SayHelloResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.codec.v1.SayHelloResponse} SayHelloResponse + */ + SayHelloResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.codec.v1.SayHelloResponse) + return object; + var message = new $root.cosmos_sdk.codec.v1.SayHelloResponse(); + if (object.greeting != null) + message.greeting = String(object.greeting); + return message; + }; + + /** + * Creates a plain object from a SayHelloResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @static + * @param {cosmos_sdk.codec.v1.SayHelloResponse} message SayHelloResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SayHelloResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.greeting = ""; + if (message.greeting != null && message.hasOwnProperty("greeting")) + object.greeting = message.greeting; + return object; + }; + + /** + * Converts this SayHelloResponse to JSON. + * @function toJSON + * @memberof cosmos_sdk.codec.v1.SayHelloResponse + * @instance + * @returns {Object.} JSON object + */ + SayHelloResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SayHelloResponse; + })(); + + return v1; + })(); + + return codec; + })(); + + cosmos_sdk.crypto = (function() { + + /** + * Namespace crypto. + * @memberof cosmos_sdk + * @namespace + */ + var crypto = {}; + + crypto.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.crypto + * @namespace + */ + var v1 = {}; + + v1.PublicKey = (function() { + + /** + * Properties of a PublicKey. + * @memberof cosmos_sdk.crypto.v1 + * @interface IPublicKey + * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 + * @property {Uint8Array|null} [ed25519] PublicKey ed25519 + * @property {Uint8Array|null} [sr25519] PublicKey sr25519 + * @property {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null} [multisig] PublicKey multisig + * @property {Uint8Array|null} [secp256r1] PublicKey secp256r1 + * @property {google.protobuf.IAny|null} [anyPubkey] PublicKey anyPubkey + */ + + /** + * Constructs a new PublicKey. + * @memberof cosmos_sdk.crypto.v1 + * @classdesc Represents a PublicKey. + * @implements IPublicKey + * @constructor + * @param {cosmos_sdk.crypto.v1.IPublicKey=} [properties] Properties to set + */ + function PublicKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublicKey secp256k1. + * @member {Uint8Array} secp256k1 + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.secp256k1 = $util.newBuffer([]); + + /** + * PublicKey ed25519. + * @member {Uint8Array} ed25519 + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.ed25519 = $util.newBuffer([]); + + /** + * PublicKey sr25519. + * @member {Uint8Array} sr25519 + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.sr25519 = $util.newBuffer([]); + + /** + * PublicKey multisig. + * @member {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null|undefined} multisig + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.multisig = null; + + /** + * PublicKey secp256r1. + * @member {Uint8Array} secp256r1 + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.secp256r1 = $util.newBuffer([]); + + /** + * PublicKey anyPubkey. + * @member {google.protobuf.IAny|null|undefined} anyPubkey + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.anyPubkey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PublicKey sum. + * @member {"secp256k1"|"ed25519"|"sr25519"|"multisig"|"secp256r1"|"anyPubkey"|undefined} sum + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + Object.defineProperty(PublicKey.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["secp256k1", "ed25519", "sr25519", "multisig", "secp256r1", "anyPubkey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PublicKey instance using the specified properties. + * @function create + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {cosmos_sdk.crypto.v1.IPublicKey=} [properties] Properties to set + * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey instance + */ + PublicKey.create = function create(properties) { + return new PublicKey(properties); + }; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {cosmos_sdk.crypto.v1.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.secp256k1 != null && Object.hasOwnProperty.call(message, "secp256k1")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.secp256k1); + if (message.ed25519 != null && Object.hasOwnProperty.call(message, "ed25519")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.ed25519); + if (message.sr25519 != null && Object.hasOwnProperty.call(message, "sr25519")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.sr25519); + if (message.multisig != null && Object.hasOwnProperty.call(message, "multisig")) + $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.encode(message.multisig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.secp256r1 != null && Object.hasOwnProperty.call(message, "secp256r1")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.secp256r1); + if (message.anyPubkey != null && Object.hasOwnProperty.call(message, "anyPubkey")) + $root.google.protobuf.Any.encode(message.anyPubkey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {cosmos_sdk.crypto.v1.IPublicKey} message PublicKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublicKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.crypto.v1.PublicKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.secp256k1 = reader.bytes(); + break; + case 2: + message.ed25519 = reader.bytes(); + break; + case 3: + message.sr25519 = reader.bytes(); + break; + case 4: + message.multisig = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.decode(reader, reader.uint32()); + break; + case 5: + message.secp256r1 = reader.bytes(); + break; + case 15: + message.anyPubkey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublicKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublicKey message. + * @function verify + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublicKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { + properties.sum = 1; + if (!(message.secp256k1 && typeof message.secp256k1.length === "number" || $util.isString(message.secp256k1))) + return "secp256k1: buffer expected"; + } + if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + if (!(message.ed25519 && typeof message.ed25519.length === "number" || $util.isString(message.ed25519))) + return "ed25519: buffer expected"; + } + if (message.sr25519 != null && message.hasOwnProperty("sr25519")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + if (!(message.sr25519 && typeof message.sr25519.length === "number" || $util.isString(message.sr25519))) + return "sr25519: buffer expected"; + } + if (message.multisig != null && message.hasOwnProperty("multisig")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + var error = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify(message.multisig); + if (error) + return "multisig." + error; + } + } + if (message.secp256r1 != null && message.hasOwnProperty("secp256r1")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + if (!(message.secp256r1 && typeof message.secp256r1.length === "number" || $util.isString(message.secp256r1))) + return "secp256r1: buffer expected"; + } + if (message.anyPubkey != null && message.hasOwnProperty("anyPubkey")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + var error = $root.google.protobuf.Any.verify(message.anyPubkey); + if (error) + return "anyPubkey." + error; + } + } + return null; + }; + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey + */ + PublicKey.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.crypto.v1.PublicKey) + return object; + var message = new $root.cosmos_sdk.crypto.v1.PublicKey(); + if (object.secp256k1 != null) + if (typeof object.secp256k1 === "string") + $util.base64.decode(object.secp256k1, message.secp256k1 = $util.newBuffer($util.base64.length(object.secp256k1)), 0); + else if (object.secp256k1.length) + message.secp256k1 = object.secp256k1; + if (object.ed25519 != null) + if (typeof object.ed25519 === "string") + $util.base64.decode(object.ed25519, message.ed25519 = $util.newBuffer($util.base64.length(object.ed25519)), 0); + else if (object.ed25519.length) + message.ed25519 = object.ed25519; + if (object.sr25519 != null) + if (typeof object.sr25519 === "string") + $util.base64.decode(object.sr25519, message.sr25519 = $util.newBuffer($util.base64.length(object.sr25519)), 0); + else if (object.sr25519.length) + message.sr25519 = object.sr25519; + if (object.multisig != null) { + if (typeof object.multisig !== "object") + throw TypeError(".cosmos_sdk.crypto.v1.PublicKey.multisig: object expected"); + message.multisig = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.fromObject(object.multisig); + } + if (object.secp256r1 != null) + if (typeof object.secp256r1 === "string") + $util.base64.decode(object.secp256r1, message.secp256r1 = $util.newBuffer($util.base64.length(object.secp256r1)), 0); + else if (object.secp256r1.length) + message.secp256r1 = object.secp256r1; + if (object.anyPubkey != null) { + if (typeof object.anyPubkey !== "object") + throw TypeError(".cosmos_sdk.crypto.v1.PublicKey.anyPubkey: object expected"); + message.anyPubkey = $root.google.protobuf.Any.fromObject(object.anyPubkey); + } + return message; + }; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {cosmos_sdk.crypto.v1.PublicKey} message PublicKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublicKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { + object.secp256k1 = options.bytes === String ? $util.base64.encode(message.secp256k1, 0, message.secp256k1.length) : options.bytes === Array ? Array.prototype.slice.call(message.secp256k1) : message.secp256k1; + if (options.oneofs) + object.sum = "secp256k1"; + } + if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { + object.ed25519 = options.bytes === String ? $util.base64.encode(message.ed25519, 0, message.ed25519.length) : options.bytes === Array ? Array.prototype.slice.call(message.ed25519) : message.ed25519; + if (options.oneofs) + object.sum = "ed25519"; + } + if (message.sr25519 != null && message.hasOwnProperty("sr25519")) { + object.sr25519 = options.bytes === String ? $util.base64.encode(message.sr25519, 0, message.sr25519.length) : options.bytes === Array ? Array.prototype.slice.call(message.sr25519) : message.sr25519; + if (options.oneofs) + object.sum = "sr25519"; + } + if (message.multisig != null && message.hasOwnProperty("multisig")) { + object.multisig = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.toObject(message.multisig, options); + if (options.oneofs) + object.sum = "multisig"; + } + if (message.secp256r1 != null && message.hasOwnProperty("secp256r1")) { + object.secp256r1 = options.bytes === String ? $util.base64.encode(message.secp256r1, 0, message.secp256r1.length) : options.bytes === Array ? Array.prototype.slice.call(message.secp256r1) : message.secp256r1; + if (options.oneofs) + object.sum = "secp256r1"; + } + if (message.anyPubkey != null && message.hasOwnProperty("anyPubkey")) { + object.anyPubkey = $root.google.protobuf.Any.toObject(message.anyPubkey, options); + if (options.oneofs) + object.sum = "anyPubkey"; + } + return object; + }; + + /** + * Converts this PublicKey to JSON. + * @function toJSON + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + * @returns {Object.} JSON object + */ + PublicKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PublicKey; + })(); + + v1.PubKeyMultisigThreshold = (function() { + + /** + * Properties of a PubKeyMultisigThreshold. + * @memberof cosmos_sdk.crypto.v1 + * @interface IPubKeyMultisigThreshold + * @property {number|null} [threshold] PubKeyMultisigThreshold threshold + * @property {Array.|null} [pubkeys] PubKeyMultisigThreshold pubkeys + */ + + /** + * Constructs a new PubKeyMultisigThreshold. + * @memberof cosmos_sdk.crypto.v1 + * @classdesc Represents a PubKeyMultisigThreshold. + * @implements IPubKeyMultisigThreshold + * @constructor + * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [properties] Properties to set + */ + function PubKeyMultisigThreshold(properties) { + this.pubkeys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubKeyMultisigThreshold threshold. + * @member {number} threshold + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @instance + */ + PubKeyMultisigThreshold.prototype.threshold = 0; + + /** + * PubKeyMultisigThreshold pubkeys. + * @member {Array.} pubkeys + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @instance + */ + PubKeyMultisigThreshold.prototype.pubkeys = $util.emptyArray; + + /** + * Creates a new PubKeyMultisigThreshold instance using the specified properties. + * @function create + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [properties] Properties to set + * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold instance + */ + PubKeyMultisigThreshold.create = function create(properties) { + return new PubKeyMultisigThreshold(properties); + }; + + /** + * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold} message PubKeyMultisigThreshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubKeyMultisigThreshold.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.threshold); + if (message.pubkeys != null && message.pubkeys.length) + for (var i = 0; i < message.pubkeys.length; ++i) + $root.cosmos_sdk.crypto.v1.PublicKey.encode(message.pubkeys[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PubKeyMultisigThreshold message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold} message PubKeyMultisigThreshold message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubKeyMultisigThreshold.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubKeyMultisigThreshold.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.threshold = reader.uint32(); + break; + case 2: + if (!(message.pubkeys && message.pubkeys.length)) + message.pubkeys = []; + message.pubkeys.push($root.cosmos_sdk.crypto.v1.PublicKey.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubKeyMultisigThreshold.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubKeyMultisigThreshold message. + * @function verify + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubKeyMultisigThreshold.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.threshold != null && message.hasOwnProperty("threshold")) + if (!$util.isInteger(message.threshold)) + return "threshold: integer expected"; + if (message.pubkeys != null && message.hasOwnProperty("pubkeys")) { + if (!Array.isArray(message.pubkeys)) + return "pubkeys: array expected"; + for (var i = 0; i < message.pubkeys.length; ++i) { + var error = $root.cosmos_sdk.crypto.v1.PublicKey.verify(message.pubkeys[i]); + if (error) + return "pubkeys." + error; + } + } + return null; + }; + + /** + * Creates a PubKeyMultisigThreshold message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold + */ + PubKeyMultisigThreshold.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold) + return object; + var message = new $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold(); + if (object.threshold != null) + message.threshold = object.threshold >>> 0; + if (object.pubkeys) { + if (!Array.isArray(object.pubkeys)) + throw TypeError(".cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.pubkeys: array expected"); + message.pubkeys = []; + for (var i = 0; i < object.pubkeys.length; ++i) { + if (typeof object.pubkeys[i] !== "object") + throw TypeError(".cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.pubkeys: object expected"); + message.pubkeys[i] = $root.cosmos_sdk.crypto.v1.PublicKey.fromObject(object.pubkeys[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PubKeyMultisigThreshold message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} message PubKeyMultisigThreshold + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubKeyMultisigThreshold.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pubkeys = []; + if (options.defaults) + object.threshold = 0; + if (message.threshold != null && message.hasOwnProperty("threshold")) + object.threshold = message.threshold; + if (message.pubkeys && message.pubkeys.length) { + object.pubkeys = []; + for (var j = 0; j < message.pubkeys.length; ++j) + object.pubkeys[j] = $root.cosmos_sdk.crypto.v1.PublicKey.toObject(message.pubkeys[j], options); + } + return object; + }; + + /** + * Converts this PubKeyMultisigThreshold to JSON. + * @function toJSON + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @instance + * @returns {Object.} JSON object + */ + PubKeyMultisigThreshold.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PubKeyMultisigThreshold; + })(); + + v1.MultiSignature = (function() { + + /** + * Properties of a MultiSignature. + * @memberof cosmos_sdk.crypto.v1 + * @interface IMultiSignature + * @property {Array.|null} [sigs] MultiSignature sigs + */ + + /** + * Constructs a new MultiSignature. + * @memberof cosmos_sdk.crypto.v1 + * @classdesc Represents a MultiSignature. + * @implements IMultiSignature + * @constructor + * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [properties] Properties to set + */ + function MultiSignature(properties) { + this.sigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MultiSignature sigs. + * @member {Array.} sigs + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @instance + */ + MultiSignature.prototype.sigs = $util.emptyArray; + + /** + * Creates a new MultiSignature instance using the specified properties. + * @function create + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [properties] Properties to set + * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature instance + */ + MultiSignature.create = function create(properties) { + return new MultiSignature(properties); + }; + + /** + * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {cosmos_sdk.crypto.v1.IMultiSignature} message MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSignature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sigs != null && message.sigs.length) + for (var i = 0; i < message.sigs.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sigs[i]); + return writer; + }; + + /** + * Encodes the specified MultiSignature message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {cosmos_sdk.crypto.v1.IMultiSignature} message MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiSignature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MultiSignature message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSignature.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.crypto.v1.MultiSignature(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.sigs && message.sigs.length)) + message.sigs = []; + message.sigs.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MultiSignature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiSignature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultiSignature message. + * @function verify + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultiSignature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sigs != null && message.hasOwnProperty("sigs")) { + if (!Array.isArray(message.sigs)) + return "sigs: array expected"; + for (var i = 0; i < message.sigs.length; ++i) + if (!(message.sigs[i] && typeof message.sigs[i].length === "number" || $util.isString(message.sigs[i]))) + return "sigs: buffer[] expected"; + } + return null; + }; + + /** + * Creates a MultiSignature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature + */ + MultiSignature.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.crypto.v1.MultiSignature) + return object; + var message = new $root.cosmos_sdk.crypto.v1.MultiSignature(); + if (object.sigs) { + if (!Array.isArray(object.sigs)) + throw TypeError(".cosmos_sdk.crypto.v1.MultiSignature.sigs: array expected"); + message.sigs = []; + for (var i = 0; i < object.sigs.length; ++i) + if (typeof object.sigs[i] === "string") + $util.base64.decode(object.sigs[i], message.sigs[i] = $util.newBuffer($util.base64.length(object.sigs[i])), 0); + else if (object.sigs[i].length) + message.sigs[i] = object.sigs[i]; + } + return message; + }; + + /** + * Creates a plain object from a MultiSignature message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {cosmos_sdk.crypto.v1.MultiSignature} message MultiSignature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultiSignature.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sigs = []; + if (message.sigs && message.sigs.length) { + object.sigs = []; + for (var j = 0; j < message.sigs.length; ++j) + object.sigs[j] = options.bytes === String ? $util.base64.encode(message.sigs[j], 0, message.sigs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.sigs[j]) : message.sigs[j]; + } + return object; + }; + + /** + * Converts this MultiSignature to JSON. + * @function toJSON + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @instance + * @returns {Object.} JSON object + */ + MultiSignature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MultiSignature; + })(); + + v1.CompactBitArray = (function() { + + /** + * Properties of a CompactBitArray. + * @memberof cosmos_sdk.crypto.v1 + * @interface ICompactBitArray + * @property {number|null} [extraBitsStored] CompactBitArray extraBitsStored + * @property {Uint8Array|null} [elems] CompactBitArray elems + */ + + /** + * Constructs a new CompactBitArray. + * @memberof cosmos_sdk.crypto.v1 + * @classdesc Represents a CompactBitArray. + * @implements ICompactBitArray + * @constructor + * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [properties] Properties to set + */ + function CompactBitArray(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CompactBitArray extraBitsStored. + * @member {number} extraBitsStored + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @instance + */ + CompactBitArray.prototype.extraBitsStored = 0; + + /** + * CompactBitArray elems. + * @member {Uint8Array} elems + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @instance + */ + CompactBitArray.prototype.elems = $util.newBuffer([]); + + /** + * Creates a new CompactBitArray instance using the specified properties. + * @function create + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [properties] Properties to set + * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray instance + */ + CompactBitArray.create = function create(properties) { + return new CompactBitArray(properties); + }; + + /** + * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {cosmos_sdk.crypto.v1.ICompactBitArray} message CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactBitArray.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.extraBitsStored != null && Object.hasOwnProperty.call(message, "extraBitsStored")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.extraBitsStored); + if (message.elems != null && Object.hasOwnProperty.call(message, "elems")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.elems); + return writer; + }; + + /** + * Encodes the specified CompactBitArray message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {cosmos_sdk.crypto.v1.ICompactBitArray} message CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactBitArray.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactBitArray.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.crypto.v1.CompactBitArray(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.extraBitsStored = reader.uint32(); + break; + case 2: + message.elems = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactBitArray.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompactBitArray message. + * @function verify + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompactBitArray.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) + if (!$util.isInteger(message.extraBitsStored)) + return "extraBitsStored: integer expected"; + if (message.elems != null && message.hasOwnProperty("elems")) + if (!(message.elems && typeof message.elems.length === "number" || $util.isString(message.elems))) + return "elems: buffer expected"; + return null; + }; + + /** + * Creates a CompactBitArray message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray + */ + CompactBitArray.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.crypto.v1.CompactBitArray) + return object; + var message = new $root.cosmos_sdk.crypto.v1.CompactBitArray(); + if (object.extraBitsStored != null) + message.extraBitsStored = object.extraBitsStored >>> 0; + if (object.elems != null) + if (typeof object.elems === "string") + $util.base64.decode(object.elems, message.elems = $util.newBuffer($util.base64.length(object.elems)), 0); + else if (object.elems.length) + message.elems = object.elems; + return message; + }; + + /** + * Creates a plain object from a CompactBitArray message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {cosmos_sdk.crypto.v1.CompactBitArray} message CompactBitArray + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompactBitArray.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.extraBitsStored = 0; + if (options.bytes === String) + object.elems = ""; + else { + object.elems = []; + if (options.bytes !== Array) + object.elems = $util.newBuffer(object.elems); + } + } + if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) + object.extraBitsStored = message.extraBitsStored; + if (message.elems != null && message.hasOwnProperty("elems")) + object.elems = options.bytes === String ? $util.base64.encode(message.elems, 0, message.elems.length) : options.bytes === Array ? Array.prototype.slice.call(message.elems) : message.elems; + return object; + }; + + /** + * Converts this CompactBitArray to JSON. + * @function toJSON + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @instance + * @returns {Object.} JSON object + */ + CompactBitArray.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompactBitArray; + })(); + + return v1; + })(); + + return crypto; + })(); + + cosmos_sdk.tx = (function() { + + /** + * Namespace tx. + * @memberof cosmos_sdk + * @namespace + */ + var tx = {}; + + tx.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.tx + * @namespace + */ + var v1 = {}; + + v1.Tx = (function() { + + /** + * Properties of a Tx. + * @memberof cosmos_sdk.tx.v1 + * @interface ITx + * @property {cosmos_sdk.tx.v1.ITxBody|null} [body] Tx body + * @property {cosmos_sdk.tx.v1.IAuthInfo|null} [authInfo] Tx authInfo + * @property {Array.|null} [signatures] Tx signatures + */ + + /** + * Constructs a new Tx. + * @memberof cosmos_sdk.tx.v1 + * @classdesc Represents a Tx. + * @implements ITx + * @constructor + * @param {cosmos_sdk.tx.v1.ITx=} [properties] Properties to set + */ + function Tx(properties) { + this.signatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tx body. + * @member {cosmos_sdk.tx.v1.ITxBody|null|undefined} body + * @memberof cosmos_sdk.tx.v1.Tx + * @instance + */ + Tx.prototype.body = null; + + /** + * Tx authInfo. + * @member {cosmos_sdk.tx.v1.IAuthInfo|null|undefined} authInfo + * @memberof cosmos_sdk.tx.v1.Tx + * @instance + */ + Tx.prototype.authInfo = null; + + /** + * Tx signatures. + * @member {Array.} signatures + * @memberof cosmos_sdk.tx.v1.Tx + * @instance + */ + Tx.prototype.signatures = $util.emptyArray; + + /** + * Creates a new Tx instance using the specified properties. + * @function create + * @memberof cosmos_sdk.tx.v1.Tx + * @static + * @param {cosmos_sdk.tx.v1.ITx=} [properties] Properties to set + * @returns {cosmos_sdk.tx.v1.Tx} Tx instance + */ + Tx.create = function create(properties) { + return new Tx(properties); + }; + + /** + * Encodes the specified Tx message. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.tx.v1.Tx + * @static + * @param {cosmos_sdk.tx.v1.ITx} message Tx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.cosmos_sdk.tx.v1.TxBody.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) + $root.cosmos_sdk.tx.v1.AuthInfo.encode(message.authInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.signatures != null && message.signatures.length) + for (var i = 0; i < message.signatures.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signatures[i]); + return writer; + }; + + /** + * Encodes the specified Tx message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.tx.v1.Tx + * @static + * @param {cosmos_sdk.tx.v1.ITx} message Tx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tx message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.tx.v1.Tx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.tx.v1.Tx} Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.Tx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = $root.cosmos_sdk.tx.v1.TxBody.decode(reader, reader.uint32()); + break; + case 2: + message.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.signatures && message.signatures.length)) + message.signatures = []; + message.signatures.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Tx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.tx.v1.Tx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.tx.v1.Tx} Tx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tx message. + * @function verify + * @memberof cosmos_sdk.tx.v1.Tx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.cosmos_sdk.tx.v1.TxBody.verify(message.body); + if (error) + return "body." + error; + } + if (message.authInfo != null && message.hasOwnProperty("authInfo")) { + var error = $root.cosmos_sdk.tx.v1.AuthInfo.verify(message.authInfo); + if (error) + return "authInfo." + error; + } + if (message.signatures != null && message.hasOwnProperty("signatures")) { + if (!Array.isArray(message.signatures)) + return "signatures: array expected"; + for (var i = 0; i < message.signatures.length; ++i) + if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) + return "signatures: buffer[] expected"; + } + return null; + }; + + /** + * Creates a Tx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.tx.v1.Tx + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.tx.v1.Tx} Tx + */ + Tx.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.tx.v1.Tx) + return object; + var message = new $root.cosmos_sdk.tx.v1.Tx(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".cosmos_sdk.tx.v1.Tx.body: object expected"); + message.body = $root.cosmos_sdk.tx.v1.TxBody.fromObject(object.body); + } + if (object.authInfo != null) { + if (typeof object.authInfo !== "object") + throw TypeError(".cosmos_sdk.tx.v1.Tx.authInfo: object expected"); + message.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.fromObject(object.authInfo); + } + if (object.signatures) { + if (!Array.isArray(object.signatures)) + throw TypeError(".cosmos_sdk.tx.v1.Tx.signatures: array expected"); + message.signatures = []; + for (var i = 0; i < object.signatures.length; ++i) + if (typeof object.signatures[i] === "string") + $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); + else if (object.signatures[i].length) + message.signatures[i] = object.signatures[i]; + } + return message; + }; + + /** + * Creates a plain object from a Tx message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.tx.v1.Tx + * @static + * @param {cosmos_sdk.tx.v1.Tx} message Tx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signatures = []; + if (options.defaults) { + object.body = null; + object.authInfo = null; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.cosmos_sdk.tx.v1.TxBody.toObject(message.body, options); + if (message.authInfo != null && message.hasOwnProperty("authInfo")) + object.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.toObject(message.authInfo, options); + if (message.signatures && message.signatures.length) { + object.signatures = []; + for (var j = 0; j < message.signatures.length; ++j) + object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; + } + return object; + }; + + /** + * Converts this Tx to JSON. + * @function toJSON + * @memberof cosmos_sdk.tx.v1.Tx + * @instance + * @returns {Object.} JSON object + */ + Tx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Tx; + })(); + + v1.SignDoc = (function() { + + /** + * Properties of a SignDoc. + * @memberof cosmos_sdk.tx.v1 + * @interface ISignDoc + * @property {cosmos_sdk.tx.v1.ITxBody|null} [body] SignDoc body + * @property {cosmos_sdk.tx.v1.IAuthInfo|null} [authInfo] SignDoc authInfo + * @property {string|null} [chainId] SignDoc chainId + * @property {number|Long|null} [accountNumber] SignDoc accountNumber + * @property {number|Long|null} [accountSequence] SignDoc accountSequence + */ + + /** + * Constructs a new SignDoc. + * @memberof cosmos_sdk.tx.v1 + * @classdesc Represents a SignDoc. + * @implements ISignDoc + * @constructor + * @param {cosmos_sdk.tx.v1.ISignDoc=} [properties] Properties to set + */ + function SignDoc(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignDoc body. + * @member {cosmos_sdk.tx.v1.ITxBody|null|undefined} body + * @memberof cosmos_sdk.tx.v1.SignDoc + * @instance + */ + SignDoc.prototype.body = null; + + /** + * SignDoc authInfo. + * @member {cosmos_sdk.tx.v1.IAuthInfo|null|undefined} authInfo + * @memberof cosmos_sdk.tx.v1.SignDoc + * @instance + */ + SignDoc.prototype.authInfo = null; + + /** + * SignDoc chainId. + * @member {string} chainId + * @memberof cosmos_sdk.tx.v1.SignDoc + * @instance + */ + SignDoc.prototype.chainId = ""; + + /** + * SignDoc accountNumber. + * @member {number|Long} accountNumber + * @memberof cosmos_sdk.tx.v1.SignDoc + * @instance + */ + SignDoc.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * SignDoc accountSequence. + * @member {number|Long} accountSequence + * @memberof cosmos_sdk.tx.v1.SignDoc + * @instance + */ + SignDoc.prototype.accountSequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new SignDoc instance using the specified properties. + * @function create + * @memberof cosmos_sdk.tx.v1.SignDoc + * @static + * @param {cosmos_sdk.tx.v1.ISignDoc=} [properties] Properties to set + * @returns {cosmos_sdk.tx.v1.SignDoc} SignDoc instance + */ + SignDoc.create = function create(properties) { + return new SignDoc(properties); + }; + + /** + * Encodes the specified SignDoc message. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.tx.v1.SignDoc + * @static + * @param {cosmos_sdk.tx.v1.ISignDoc} message SignDoc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignDoc.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + $root.cosmos_sdk.tx.v1.TxBody.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) + $root.cosmos_sdk.tx.v1.AuthInfo.encode(message.authInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.chainId); + if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.accountNumber); + if (message.accountSequence != null && Object.hasOwnProperty.call(message, "accountSequence")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.accountSequence); + return writer; + }; + + /** + * Encodes the specified SignDoc message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.tx.v1.SignDoc + * @static + * @param {cosmos_sdk.tx.v1.ISignDoc} message SignDoc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignDoc.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignDoc message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.tx.v1.SignDoc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.tx.v1.SignDoc} SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignDoc.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.SignDoc(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.body = $root.cosmos_sdk.tx.v1.TxBody.decode(reader, reader.uint32()); + break; + case 2: + message.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.decode(reader, reader.uint32()); + break; + case 3: + message.chainId = reader.string(); + break; + case 4: + message.accountNumber = reader.uint64(); + break; + case 5: + message.accountSequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignDoc message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.tx.v1.SignDoc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.tx.v1.SignDoc} SignDoc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignDoc.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignDoc message. + * @function verify + * @memberof cosmos_sdk.tx.v1.SignDoc + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignDoc.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.body != null && message.hasOwnProperty("body")) { + var error = $root.cosmos_sdk.tx.v1.TxBody.verify(message.body); + if (error) + return "body." + error; + } + if (message.authInfo != null && message.hasOwnProperty("authInfo")) { + var error = $root.cosmos_sdk.tx.v1.AuthInfo.verify(message.authInfo); + if (error) + return "authInfo." + error; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (!$util.isInteger(message.accountNumber) && !(message.accountNumber && $util.isInteger(message.accountNumber.low) && $util.isInteger(message.accountNumber.high))) + return "accountNumber: integer|Long expected"; + if (message.accountSequence != null && message.hasOwnProperty("accountSequence")) + if (!$util.isInteger(message.accountSequence) && !(message.accountSequence && $util.isInteger(message.accountSequence.low) && $util.isInteger(message.accountSequence.high))) + return "accountSequence: integer|Long expected"; + return null; + }; + + /** + * Creates a SignDoc message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.tx.v1.SignDoc + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.tx.v1.SignDoc} SignDoc + */ + SignDoc.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.tx.v1.SignDoc) + return object; + var message = new $root.cosmos_sdk.tx.v1.SignDoc(); + if (object.body != null) { + if (typeof object.body !== "object") + throw TypeError(".cosmos_sdk.tx.v1.SignDoc.body: object expected"); + message.body = $root.cosmos_sdk.tx.v1.TxBody.fromObject(object.body); + } + if (object.authInfo != null) { + if (typeof object.authInfo !== "object") + throw TypeError(".cosmos_sdk.tx.v1.SignDoc.authInfo: object expected"); + message.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.fromObject(object.authInfo); + } + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.accountNumber != null) + if ($util.Long) + (message.accountNumber = $util.Long.fromValue(object.accountNumber)).unsigned = true; + else if (typeof object.accountNumber === "string") + message.accountNumber = parseInt(object.accountNumber, 10); + else if (typeof object.accountNumber === "number") + message.accountNumber = object.accountNumber; + else if (typeof object.accountNumber === "object") + message.accountNumber = new $util.LongBits(object.accountNumber.low >>> 0, object.accountNumber.high >>> 0).toNumber(true); + if (object.accountSequence != null) + if ($util.Long) + (message.accountSequence = $util.Long.fromValue(object.accountSequence)).unsigned = true; + else if (typeof object.accountSequence === "string") + message.accountSequence = parseInt(object.accountSequence, 10); + else if (typeof object.accountSequence === "number") + message.accountSequence = object.accountSequence; + else if (typeof object.accountSequence === "object") + message.accountSequence = new $util.LongBits(object.accountSequence.low >>> 0, object.accountSequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a SignDoc message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.tx.v1.SignDoc + * @static + * @param {cosmos_sdk.tx.v1.SignDoc} message SignDoc + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignDoc.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.body = null; + object.authInfo = null; + object.chainId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.accountNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.accountSequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountSequence = options.longs === String ? "0" : 0; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = $root.cosmos_sdk.tx.v1.TxBody.toObject(message.body, options); + if (message.authInfo != null && message.hasOwnProperty("authInfo")) + object.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.toObject(message.authInfo, options); + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (typeof message.accountNumber === "number") + object.accountNumber = options.longs === String ? String(message.accountNumber) : message.accountNumber; + else + object.accountNumber = options.longs === String ? $util.Long.prototype.toString.call(message.accountNumber) : options.longs === Number ? new $util.LongBits(message.accountNumber.low >>> 0, message.accountNumber.high >>> 0).toNumber(true) : message.accountNumber; + if (message.accountSequence != null && message.hasOwnProperty("accountSequence")) + if (typeof message.accountSequence === "number") + object.accountSequence = options.longs === String ? String(message.accountSequence) : message.accountSequence; + else + object.accountSequence = options.longs === String ? $util.Long.prototype.toString.call(message.accountSequence) : options.longs === Number ? new $util.LongBits(message.accountSequence.low >>> 0, message.accountSequence.high >>> 0).toNumber(true) : message.accountSequence; + return object; + }; + + /** + * Converts this SignDoc to JSON. + * @function toJSON + * @memberof cosmos_sdk.tx.v1.SignDoc + * @instance + * @returns {Object.} JSON object + */ + SignDoc.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignDoc; + })(); + + v1.TxBody = (function() { + + /** + * Properties of a TxBody. + * @memberof cosmos_sdk.tx.v1 + * @interface ITxBody + * @property {Array.|null} [messages] TxBody messages + * @property {string|null} [memo] TxBody memo + * @property {number|Long|null} [timeoutHeight] TxBody timeoutHeight + * @property {Array.|null} [extensionOptions] TxBody extensionOptions + * @property {Array.|null} [nonCriticalExtensionOptions] TxBody nonCriticalExtensionOptions + */ + + /** + * Constructs a new TxBody. + * @memberof cosmos_sdk.tx.v1 + * @classdesc Represents a TxBody. + * @implements ITxBody + * @constructor + * @param {cosmos_sdk.tx.v1.ITxBody=} [properties] Properties to set + */ + function TxBody(properties) { + this.messages = []; + this.extensionOptions = []; + this.nonCriticalExtensionOptions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxBody messages. + * @member {Array.} messages + * @memberof cosmos_sdk.tx.v1.TxBody + * @instance + */ + TxBody.prototype.messages = $util.emptyArray; + + /** + * TxBody memo. + * @member {string} memo + * @memberof cosmos_sdk.tx.v1.TxBody + * @instance + */ + TxBody.prototype.memo = ""; + + /** + * TxBody timeoutHeight. + * @member {number|Long} timeoutHeight + * @memberof cosmos_sdk.tx.v1.TxBody + * @instance + */ + TxBody.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TxBody extensionOptions. + * @member {Array.} extensionOptions + * @memberof cosmos_sdk.tx.v1.TxBody + * @instance + */ + TxBody.prototype.extensionOptions = $util.emptyArray; + + /** + * TxBody nonCriticalExtensionOptions. + * @member {Array.} nonCriticalExtensionOptions + * @memberof cosmos_sdk.tx.v1.TxBody + * @instance + */ + TxBody.prototype.nonCriticalExtensionOptions = $util.emptyArray; + + /** + * Creates a new TxBody instance using the specified properties. + * @function create + * @memberof cosmos_sdk.tx.v1.TxBody + * @static + * @param {cosmos_sdk.tx.v1.ITxBody=} [properties] Properties to set + * @returns {cosmos_sdk.tx.v1.TxBody} TxBody instance + */ + TxBody.create = function create(properties) { + return new TxBody(properties); + }; + + /** + * Encodes the specified TxBody message. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.tx.v1.TxBody + * @static + * @param {cosmos_sdk.tx.v1.ITxBody} message TxBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxBody.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.protobuf.Any.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.memo); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timeoutHeight); + if (message.extensionOptions != null && message.extensionOptions.length) + for (var i = 0; i < message.extensionOptions.length; ++i) + $root.google.protobuf.Any.encode(message.extensionOptions[i], writer.uint32(/* id 1023, wireType 2 =*/8186).fork()).ldelim(); + if (message.nonCriticalExtensionOptions != null && message.nonCriticalExtensionOptions.length) + for (var i = 0; i < message.nonCriticalExtensionOptions.length; ++i) + $root.google.protobuf.Any.encode(message.nonCriticalExtensionOptions[i], writer.uint32(/* id 2047, wireType 2 =*/16378).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxBody message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.tx.v1.TxBody + * @static + * @param {cosmos_sdk.tx.v1.ITxBody} message TxBody message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxBody.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxBody message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.tx.v1.TxBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.tx.v1.TxBody} TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxBody.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.TxBody(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + case 2: + message.memo = reader.string(); + break; + case 3: + message.timeoutHeight = reader.int64(); + break; + case 1023: + if (!(message.extensionOptions && message.extensionOptions.length)) + message.extensionOptions = []; + message.extensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + case 2047: + if (!(message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length)) + message.nonCriticalExtensionOptions = []; + message.nonCriticalExtensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxBody message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.tx.v1.TxBody + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.tx.v1.TxBody} TxBody + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxBody.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxBody message. + * @function verify + * @memberof cosmos_sdk.tx.v1.TxBody + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxBody.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.messages[i]); + if (error) + return "messages." + error; + } + } + if (message.memo != null && message.hasOwnProperty("memo")) + if (!$util.isString(message.memo)) + return "memo: string expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (!$util.isInteger(message.timeoutHeight) && !(message.timeoutHeight && $util.isInteger(message.timeoutHeight.low) && $util.isInteger(message.timeoutHeight.high))) + return "timeoutHeight: integer|Long expected"; + if (message.extensionOptions != null && message.hasOwnProperty("extensionOptions")) { + if (!Array.isArray(message.extensionOptions)) + return "extensionOptions: array expected"; + for (var i = 0; i < message.extensionOptions.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.extensionOptions[i]); + if (error) + return "extensionOptions." + error; + } + } + if (message.nonCriticalExtensionOptions != null && message.hasOwnProperty("nonCriticalExtensionOptions")) { + if (!Array.isArray(message.nonCriticalExtensionOptions)) + return "nonCriticalExtensionOptions: array expected"; + for (var i = 0; i < message.nonCriticalExtensionOptions.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.nonCriticalExtensionOptions[i]); + if (error) + return "nonCriticalExtensionOptions." + error; + } + } + return null; + }; + + /** + * Creates a TxBody message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.tx.v1.TxBody + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.tx.v1.TxBody} TxBody + */ + TxBody.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.tx.v1.TxBody) + return object; + var message = new $root.cosmos_sdk.tx.v1.TxBody(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".cosmos_sdk.tx.v1.TxBody.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".cosmos_sdk.tx.v1.TxBody.messages: object expected"); + message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); + } + } + if (object.memo != null) + message.memo = String(object.memo); + if (object.timeoutHeight != null) + if ($util.Long) + (message.timeoutHeight = $util.Long.fromValue(object.timeoutHeight)).unsigned = false; + else if (typeof object.timeoutHeight === "string") + message.timeoutHeight = parseInt(object.timeoutHeight, 10); + else if (typeof object.timeoutHeight === "number") + message.timeoutHeight = object.timeoutHeight; + else if (typeof object.timeoutHeight === "object") + message.timeoutHeight = new $util.LongBits(object.timeoutHeight.low >>> 0, object.timeoutHeight.high >>> 0).toNumber(); + if (object.extensionOptions) { + if (!Array.isArray(object.extensionOptions)) + throw TypeError(".cosmos_sdk.tx.v1.TxBody.extensionOptions: array expected"); + message.extensionOptions = []; + for (var i = 0; i < object.extensionOptions.length; ++i) { + if (typeof object.extensionOptions[i] !== "object") + throw TypeError(".cosmos_sdk.tx.v1.TxBody.extensionOptions: object expected"); + message.extensionOptions[i] = $root.google.protobuf.Any.fromObject(object.extensionOptions[i]); + } + } + if (object.nonCriticalExtensionOptions) { + if (!Array.isArray(object.nonCriticalExtensionOptions)) + throw TypeError(".cosmos_sdk.tx.v1.TxBody.nonCriticalExtensionOptions: array expected"); + message.nonCriticalExtensionOptions = []; + for (var i = 0; i < object.nonCriticalExtensionOptions.length; ++i) { + if (typeof object.nonCriticalExtensionOptions[i] !== "object") + throw TypeError(".cosmos_sdk.tx.v1.TxBody.nonCriticalExtensionOptions: object expected"); + message.nonCriticalExtensionOptions[i] = $root.google.protobuf.Any.fromObject(object.nonCriticalExtensionOptions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TxBody message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.tx.v1.TxBody + * @static + * @param {cosmos_sdk.tx.v1.TxBody} message TxBody + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxBody.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.messages = []; + object.extensionOptions = []; + object.nonCriticalExtensionOptions = []; + } + if (options.defaults) { + object.memo = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.timeoutHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutHeight = options.longs === String ? "0" : 0; + } + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.protobuf.Any.toObject(message.messages[j], options); + } + if (message.memo != null && message.hasOwnProperty("memo")) + object.memo = message.memo; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (typeof message.timeoutHeight === "number") + object.timeoutHeight = options.longs === String ? String(message.timeoutHeight) : message.timeoutHeight; + else + object.timeoutHeight = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutHeight) : options.longs === Number ? new $util.LongBits(message.timeoutHeight.low >>> 0, message.timeoutHeight.high >>> 0).toNumber() : message.timeoutHeight; + if (message.extensionOptions && message.extensionOptions.length) { + object.extensionOptions = []; + for (var j = 0; j < message.extensionOptions.length; ++j) + object.extensionOptions[j] = $root.google.protobuf.Any.toObject(message.extensionOptions[j], options); + } + if (message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length) { + object.nonCriticalExtensionOptions = []; + for (var j = 0; j < message.nonCriticalExtensionOptions.length; ++j) + object.nonCriticalExtensionOptions[j] = $root.google.protobuf.Any.toObject(message.nonCriticalExtensionOptions[j], options); + } + return object; + }; + + /** + * Converts this TxBody to JSON. + * @function toJSON + * @memberof cosmos_sdk.tx.v1.TxBody + * @instance + * @returns {Object.} JSON object + */ + TxBody.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxBody; + })(); + + v1.AuthInfo = (function() { + + /** + * Properties of an AuthInfo. + * @memberof cosmos_sdk.tx.v1 + * @interface IAuthInfo + * @property {Array.|null} [signerInfos] AuthInfo signerInfos + * @property {cosmos_sdk.tx.v1.IFee|null} [fee] AuthInfo fee + */ + + /** + * Constructs a new AuthInfo. + * @memberof cosmos_sdk.tx.v1 + * @classdesc Represents an AuthInfo. + * @implements IAuthInfo + * @constructor + * @param {cosmos_sdk.tx.v1.IAuthInfo=} [properties] Properties to set + */ + function AuthInfo(properties) { + this.signerInfos = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuthInfo signerInfos. + * @member {Array.} signerInfos + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @instance + */ + AuthInfo.prototype.signerInfos = $util.emptyArray; + + /** + * AuthInfo fee. + * @member {cosmos_sdk.tx.v1.IFee|null|undefined} fee + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @instance + */ + AuthInfo.prototype.fee = null; + + /** + * Creates a new AuthInfo instance using the specified properties. + * @function create + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @static + * @param {cosmos_sdk.tx.v1.IAuthInfo=} [properties] Properties to set + * @returns {cosmos_sdk.tx.v1.AuthInfo} AuthInfo instance + */ + AuthInfo.create = function create(properties) { + return new AuthInfo(properties); + }; + + /** + * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @static + * @param {cosmos_sdk.tx.v1.IAuthInfo} message AuthInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signerInfos != null && message.signerInfos.length) + for (var i = 0; i < message.signerInfos.length; ++i) + $root.cosmos_sdk.tx.v1.SignerInfo.encode(message.signerInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) + $root.cosmos_sdk.tx.v1.Fee.encode(message.fee, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuthInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @static + * @param {cosmos_sdk.tx.v1.IAuthInfo} message AuthInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuthInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuthInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.tx.v1.AuthInfo} AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.AuthInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.signerInfos && message.signerInfos.length)) + message.signerInfos = []; + message.signerInfos.push($root.cosmos_sdk.tx.v1.SignerInfo.decode(reader, reader.uint32())); + break; + case 2: + message.fee = $root.cosmos_sdk.tx.v1.Fee.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AuthInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.tx.v1.AuthInfo} AuthInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuthInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuthInfo message. + * @function verify + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuthInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signerInfos != null && message.hasOwnProperty("signerInfos")) { + if (!Array.isArray(message.signerInfos)) + return "signerInfos: array expected"; + for (var i = 0; i < message.signerInfos.length; ++i) { + var error = $root.cosmos_sdk.tx.v1.SignerInfo.verify(message.signerInfos[i]); + if (error) + return "signerInfos." + error; + } + } + if (message.fee != null && message.hasOwnProperty("fee")) { + var error = $root.cosmos_sdk.tx.v1.Fee.verify(message.fee); + if (error) + return "fee." + error; + } + return null; + }; + + /** + * Creates an AuthInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.tx.v1.AuthInfo} AuthInfo + */ + AuthInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.tx.v1.AuthInfo) + return object; + var message = new $root.cosmos_sdk.tx.v1.AuthInfo(); + if (object.signerInfos) { + if (!Array.isArray(object.signerInfos)) + throw TypeError(".cosmos_sdk.tx.v1.AuthInfo.signerInfos: array expected"); + message.signerInfos = []; + for (var i = 0; i < object.signerInfos.length; ++i) { + if (typeof object.signerInfos[i] !== "object") + throw TypeError(".cosmos_sdk.tx.v1.AuthInfo.signerInfos: object expected"); + message.signerInfos[i] = $root.cosmos_sdk.tx.v1.SignerInfo.fromObject(object.signerInfos[i]); + } + } + if (object.fee != null) { + if (typeof object.fee !== "object") + throw TypeError(".cosmos_sdk.tx.v1.AuthInfo.fee: object expected"); + message.fee = $root.cosmos_sdk.tx.v1.Fee.fromObject(object.fee); + } + return message; + }; + + /** + * Creates a plain object from an AuthInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @static + * @param {cosmos_sdk.tx.v1.AuthInfo} message AuthInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuthInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signerInfos = []; + if (options.defaults) + object.fee = null; + if (message.signerInfos && message.signerInfos.length) { + object.signerInfos = []; + for (var j = 0; j < message.signerInfos.length; ++j) + object.signerInfos[j] = $root.cosmos_sdk.tx.v1.SignerInfo.toObject(message.signerInfos[j], options); + } + if (message.fee != null && message.hasOwnProperty("fee")) + object.fee = $root.cosmos_sdk.tx.v1.Fee.toObject(message.fee, options); + return object; + }; + + /** + * Converts this AuthInfo to JSON. + * @function toJSON + * @memberof cosmos_sdk.tx.v1.AuthInfo + * @instance + * @returns {Object.} JSON object + */ + AuthInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AuthInfo; + })(); + + v1.SignerInfo = (function() { + + /** + * Properties of a SignerInfo. + * @memberof cosmos_sdk.tx.v1 + * @interface ISignerInfo + * @property {google.protobuf.IAny|null} [publicKey] SignerInfo publicKey + * @property {cosmos_sdk.tx.v1.IModeInfo|null} [modeInfo] SignerInfo modeInfo + */ + + /** + * Constructs a new SignerInfo. + * @memberof cosmos_sdk.tx.v1 + * @classdesc Represents a SignerInfo. + * @implements ISignerInfo + * @constructor + * @param {cosmos_sdk.tx.v1.ISignerInfo=} [properties] Properties to set + */ + function SignerInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SignerInfo publicKey. + * @member {google.protobuf.IAny|null|undefined} publicKey + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @instance + */ + SignerInfo.prototype.publicKey = null; + + /** + * SignerInfo modeInfo. + * @member {cosmos_sdk.tx.v1.IModeInfo|null|undefined} modeInfo + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @instance + */ + SignerInfo.prototype.modeInfo = null; + + /** + * Creates a new SignerInfo instance using the specified properties. + * @function create + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @static + * @param {cosmos_sdk.tx.v1.ISignerInfo=} [properties] Properties to set + * @returns {cosmos_sdk.tx.v1.SignerInfo} SignerInfo instance + */ + SignerInfo.create = function create(properties) { + return new SignerInfo(properties); + }; + + /** + * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @static + * @param {cosmos_sdk.tx.v1.ISignerInfo} message SignerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignerInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) + $root.google.protobuf.Any.encode(message.publicKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.modeInfo != null && Object.hasOwnProperty.call(message, "modeInfo")) + $root.cosmos_sdk.tx.v1.ModeInfo.encode(message.modeInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SignerInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @static + * @param {cosmos_sdk.tx.v1.ISignerInfo} message SignerInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SignerInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SignerInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.tx.v1.SignerInfo} SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignerInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.SignerInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.publicKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + message.modeInfo = $root.cosmos_sdk.tx.v1.ModeInfo.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SignerInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.tx.v1.SignerInfo} SignerInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SignerInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SignerInfo message. + * @function verify + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SignerInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.publicKey != null && message.hasOwnProperty("publicKey")) { + var error = $root.google.protobuf.Any.verify(message.publicKey); + if (error) + return "publicKey." + error; + } + if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) { + var error = $root.cosmos_sdk.tx.v1.ModeInfo.verify(message.modeInfo); + if (error) + return "modeInfo." + error; + } + return null; + }; + + /** + * Creates a SignerInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.tx.v1.SignerInfo} SignerInfo + */ + SignerInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.tx.v1.SignerInfo) + return object; + var message = new $root.cosmos_sdk.tx.v1.SignerInfo(); + if (object.publicKey != null) { + if (typeof object.publicKey !== "object") + throw TypeError(".cosmos_sdk.tx.v1.SignerInfo.publicKey: object expected"); + message.publicKey = $root.google.protobuf.Any.fromObject(object.publicKey); + } + if (object.modeInfo != null) { + if (typeof object.modeInfo !== "object") + throw TypeError(".cosmos_sdk.tx.v1.SignerInfo.modeInfo: object expected"); + message.modeInfo = $root.cosmos_sdk.tx.v1.ModeInfo.fromObject(object.modeInfo); + } + return message; + }; + + /** + * Creates a plain object from a SignerInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @static + * @param {cosmos_sdk.tx.v1.SignerInfo} message SignerInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SignerInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.publicKey = null; + object.modeInfo = null; + } + if (message.publicKey != null && message.hasOwnProperty("publicKey")) + object.publicKey = $root.google.protobuf.Any.toObject(message.publicKey, options); + if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) + object.modeInfo = $root.cosmos_sdk.tx.v1.ModeInfo.toObject(message.modeInfo, options); + return object; + }; + + /** + * Converts this SignerInfo to JSON. + * @function toJSON + * @memberof cosmos_sdk.tx.v1.SignerInfo + * @instance + * @returns {Object.} JSON object + */ + SignerInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SignerInfo; + })(); + + v1.ModeInfo = (function() { + + /** + * Properties of a ModeInfo. + * @memberof cosmos_sdk.tx.v1 + * @interface IModeInfo + * @property {cosmos_sdk.tx.v1.ModeInfo.ISingle|null} [single] ModeInfo single + * @property {cosmos_sdk.tx.v1.ModeInfo.IMulti|null} [multi] ModeInfo multi + */ + + /** + * Constructs a new ModeInfo. + * @memberof cosmos_sdk.tx.v1 + * @classdesc Represents a ModeInfo. + * @implements IModeInfo + * @constructor + * @param {cosmos_sdk.tx.v1.IModeInfo=} [properties] Properties to set + */ + function ModeInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModeInfo single. + * @member {cosmos_sdk.tx.v1.ModeInfo.ISingle|null|undefined} single + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @instance + */ + ModeInfo.prototype.single = null; + + /** + * ModeInfo multi. + * @member {cosmos_sdk.tx.v1.ModeInfo.IMulti|null|undefined} multi + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @instance + */ + ModeInfo.prototype.multi = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ModeInfo sum. + * @member {"single"|"multi"|undefined} sum + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @instance + */ + Object.defineProperty(ModeInfo.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["single", "multi"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ModeInfo instance using the specified properties. + * @function create + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @static + * @param {cosmos_sdk.tx.v1.IModeInfo=} [properties] Properties to set + * @returns {cosmos_sdk.tx.v1.ModeInfo} ModeInfo instance + */ + ModeInfo.create = function create(properties) { + return new ModeInfo(properties); + }; + + /** + * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @static + * @param {cosmos_sdk.tx.v1.IModeInfo} message ModeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.single != null && Object.hasOwnProperty.call(message, "single")) + $root.cosmos_sdk.tx.v1.ModeInfo.Single.encode(message.single, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.multi != null && Object.hasOwnProperty.call(message, "multi")) + $root.cosmos_sdk.tx.v1.ModeInfo.Multi.encode(message.multi, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ModeInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @static + * @param {cosmos_sdk.tx.v1.IModeInfo} message ModeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModeInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.tx.v1.ModeInfo} ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.ModeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.single = $root.cosmos_sdk.tx.v1.ModeInfo.Single.decode(reader, reader.uint32()); + break; + case 2: + message.multi = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.tx.v1.ModeInfo} ModeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModeInfo message. + * @function verify + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.single != null && message.hasOwnProperty("single")) { + properties.sum = 1; + { + var error = $root.cosmos_sdk.tx.v1.ModeInfo.Single.verify(message.single); + if (error) + return "single." + error; + } + } + if (message.multi != null && message.hasOwnProperty("multi")) { + if (properties.sum === 1) + return "sum: multiple values"; + properties.sum = 1; + { + var error = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.verify(message.multi); + if (error) + return "multi." + error; + } + } + return null; + }; + + /** + * Creates a ModeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.tx.v1.ModeInfo} ModeInfo + */ + ModeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.tx.v1.ModeInfo) + return object; + var message = new $root.cosmos_sdk.tx.v1.ModeInfo(); + if (object.single != null) { + if (typeof object.single !== "object") + throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.single: object expected"); + message.single = $root.cosmos_sdk.tx.v1.ModeInfo.Single.fromObject(object.single); + } + if (object.multi != null) { + if (typeof object.multi !== "object") + throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.multi: object expected"); + message.multi = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.fromObject(object.multi); + } + return message; + }; + + /** + * Creates a plain object from a ModeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @static + * @param {cosmos_sdk.tx.v1.ModeInfo} message ModeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.single != null && message.hasOwnProperty("single")) { + object.single = $root.cosmos_sdk.tx.v1.ModeInfo.Single.toObject(message.single, options); + if (options.oneofs) + object.sum = "single"; + } + if (message.multi != null && message.hasOwnProperty("multi")) { + object.multi = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.toObject(message.multi, options); + if (options.oneofs) + object.sum = "multi"; + } + return object; + }; + + /** + * Converts this ModeInfo to JSON. + * @function toJSON + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @instance + * @returns {Object.} JSON object + */ + ModeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + ModeInfo.Single = (function() { + + /** + * Properties of a Single. + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @interface ISingle + * @property {cosmos_sdk.tx.v1.SignMode|null} [mode] Single mode + */ + + /** + * Constructs a new Single. + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @classdesc Represents a Single. + * @implements ISingle + * @constructor + * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle=} [properties] Properties to set + */ + function Single(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Single mode. + * @member {cosmos_sdk.tx.v1.SignMode} mode + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @instance + */ + Single.prototype.mode = 0; + + /** + * Creates a new Single instance using the specified properties. + * @function create + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @static + * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle=} [properties] Properties to set + * @returns {cosmos_sdk.tx.v1.ModeInfo.Single} Single instance + */ + Single.create = function create(properties) { + return new Single(properties); + }; + + /** + * Encodes the specified Single message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @static + * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + return writer; + }; + + /** + * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @static + * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle} message Single message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Single.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Single message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.tx.v1.ModeInfo.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.ModeInfo.Single(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mode = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Single message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.tx.v1.ModeInfo.Single} Single + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Single.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Single message. + * @function verify + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Single.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 127: + break; + } + return null; + }; + + /** + * Creates a Single message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.tx.v1.ModeInfo.Single} Single + */ + Single.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.tx.v1.ModeInfo.Single) + return object; + var message = new $root.cosmos_sdk.tx.v1.ModeInfo.Single(); + switch (object.mode) { + case "SIGN_MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SIGN_MODE_DIRECT": + case 1: + message.mode = 1; + break; + case "SIGN_MODE_TEXTUAL": + case 2: + message.mode = 2; + break; + case "SIGN_MODE_LEGACY_AMINO_JSON": + case 127: + message.mode = 127; + break; + } + return message; + }; + + /** + * Creates a plain object from a Single message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @static + * @param {cosmos_sdk.tx.v1.ModeInfo.Single} message Single + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Single.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "SIGN_MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.cosmos_sdk.tx.v1.SignMode[message.mode] : message.mode; + return object; + }; + + /** + * Converts this Single to JSON. + * @function toJSON + * @memberof cosmos_sdk.tx.v1.ModeInfo.Single + * @instance + * @returns {Object.} JSON object + */ + Single.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Single; + })(); + + ModeInfo.Multi = (function() { + + /** + * Properties of a Multi. + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @interface IMulti + * @property {cosmos_sdk.crypto.v1.ICompactBitArray|null} [bitarray] Multi bitarray + * @property {Array.|null} [modeInfos] Multi modeInfos + */ + + /** + * Constructs a new Multi. + * @memberof cosmos_sdk.tx.v1.ModeInfo + * @classdesc Represents a Multi. + * @implements IMulti + * @constructor + * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti=} [properties] Properties to set + */ + function Multi(properties) { + this.modeInfos = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Multi bitarray. + * @member {cosmos_sdk.crypto.v1.ICompactBitArray|null|undefined} bitarray + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @instance + */ + Multi.prototype.bitarray = null; + + /** + * Multi modeInfos. + * @member {Array.} modeInfos + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @instance + */ + Multi.prototype.modeInfos = $util.emptyArray; + + /** + * Creates a new Multi instance using the specified properties. + * @function create + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @static + * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti=} [properties] Properties to set + * @returns {cosmos_sdk.tx.v1.ModeInfo.Multi} Multi instance + */ + Multi.create = function create(properties) { + return new Multi(properties); + }; + + /** + * Encodes the specified Multi message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @static + * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bitarray != null && Object.hasOwnProperty.call(message, "bitarray")) + $root.cosmos_sdk.crypto.v1.CompactBitArray.encode(message.bitarray, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.modeInfos != null && message.modeInfos.length) + for (var i = 0; i < message.modeInfos.length; ++i) + $root.cosmos_sdk.tx.v1.ModeInfo.encode(message.modeInfos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @static + * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti} message Multi message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Multi.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Multi message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.tx.v1.ModeInfo.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.ModeInfo.Multi(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.bitarray = $root.cosmos_sdk.crypto.v1.CompactBitArray.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.modeInfos && message.modeInfos.length)) + message.modeInfos = []; + message.modeInfos.push($root.cosmos_sdk.tx.v1.ModeInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Multi message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.tx.v1.ModeInfo.Multi} Multi + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Multi.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Multi message. + * @function verify + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Multi.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) { + var error = $root.cosmos_sdk.crypto.v1.CompactBitArray.verify(message.bitarray); + if (error) + return "bitarray." + error; + } + if (message.modeInfos != null && message.hasOwnProperty("modeInfos")) { + if (!Array.isArray(message.modeInfos)) + return "modeInfos: array expected"; + for (var i = 0; i < message.modeInfos.length; ++i) { + var error = $root.cosmos_sdk.tx.v1.ModeInfo.verify(message.modeInfos[i]); + if (error) + return "modeInfos." + error; + } + } + return null; + }; + + /** + * Creates a Multi message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.tx.v1.ModeInfo.Multi} Multi + */ + Multi.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.tx.v1.ModeInfo.Multi) + return object; + var message = new $root.cosmos_sdk.tx.v1.ModeInfo.Multi(); + if (object.bitarray != null) { + if (typeof object.bitarray !== "object") + throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.Multi.bitarray: object expected"); + message.bitarray = $root.cosmos_sdk.crypto.v1.CompactBitArray.fromObject(object.bitarray); + } + if (object.modeInfos) { + if (!Array.isArray(object.modeInfos)) + throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.Multi.modeInfos: array expected"); + message.modeInfos = []; + for (var i = 0; i < object.modeInfos.length; ++i) { + if (typeof object.modeInfos[i] !== "object") + throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.Multi.modeInfos: object expected"); + message.modeInfos[i] = $root.cosmos_sdk.tx.v1.ModeInfo.fromObject(object.modeInfos[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Multi message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @static + * @param {cosmos_sdk.tx.v1.ModeInfo.Multi} message Multi + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Multi.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.modeInfos = []; + if (options.defaults) + object.bitarray = null; + if (message.bitarray != null && message.hasOwnProperty("bitarray")) + object.bitarray = $root.cosmos_sdk.crypto.v1.CompactBitArray.toObject(message.bitarray, options); + if (message.modeInfos && message.modeInfos.length) { + object.modeInfos = []; + for (var j = 0; j < message.modeInfos.length; ++j) + object.modeInfos[j] = $root.cosmos_sdk.tx.v1.ModeInfo.toObject(message.modeInfos[j], options); + } + return object; + }; + + /** + * Converts this Multi to JSON. + * @function toJSON + * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi + * @instance + * @returns {Object.} JSON object + */ + Multi.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Multi; + })(); + + return ModeInfo; + })(); + + /** + * SignMode enum. + * @name cosmos_sdk.tx.v1.SignMode + * @enum {number} + * @property {number} SIGN_MODE_UNSPECIFIED=0 SIGN_MODE_UNSPECIFIED value + * @property {number} SIGN_MODE_DIRECT=1 SIGN_MODE_DIRECT value + * @property {number} SIGN_MODE_TEXTUAL=2 SIGN_MODE_TEXTUAL value + * @property {number} SIGN_MODE_LEGACY_AMINO_JSON=127 SIGN_MODE_LEGACY_AMINO_JSON value + */ + 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; + })(); + + v1.Fee = (function() { + + /** + * Properties of a Fee. + * @memberof cosmos_sdk.tx.v1 + * @interface IFee + * @property {Array.|null} [amount] Fee amount + * @property {number|Long|null} [gasLimit] Fee gasLimit + */ + + /** + * Constructs a new Fee. + * @memberof cosmos_sdk.tx.v1 + * @classdesc Represents a Fee. + * @implements IFee + * @constructor + * @param {cosmos_sdk.tx.v1.IFee=} [properties] Properties to set + */ + function Fee(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Fee amount. + * @member {Array.} amount + * @memberof cosmos_sdk.tx.v1.Fee + * @instance + */ + Fee.prototype.amount = $util.emptyArray; + + /** + * Fee gasLimit. + * @member {number|Long} gasLimit + * @memberof cosmos_sdk.tx.v1.Fee + * @instance + */ + Fee.prototype.gasLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Fee instance using the specified properties. + * @function create + * @memberof cosmos_sdk.tx.v1.Fee + * @static + * @param {cosmos_sdk.tx.v1.IFee=} [properties] Properties to set + * @returns {cosmos_sdk.tx.v1.Fee} Fee instance + */ + Fee.create = function create(properties) { + return new Fee(properties); + }; + + /** + * Encodes the specified Fee message. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.tx.v1.Fee + * @static + * @param {cosmos_sdk.tx.v1.IFee} message Fee message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fee.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.gasLimit != null && Object.hasOwnProperty.call(message, "gasLimit")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.gasLimit); + return writer; + }; + + /** + * Encodes the specified Fee message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.tx.v1.Fee + * @static + * @param {cosmos_sdk.tx.v1.IFee} message Fee message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fee.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fee message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.tx.v1.Fee + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.tx.v1.Fee} Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fee.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.Fee(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.gasLimit = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Fee message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.tx.v1.Fee + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.tx.v1.Fee} Fee + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fee.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fee message. + * @function verify + * @memberof cosmos_sdk.tx.v1.Fee + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Fee.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) + if (!$util.isInteger(message.gasLimit) && !(message.gasLimit && $util.isInteger(message.gasLimit.low) && $util.isInteger(message.gasLimit.high))) + return "gasLimit: integer|Long expected"; + return null; + }; + + /** + * Creates a Fee message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.tx.v1.Fee + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.tx.v1.Fee} Fee + */ + Fee.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.tx.v1.Fee) + return object; + var message = new $root.cosmos_sdk.tx.v1.Fee(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos_sdk.tx.v1.Fee.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos_sdk.tx.v1.Fee.amount: object expected"); + message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); + } + } + if (object.gasLimit != null) + if ($util.Long) + (message.gasLimit = $util.Long.fromValue(object.gasLimit)).unsigned = true; + else if (typeof object.gasLimit === "string") + message.gasLimit = parseInt(object.gasLimit, 10); + else if (typeof object.gasLimit === "number") + message.gasLimit = object.gasLimit; + else if (typeof object.gasLimit === "object") + message.gasLimit = new $util.LongBits(object.gasLimit.low >>> 0, object.gasLimit.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Fee message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.tx.v1.Fee + * @static + * @param {cosmos_sdk.tx.v1.Fee} message Fee + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Fee.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.gasLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasLimit = options.longs === String ? "0" : 0; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); + } + if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) + if (typeof message.gasLimit === "number") + object.gasLimit = options.longs === String ? String(message.gasLimit) : message.gasLimit; + else + object.gasLimit = options.longs === String ? $util.Long.prototype.toString.call(message.gasLimit) : options.longs === Number ? new $util.LongBits(message.gasLimit.low >>> 0, message.gasLimit.high >>> 0).toNumber(true) : message.gasLimit; + return object; + }; + + /** + * Converts this Fee to JSON. + * @function toJSON + * @memberof cosmos_sdk.tx.v1.Fee + * @instance + * @returns {Object.} JSON object + */ + Fee.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Fee; + })(); + + return v1; + })(); + + return tx; + })(); + + cosmos_sdk.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk + * @namespace + */ + var v1 = {}; + + v1.Coin = (function() { + + /** + * Properties of a Coin. + * @memberof cosmos_sdk.v1 + * @interface ICoin + * @property {string|null} [denom] Coin denom + * @property {string|null} [amount] Coin amount + */ + + /** + * Constructs a new Coin. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a Coin. + * @implements ICoin + * @constructor + * @param {cosmos_sdk.v1.ICoin=} [properties] Properties to set + */ + function Coin(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Coin denom. + * @member {string} denom + * @memberof cosmos_sdk.v1.Coin + * @instance + */ + Coin.prototype.denom = ""; + + /** + * Coin amount. + * @member {string} amount + * @memberof cosmos_sdk.v1.Coin + * @instance + */ + Coin.prototype.amount = ""; + + /** + * Creates a new Coin instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {cosmos_sdk.v1.ICoin=} [properties] Properties to set + * @returns {cosmos_sdk.v1.Coin} Coin instance + */ + Coin.create = function create(properties) { + return new Coin(properties); + }; + + /** + * Encodes the specified Coin message. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {cosmos_sdk.v1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {cosmos_sdk.v1.ICoin} message Coin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Coin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.Coin(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Coin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Coin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Coin message. + * @function verify + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Coin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a Coin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.Coin} Coin + */ + Coin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.Coin) + return object; + var message = new $root.cosmos_sdk.v1.Coin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a Coin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {cosmos_sdk.v1.Coin} message Coin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Coin.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this Coin to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.Coin + * @instance + * @returns {Object.} JSON object + */ + Coin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Coin; + })(); + + v1.DecCoin = (function() { + + /** + * Properties of a DecCoin. + * @memberof cosmos_sdk.v1 + * @interface IDecCoin + * @property {string|null} [denom] DecCoin denom + * @property {string|null} [amount] DecCoin amount + */ + + /** + * Constructs a new DecCoin. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a DecCoin. + * @implements IDecCoin + * @constructor + * @param {cosmos_sdk.v1.IDecCoin=} [properties] Properties to set + */ + function DecCoin(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecCoin denom. + * @member {string} denom + * @memberof cosmos_sdk.v1.DecCoin + * @instance + */ + DecCoin.prototype.denom = ""; + + /** + * DecCoin amount. + * @member {string} amount + * @memberof cosmos_sdk.v1.DecCoin + * @instance + */ + DecCoin.prototype.amount = ""; + + /** + * Creates a new DecCoin instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {cosmos_sdk.v1.IDecCoin=} [properties] Properties to set + * @returns {cosmos_sdk.v1.DecCoin} DecCoin instance + */ + DecCoin.create = function create(properties) { + return new DecCoin(properties); + }; + + /** + * Encodes the specified DecCoin message. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {cosmos_sdk.v1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); + return writer; + }; + + /** + * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {cosmos_sdk.v1.IDecCoin} message DecCoin message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecCoin.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.DecCoin(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + case 2: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecCoin.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecCoin message. + * @function verify + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecCoin.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.DecCoin} DecCoin + */ + DecCoin.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.DecCoin) + return object; + var message = new $root.cosmos_sdk.v1.DecCoin(); + if (object.denom != null) + message.denom = String(object.denom); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a DecCoin message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {cosmos_sdk.v1.DecCoin} message DecCoin + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecCoin.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.denom = ""; + object.amount = ""; + } + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this DecCoin to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.DecCoin + * @instance + * @returns {Object.} JSON object + */ + DecCoin.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecCoin; + })(); + + v1.IntProto = (function() { + + /** + * Properties of an IntProto. + * @memberof cosmos_sdk.v1 + * @interface IIntProto + * @property {string|null} [int] IntProto int + */ + + /** + * Constructs a new IntProto. + * @memberof cosmos_sdk.v1 + * @classdesc Represents an IntProto. + * @implements IIntProto + * @constructor + * @param {cosmos_sdk.v1.IIntProto=} [properties] Properties to set + */ + function IntProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IntProto int. + * @member {string} int + * @memberof cosmos_sdk.v1.IntProto + * @instance + */ + IntProto.prototype.int = ""; + + /** + * Creates a new IntProto instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {cosmos_sdk.v1.IIntProto=} [properties] Properties to set + * @returns {cosmos_sdk.v1.IntProto} IntProto instance + */ + IntProto.create = function create(properties) { + return new IntProto(properties); + }; + + /** + * Encodes the specified IntProto message. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {cosmos_sdk.v1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int != null && Object.hasOwnProperty.call(message, "int")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.int); + return writer; + }; + + /** + * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {cosmos_sdk.v1.IIntProto} message IntProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IntProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.IntProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.int = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IntProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IntProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IntProto message. + * @function verify + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IntProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.int != null && message.hasOwnProperty("int")) + if (!$util.isString(message.int)) + return "int: string expected"; + return null; + }; + + /** + * Creates an IntProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.IntProto} IntProto + */ + IntProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.IntProto) + return object; + var message = new $root.cosmos_sdk.v1.IntProto(); + if (object.int != null) + message.int = String(object.int); + return message; + }; + + /** + * Creates a plain object from an IntProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {cosmos_sdk.v1.IntProto} message IntProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IntProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.int = ""; + if (message.int != null && message.hasOwnProperty("int")) + object.int = message.int; + return object; + }; + + /** + * Converts this IntProto to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.IntProto + * @instance + * @returns {Object.} JSON object + */ + IntProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return IntProto; + })(); + + v1.DecProto = (function() { + + /** + * Properties of a DecProto. + * @memberof cosmos_sdk.v1 + * @interface IDecProto + * @property {string|null} [dec] DecProto dec + */ + + /** + * Constructs a new DecProto. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a DecProto. + * @implements IDecProto + * @constructor + * @param {cosmos_sdk.v1.IDecProto=} [properties] Properties to set + */ + function DecProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DecProto dec. + * @member {string} dec + * @memberof cosmos_sdk.v1.DecProto + * @instance + */ + DecProto.prototype.dec = ""; + + /** + * Creates a new DecProto instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {cosmos_sdk.v1.IDecProto=} [properties] Properties to set + * @returns {cosmos_sdk.v1.DecProto} DecProto instance + */ + DecProto.create = function create(properties) { + return new DecProto(properties); + }; + + /** + * Encodes the specified DecProto message. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {cosmos_sdk.v1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dec != null && Object.hasOwnProperty.call(message, "dec")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dec); + return writer; + }; + + /** + * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {cosmos_sdk.v1.IDecProto} message DecProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DecProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.DecProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.dec = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DecProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DecProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DecProto message. + * @function verify + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DecProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.dec != null && message.hasOwnProperty("dec")) + if (!$util.isString(message.dec)) + return "dec: string expected"; + return null; + }; + + /** + * Creates a DecProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.DecProto} DecProto + */ + DecProto.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.DecProto) + return object; + var message = new $root.cosmos_sdk.v1.DecProto(); + if (object.dec != null) + message.dec = String(object.dec); + return message; + }; + + /** + * Creates a plain object from a DecProto message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {cosmos_sdk.v1.DecProto} message DecProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DecProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dec = ""; + if (message.dec != null && message.hasOwnProperty("dec")) + object.dec = message.dec; + return object; + }; + + /** + * Converts this DecProto to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.DecProto + * @instance + * @returns {Object.} JSON object + */ + DecProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DecProto; + })(); + + v1.ValAddresses = (function() { + + /** + * Properties of a ValAddresses. + * @memberof cosmos_sdk.v1 + * @interface IValAddresses + * @property {Array.|null} [addresses] ValAddresses addresses + */ + + /** + * Constructs a new ValAddresses. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a ValAddresses. + * @implements IValAddresses + * @constructor + * @param {cosmos_sdk.v1.IValAddresses=} [properties] Properties to set + */ + function ValAddresses(properties) { + this.addresses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValAddresses addresses. + * @member {Array.} addresses + * @memberof cosmos_sdk.v1.ValAddresses + * @instance + */ + ValAddresses.prototype.addresses = $util.emptyArray; + + /** + * Creates a new ValAddresses instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {cosmos_sdk.v1.IValAddresses=} [properties] Properties to set + * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses instance + */ + ValAddresses.create = function create(properties) { + return new ValAddresses(properties); + }; + + /** + * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {cosmos_sdk.v1.IValAddresses} message ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValAddresses.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addresses != null && message.addresses.length) + for (var i = 0; i < message.addresses.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.addresses[i]); + return writer; + }; + + /** + * Encodes the specified ValAddresses message, length delimited. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {cosmos_sdk.v1.IValAddresses} message ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValAddresses.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValAddresses message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValAddresses.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.ValAddresses(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.addresses && message.addresses.length)) + message.addresses = []; + message.addresses.push(reader.bytes()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValAddresses message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValAddresses.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValAddresses message. + * @function verify + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValAddresses.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.addresses != null && message.hasOwnProperty("addresses")) { + if (!Array.isArray(message.addresses)) + return "addresses: array expected"; + for (var i = 0; i < message.addresses.length; ++i) + if (!(message.addresses[i] && typeof message.addresses[i].length === "number" || $util.isString(message.addresses[i]))) + return "addresses: buffer[] expected"; + } + return null; + }; + + /** + * Creates a ValAddresses message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses + */ + ValAddresses.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.ValAddresses) + return object; + var message = new $root.cosmos_sdk.v1.ValAddresses(); + if (object.addresses) { + if (!Array.isArray(object.addresses)) + throw TypeError(".cosmos_sdk.v1.ValAddresses.addresses: array expected"); + message.addresses = []; + for (var i = 0; i < object.addresses.length; ++i) + if (typeof object.addresses[i] === "string") + $util.base64.decode(object.addresses[i], message.addresses[i] = $util.newBuffer($util.base64.length(object.addresses[i])), 0); + else if (object.addresses[i].length) + message.addresses[i] = object.addresses[i]; + } + return message; + }; + + /** + * Creates a plain object from a ValAddresses message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {cosmos_sdk.v1.ValAddresses} message ValAddresses + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValAddresses.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.addresses = []; + if (message.addresses && message.addresses.length) { + object.addresses = []; + for (var j = 0; j < message.addresses.length; ++j) + object.addresses[j] = options.bytes === String ? $util.base64.encode(message.addresses[j], 0, message.addresses[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.addresses[j]) : message.addresses[j]; + } + return object; + }; + + /** + * Converts this ValAddresses to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.ValAddresses + * @instance + * @returns {Object.} JSON object + */ + ValAddresses.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValAddresses; + })(); + + v1.GasInfo = (function() { + + /** + * Properties of a GasInfo. + * @memberof cosmos_sdk.v1 + * @interface IGasInfo + * @property {number|Long|null} [gasWanted] GasInfo gasWanted + * @property {number|Long|null} [gasUsed] GasInfo gasUsed + */ + + /** + * Constructs a new GasInfo. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a GasInfo. + * @implements IGasInfo + * @constructor + * @param {cosmos_sdk.v1.IGasInfo=} [properties] Properties to set + */ + function GasInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GasInfo gasWanted. + * @member {number|Long} gasWanted + * @memberof cosmos_sdk.v1.GasInfo + * @instance + */ + GasInfo.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GasInfo gasUsed. + * @member {number|Long} gasUsed + * @memberof cosmos_sdk.v1.GasInfo + * @instance + */ + GasInfo.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GasInfo instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {cosmos_sdk.v1.IGasInfo=} [properties] Properties to set + * @returns {cosmos_sdk.v1.GasInfo} GasInfo instance + */ + GasInfo.create = function create(properties) { + return new GasInfo(properties); + }; + + /** + * Encodes the specified GasInfo message. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {cosmos_sdk.v1.IGasInfo} message GasInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GasInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.gasUsed); + return writer; + }; + + /** + * Encodes the specified GasInfo message, length delimited. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {cosmos_sdk.v1.IGasInfo} message GasInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GasInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GasInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.GasInfo} GasInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GasInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.GasInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gasWanted = reader.uint64(); + break; + case 2: + message.gasUsed = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GasInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.GasInfo} GasInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GasInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GasInfo message. + * @function verify + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GasInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + return null; + }; + + /** + * Creates a GasInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.GasInfo} GasInfo + */ + GasInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.GasInfo) + return object; + var message = new $root.cosmos_sdk.v1.GasInfo(); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = true; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(true); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = true; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a GasInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {cosmos_sdk.v1.GasInfo} message GasInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GasInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + } + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber(true) : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber(true) : message.gasUsed; + return object; + }; + + /** + * Converts this GasInfo to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.GasInfo + * @instance + * @returns {Object.} JSON object + */ + GasInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GasInfo; + })(); + + v1.Result = (function() { + + /** + * Properties of a Result. + * @memberof cosmos_sdk.v1 + * @interface IResult + * @property {Uint8Array|null} [data] Result data + * @property {string|null} [log] Result log + * @property {Array.|null} [events] Result events + */ + + /** + * Constructs a new Result. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a Result. + * @implements IResult + * @constructor + * @param {cosmos_sdk.v1.IResult=} [properties] Properties to set + */ + function Result(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Result data. + * @member {Uint8Array} data + * @memberof cosmos_sdk.v1.Result + * @instance + */ + Result.prototype.data = $util.newBuffer([]); + + /** + * Result log. + * @member {string} log + * @memberof cosmos_sdk.v1.Result + * @instance + */ + Result.prototype.log = ""; + + /** + * Result events. + * @member {Array.} events + * @memberof cosmos_sdk.v1.Result + * @instance + */ + Result.prototype.events = $util.emptyArray; + + /** + * Creates a new Result instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.Result + * @static + * @param {cosmos_sdk.v1.IResult=} [properties] Properties to set + * @returns {cosmos_sdk.v1.Result} Result instance + */ + Result.create = function create(properties) { + return new Result(properties); + }; + + /** + * Encodes the specified Result message. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.Result + * @static + * @param {cosmos_sdk.v1.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.log); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.Result + * @static + * @param {cosmos_sdk.v1.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Result message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.Result(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + case 2: + message.log = reader.string(); + break; + case 3: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Result message. + * @function verify + * @memberof cosmos_sdk.v1.Result + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Result.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.types.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.Result + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.Result} Result + */ + Result.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.Result) + return object; + var message = new $root.cosmos_sdk.v1.Result(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".cosmos_sdk.v1.Result.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".cosmos_sdk.v1.Result.events: object expected"); + message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.Result + * @static + * @param {cosmos_sdk.v1.Result} message Result + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Result.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this Result to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.Result + * @instance + * @returns {Object.} JSON object + */ + Result.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Result; + })(); + + v1.SimulationResponse = (function() { + + /** + * Properties of a SimulationResponse. + * @memberof cosmos_sdk.v1 + * @interface ISimulationResponse + * @property {cosmos_sdk.v1.IGasInfo|null} [gasInfo] SimulationResponse gasInfo + * @property {cosmos_sdk.v1.IResult|null} [result] SimulationResponse result + */ + + /** + * Constructs a new SimulationResponse. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a SimulationResponse. + * @implements ISimulationResponse + * @constructor + * @param {cosmos_sdk.v1.ISimulationResponse=} [properties] Properties to set + */ + function SimulationResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SimulationResponse gasInfo. + * @member {cosmos_sdk.v1.IGasInfo|null|undefined} gasInfo + * @memberof cosmos_sdk.v1.SimulationResponse + * @instance + */ + SimulationResponse.prototype.gasInfo = null; + + /** + * SimulationResponse result. + * @member {cosmos_sdk.v1.IResult|null|undefined} result + * @memberof cosmos_sdk.v1.SimulationResponse + * @instance + */ + SimulationResponse.prototype.result = null; + + /** + * Creates a new SimulationResponse instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {cosmos_sdk.v1.ISimulationResponse=} [properties] Properties to set + * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse instance + */ + SimulationResponse.create = function create(properties) { + return new SimulationResponse(properties); + }; + + /** + * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {cosmos_sdk.v1.ISimulationResponse} message SimulationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulationResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gasInfo != null && Object.hasOwnProperty.call(message, "gasInfo")) + $root.cosmos_sdk.v1.GasInfo.encode(message.gasInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.cosmos_sdk.v1.Result.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SimulationResponse message, length delimited. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {cosmos_sdk.v1.ISimulationResponse} message SimulationResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SimulationResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulationResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.SimulationResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.gasInfo = $root.cosmos_sdk.v1.GasInfo.decode(reader, reader.uint32()); + break; + case 2: + message.result = $root.cosmos_sdk.v1.Result.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulationResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SimulationResponse message. + * @function verify + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SimulationResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) { + var error = $root.cosmos_sdk.v1.GasInfo.verify(message.gasInfo); + if (error) + return "gasInfo." + error; + } + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.cosmos_sdk.v1.Result.verify(message.result); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates a SimulationResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse + */ + SimulationResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.SimulationResponse) + return object; + var message = new $root.cosmos_sdk.v1.SimulationResponse(); + if (object.gasInfo != null) { + if (typeof object.gasInfo !== "object") + throw TypeError(".cosmos_sdk.v1.SimulationResponse.gasInfo: object expected"); + message.gasInfo = $root.cosmos_sdk.v1.GasInfo.fromObject(object.gasInfo); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".cosmos_sdk.v1.SimulationResponse.result: object expected"); + message.result = $root.cosmos_sdk.v1.Result.fromObject(object.result); + } + return message; + }; + + /** + * Creates a plain object from a SimulationResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {cosmos_sdk.v1.SimulationResponse} message SimulationResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SimulationResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gasInfo = null; + object.result = null; + } + if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) + object.gasInfo = $root.cosmos_sdk.v1.GasInfo.toObject(message.gasInfo, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.cosmos_sdk.v1.Result.toObject(message.result, options); + return object; + }; + + /** + * Converts this SimulationResponse to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.SimulationResponse + * @instance + * @returns {Object.} JSON object + */ + SimulationResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SimulationResponse; + })(); + + v1.MsgData = (function() { + + /** + * Properties of a MsgData. + * @memberof cosmos_sdk.v1 + * @interface IMsgData + * @property {string|null} [msgType] MsgData msgType + * @property {Uint8Array|null} [data] MsgData data + */ + + /** + * Constructs a new MsgData. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a MsgData. + * @implements IMsgData + * @constructor + * @param {cosmos_sdk.v1.IMsgData=} [properties] Properties to set + */ + function MsgData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgData msgType. + * @member {string} msgType + * @memberof cosmos_sdk.v1.MsgData + * @instance + */ + MsgData.prototype.msgType = ""; + + /** + * MsgData data. + * @member {Uint8Array} data + * @memberof cosmos_sdk.v1.MsgData + * @instance + */ + MsgData.prototype.data = $util.newBuffer([]); + + /** + * Creates a new MsgData instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {cosmos_sdk.v1.IMsgData=} [properties] Properties to set + * @returns {cosmos_sdk.v1.MsgData} MsgData instance + */ + MsgData.create = function create(properties) { + return new MsgData(properties); + }; + + /** + * Encodes the specified MsgData message. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {cosmos_sdk.v1.IMsgData} message MsgData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.msgType != null && Object.hasOwnProperty.call(message, "msgType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.msgType); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified MsgData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {cosmos_sdk.v1.IMsgData} message MsgData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgData message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.MsgData} MsgData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.MsgData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.msgType = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.MsgData} MsgData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgData message. + * @function verify + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.msgType != null && message.hasOwnProperty("msgType")) + if (!$util.isString(message.msgType)) + return "msgType: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a MsgData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.MsgData} MsgData + */ + MsgData.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.MsgData) + return object; + var message = new $root.cosmos_sdk.v1.MsgData(); + if (object.msgType != null) + message.msgType = String(object.msgType); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a MsgData message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {cosmos_sdk.v1.MsgData} message MsgData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.msgType = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.msgType != null && message.hasOwnProperty("msgType")) + object.msgType = message.msgType; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this MsgData to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.MsgData + * @instance + * @returns {Object.} JSON object + */ + MsgData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgData; + })(); + + v1.TxData = (function() { + + /** + * Properties of a TxData. + * @memberof cosmos_sdk.v1 + * @interface ITxData + * @property {Array.|null} [data] TxData data + */ + + /** + * Constructs a new TxData. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a TxData. + * @implements ITxData + * @constructor + * @param {cosmos_sdk.v1.ITxData=} [properties] Properties to set + */ + function TxData(properties) { + this.data = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TxData data. + * @member {Array.} data + * @memberof cosmos_sdk.v1.TxData + * @instance + */ + TxData.prototype.data = $util.emptyArray; + + /** + * Creates a new TxData instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {cosmos_sdk.v1.ITxData=} [properties] Properties to set + * @returns {cosmos_sdk.v1.TxData} TxData instance + */ + TxData.create = function create(properties) { + return new TxData(properties); + }; + + /** + * Encodes the specified TxData message. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {cosmos_sdk.v1.ITxData} message TxData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && message.data.length) + for (var i = 0; i < message.data.length; ++i) + $root.cosmos_sdk.v1.MsgData.encode(message.data[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TxData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {cosmos_sdk.v1.ITxData} message TxData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TxData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TxData message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.v1.TxData} TxData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.TxData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.data && message.data.length)) + message.data = []; + message.data.push($root.cosmos_sdk.v1.MsgData.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TxData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.v1.TxData} TxData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TxData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TxData message. + * @function verify + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TxData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) { + if (!Array.isArray(message.data)) + return "data: array expected"; + for (var i = 0; i < message.data.length; ++i) { + var error = $root.cosmos_sdk.v1.MsgData.verify(message.data[i]); + if (error) + return "data." + error; + } + } + return null; + }; + + /** + * Creates a TxData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.v1.TxData} TxData + */ + TxData.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.v1.TxData) + return object; + var message = new $root.cosmos_sdk.v1.TxData(); + if (object.data) { + if (!Array.isArray(object.data)) + throw TypeError(".cosmos_sdk.v1.TxData.data: array expected"); + message.data = []; + for (var i = 0; i < object.data.length; ++i) { + if (typeof object.data[i] !== "object") + throw TypeError(".cosmos_sdk.v1.TxData.data: object expected"); + message.data[i] = $root.cosmos_sdk.v1.MsgData.fromObject(object.data[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TxData message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {cosmos_sdk.v1.TxData} message TxData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TxData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.data = []; + if (message.data && message.data.length) { + object.data = []; + for (var j = 0; j < message.data.length; ++j) + object.data[j] = $root.cosmos_sdk.v1.MsgData.toObject(message.data[j], options); + } + return object; + }; + + /** + * Converts this TxData to JSON. + * @function toJSON + * @memberof cosmos_sdk.v1.TxData + * @instance + * @returns {Object.} JSON object + */ + TxData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TxData; + })(); + + return v1; + })(); + + cosmos_sdk.x = (function() { + + /** + * Namespace x. + * @memberof cosmos_sdk + * @namespace + */ + var x = {}; + + x.auth = (function() { + + /** + * Namespace auth. + * @memberof cosmos_sdk.x + * @namespace + */ + var auth = {}; + + auth.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.auth + * @namespace + */ + var v1 = {}; + + v1.BaseAccount = (function() { + + /** + * Properties of a BaseAccount. + * @memberof cosmos_sdk.x.auth.v1 + * @interface IBaseAccount + * @property {Uint8Array|null} [address] BaseAccount address + * @property {Uint8Array|null} [pubKey] BaseAccount pubKey + * @property {number|Long|null} [accountNumber] BaseAccount accountNumber + * @property {number|Long|null} [sequence] BaseAccount sequence + */ + + /** + * Constructs a new BaseAccount. + * @memberof cosmos_sdk.x.auth.v1 + * @classdesc Represents a BaseAccount. + * @implements IBaseAccount + * @constructor + * @param {cosmos_sdk.x.auth.v1.IBaseAccount=} [properties] Properties to set + */ + function BaseAccount(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BaseAccount address. + * @member {Uint8Array} address + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @instance + */ + BaseAccount.prototype.address = $util.newBuffer([]); + + /** + * BaseAccount pubKey. + * @member {Uint8Array} pubKey + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @instance + */ + BaseAccount.prototype.pubKey = $util.newBuffer([]); + + /** + * BaseAccount accountNumber. + * @member {number|Long} accountNumber + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @instance + */ + BaseAccount.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BaseAccount sequence. + * @member {number|Long} sequence + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @instance + */ + BaseAccount.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new BaseAccount instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @static + * @param {cosmos_sdk.x.auth.v1.IBaseAccount=} [properties] Properties to set + * @returns {cosmos_sdk.x.auth.v1.BaseAccount} BaseAccount instance + */ + BaseAccount.create = function create(properties) { + return new BaseAccount(properties); + }; + + /** + * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @static + * @param {cosmos_sdk.x.auth.v1.IBaseAccount} message BaseAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BaseAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.pubKey); + if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.accountNumber); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sequence); + return writer; + }; + + /** + * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @static + * @param {cosmos_sdk.x.auth.v1.IBaseAccount} message BaseAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BaseAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BaseAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.auth.v1.BaseAccount} BaseAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BaseAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.v1.BaseAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + message.pubKey = reader.bytes(); + break; + case 3: + message.accountNumber = reader.uint64(); + break; + case 4: + message.sequence = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BaseAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.auth.v1.BaseAccount} BaseAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BaseAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BaseAccount message. + * @function verify + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BaseAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + if (!(message.pubKey && typeof message.pubKey.length === "number" || $util.isString(message.pubKey))) + return "pubKey: buffer expected"; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (!$util.isInteger(message.accountNumber) && !(message.accountNumber && $util.isInteger(message.accountNumber.low) && $util.isInteger(message.accountNumber.high))) + return "accountNumber: integer|Long expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + return null; + }; + + /** + * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.auth.v1.BaseAccount} BaseAccount + */ + BaseAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.auth.v1.BaseAccount) + return object; + var message = new $root.cosmos_sdk.x.auth.v1.BaseAccount(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.pubKey != null) + if (typeof object.pubKey === "string") + $util.base64.decode(object.pubKey, message.pubKey = $util.newBuffer($util.base64.length(object.pubKey)), 0); + else if (object.pubKey.length) + message.pubKey = object.pubKey; + if (object.accountNumber != null) + if ($util.Long) + (message.accountNumber = $util.Long.fromValue(object.accountNumber)).unsigned = true; + else if (typeof object.accountNumber === "string") + message.accountNumber = parseInt(object.accountNumber, 10); + else if (typeof object.accountNumber === "number") + message.accountNumber = object.accountNumber; + else if (typeof object.accountNumber === "object") + message.accountNumber = new $util.LongBits(object.accountNumber.low >>> 0, object.accountNumber.high >>> 0).toNumber(true); + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @static + * @param {cosmos_sdk.x.auth.v1.BaseAccount} message BaseAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BaseAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if (options.bytes === String) + object.pubKey = ""; + else { + object.pubKey = []; + if (options.bytes !== Array) + object.pubKey = $util.newBuffer(object.pubKey); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.accountNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.accountNumber = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = options.bytes === String ? $util.base64.encode(message.pubKey, 0, message.pubKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.pubKey) : message.pubKey; + if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) + if (typeof message.accountNumber === "number") + object.accountNumber = options.longs === String ? String(message.accountNumber) : message.accountNumber; + else + object.accountNumber = options.longs === String ? $util.Long.prototype.toString.call(message.accountNumber) : options.longs === Number ? new $util.LongBits(message.accountNumber.low >>> 0, message.accountNumber.high >>> 0).toNumber(true) : message.accountNumber; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + return object; + }; + + /** + * Converts this BaseAccount to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.auth.v1.BaseAccount + * @instance + * @returns {Object.} JSON object + */ + BaseAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BaseAccount; + })(); + + v1.ModuleAccount = (function() { + + /** + * Properties of a ModuleAccount. + * @memberof cosmos_sdk.x.auth.v1 + * @interface IModuleAccount + * @property {cosmos_sdk.x.auth.v1.IBaseAccount|null} [baseAccount] ModuleAccount baseAccount + * @property {string|null} [name] ModuleAccount name + * @property {Array.|null} [permissions] ModuleAccount permissions + */ + + /** + * Constructs a new ModuleAccount. + * @memberof cosmos_sdk.x.auth.v1 + * @classdesc Represents a ModuleAccount. + * @implements IModuleAccount + * @constructor + * @param {cosmos_sdk.x.auth.v1.IModuleAccount=} [properties] Properties to set + */ + function ModuleAccount(properties) { + this.permissions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ModuleAccount baseAccount. + * @member {cosmos_sdk.x.auth.v1.IBaseAccount|null|undefined} baseAccount + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @instance + */ + ModuleAccount.prototype.baseAccount = null; + + /** + * ModuleAccount name. + * @member {string} name + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @instance + */ + ModuleAccount.prototype.name = ""; + + /** + * ModuleAccount permissions. + * @member {Array.} permissions + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @instance + */ + ModuleAccount.prototype.permissions = $util.emptyArray; + + /** + * Creates a new ModuleAccount instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @static + * @param {cosmos_sdk.x.auth.v1.IModuleAccount=} [properties] Properties to set + * @returns {cosmos_sdk.x.auth.v1.ModuleAccount} ModuleAccount instance + */ + ModuleAccount.create = function create(properties) { + return new ModuleAccount(properties); + }; + + /** + * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @static + * @param {cosmos_sdk.x.auth.v1.IModuleAccount} message ModuleAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModuleAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseAccount != null && Object.hasOwnProperty.call(message, "baseAccount")) + $root.cosmos_sdk.x.auth.v1.BaseAccount.encode(message.baseAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.permissions != null && message.permissions.length) + for (var i = 0; i < message.permissions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.permissions[i]); + return writer; + }; + + /** + * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @static + * @param {cosmos_sdk.x.auth.v1.IModuleAccount} message ModuleAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModuleAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModuleAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.auth.v1.ModuleAccount} ModuleAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModuleAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.v1.ModuleAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.decode(reader, reader.uint32()); + break; + case 2: + message.name = reader.string(); + break; + case 3: + if (!(message.permissions && message.permissions.length)) + message.permissions = []; + message.permissions.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.auth.v1.ModuleAccount} ModuleAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModuleAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModuleAccount message. + * @function verify + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModuleAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) { + var error = $root.cosmos_sdk.x.auth.v1.BaseAccount.verify(message.baseAccount); + if (error) + return "baseAccount." + error; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.permissions != null && message.hasOwnProperty("permissions")) { + if (!Array.isArray(message.permissions)) + return "permissions: array expected"; + for (var i = 0; i < message.permissions.length; ++i) + if (!$util.isString(message.permissions[i])) + return "permissions: string[] expected"; + } + return null; + }; + + /** + * Creates a ModuleAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.auth.v1.ModuleAccount} ModuleAccount + */ + ModuleAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.auth.v1.ModuleAccount) + return object; + var message = new $root.cosmos_sdk.x.auth.v1.ModuleAccount(); + if (object.baseAccount != null) { + if (typeof object.baseAccount !== "object") + throw TypeError(".cosmos_sdk.x.auth.v1.ModuleAccount.baseAccount: object expected"); + message.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.fromObject(object.baseAccount); + } + if (object.name != null) + message.name = String(object.name); + if (object.permissions) { + if (!Array.isArray(object.permissions)) + throw TypeError(".cosmos_sdk.x.auth.v1.ModuleAccount.permissions: array expected"); + message.permissions = []; + for (var i = 0; i < object.permissions.length; ++i) + message.permissions[i] = String(object.permissions[i]); + } + return message; + }; + + /** + * Creates a plain object from a ModuleAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @static + * @param {cosmos_sdk.x.auth.v1.ModuleAccount} message ModuleAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModuleAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.permissions = []; + if (options.defaults) { + object.baseAccount = null; + object.name = ""; + } + if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) + object.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.toObject(message.baseAccount, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.permissions && message.permissions.length) { + object.permissions = []; + for (var j = 0; j < message.permissions.length; ++j) + object.permissions[j] = message.permissions[j]; + } + return object; + }; + + /** + * Converts this ModuleAccount to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.auth.v1.ModuleAccount + * @instance + * @returns {Object.} JSON object + */ + ModuleAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ModuleAccount; + })(); + + v1.Params = (function() { + + /** + * Properties of a Params. + * @memberof cosmos_sdk.x.auth.v1 + * @interface IParams + * @property {number|Long|null} [maxMemoCharacters] Params maxMemoCharacters + * @property {number|Long|null} [txSigLimit] Params txSigLimit + * @property {number|Long|null} [txSizeCostPerByte] Params txSizeCostPerByte + * @property {number|Long|null} [sigVerifyCostEd25519] Params sigVerifyCostEd25519 + * @property {number|Long|null} [sigVerifyCostSecp256k1] Params sigVerifyCostSecp256k1 + */ + + /** + * Constructs a new Params. + * @memberof cosmos_sdk.x.auth.v1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos_sdk.x.auth.v1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params maxMemoCharacters. + * @member {number|Long} maxMemoCharacters + * @memberof cosmos_sdk.x.auth.v1.Params + * @instance + */ + Params.prototype.maxMemoCharacters = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Params txSigLimit. + * @member {number|Long} txSigLimit + * @memberof cosmos_sdk.x.auth.v1.Params + * @instance + */ + Params.prototype.txSigLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Params txSizeCostPerByte. + * @member {number|Long} txSizeCostPerByte + * @memberof cosmos_sdk.x.auth.v1.Params + * @instance + */ + Params.prototype.txSizeCostPerByte = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Params sigVerifyCostEd25519. + * @member {number|Long} sigVerifyCostEd25519 + * @memberof cosmos_sdk.x.auth.v1.Params + * @instance + */ + Params.prototype.sigVerifyCostEd25519 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Params sigVerifyCostSecp256k1. + * @member {number|Long} sigVerifyCostSecp256k1 + * @memberof cosmos_sdk.x.auth.v1.Params + * @instance + */ + Params.prototype.sigVerifyCostSecp256k1 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.auth.v1.Params + * @static + * @param {cosmos_sdk.x.auth.v1.IParams=} [properties] Properties to set + * @returns {cosmos_sdk.x.auth.v1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.auth.v1.Params + * @static + * @param {cosmos_sdk.x.auth.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxMemoCharacters != null && Object.hasOwnProperty.call(message, "maxMemoCharacters")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.maxMemoCharacters); + if (message.txSigLimit != null && Object.hasOwnProperty.call(message, "txSigLimit")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.txSigLimit); + if (message.txSizeCostPerByte != null && Object.hasOwnProperty.call(message, "txSizeCostPerByte")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.txSizeCostPerByte); + if (message.sigVerifyCostEd25519 != null && Object.hasOwnProperty.call(message, "sigVerifyCostEd25519")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sigVerifyCostEd25519); + if (message.sigVerifyCostSecp256k1 != null && Object.hasOwnProperty.call(message, "sigVerifyCostSecp256k1")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.sigVerifyCostSecp256k1); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.auth.v1.Params + * @static + * @param {cosmos_sdk.x.auth.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.auth.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.auth.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.v1.Params(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxMemoCharacters = reader.uint64(); + break; + case 2: + message.txSigLimit = reader.uint64(); + break; + case 3: + message.txSizeCostPerByte = reader.uint64(); + break; + case 4: + message.sigVerifyCostEd25519 = reader.uint64(); + break; + case 5: + message.sigVerifyCostSecp256k1 = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.auth.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.auth.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos_sdk.x.auth.v1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxMemoCharacters != null && message.hasOwnProperty("maxMemoCharacters")) + if (!$util.isInteger(message.maxMemoCharacters) && !(message.maxMemoCharacters && $util.isInteger(message.maxMemoCharacters.low) && $util.isInteger(message.maxMemoCharacters.high))) + return "maxMemoCharacters: integer|Long expected"; + if (message.txSigLimit != null && message.hasOwnProperty("txSigLimit")) + if (!$util.isInteger(message.txSigLimit) && !(message.txSigLimit && $util.isInteger(message.txSigLimit.low) && $util.isInteger(message.txSigLimit.high))) + return "txSigLimit: integer|Long expected"; + if (message.txSizeCostPerByte != null && message.hasOwnProperty("txSizeCostPerByte")) + if (!$util.isInteger(message.txSizeCostPerByte) && !(message.txSizeCostPerByte && $util.isInteger(message.txSizeCostPerByte.low) && $util.isInteger(message.txSizeCostPerByte.high))) + return "txSizeCostPerByte: integer|Long expected"; + if (message.sigVerifyCostEd25519 != null && message.hasOwnProperty("sigVerifyCostEd25519")) + if (!$util.isInteger(message.sigVerifyCostEd25519) && !(message.sigVerifyCostEd25519 && $util.isInteger(message.sigVerifyCostEd25519.low) && $util.isInteger(message.sigVerifyCostEd25519.high))) + return "sigVerifyCostEd25519: integer|Long expected"; + if (message.sigVerifyCostSecp256k1 != null && message.hasOwnProperty("sigVerifyCostSecp256k1")) + if (!$util.isInteger(message.sigVerifyCostSecp256k1) && !(message.sigVerifyCostSecp256k1 && $util.isInteger(message.sigVerifyCostSecp256k1.low) && $util.isInteger(message.sigVerifyCostSecp256k1.high))) + return "sigVerifyCostSecp256k1: integer|Long expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.auth.v1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.auth.v1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.auth.v1.Params) + return object; + var message = new $root.cosmos_sdk.x.auth.v1.Params(); + if (object.maxMemoCharacters != null) + if ($util.Long) + (message.maxMemoCharacters = $util.Long.fromValue(object.maxMemoCharacters)).unsigned = true; + else if (typeof object.maxMemoCharacters === "string") + message.maxMemoCharacters = parseInt(object.maxMemoCharacters, 10); + else if (typeof object.maxMemoCharacters === "number") + message.maxMemoCharacters = object.maxMemoCharacters; + else if (typeof object.maxMemoCharacters === "object") + message.maxMemoCharacters = new $util.LongBits(object.maxMemoCharacters.low >>> 0, object.maxMemoCharacters.high >>> 0).toNumber(true); + if (object.txSigLimit != null) + if ($util.Long) + (message.txSigLimit = $util.Long.fromValue(object.txSigLimit)).unsigned = true; + else if (typeof object.txSigLimit === "string") + message.txSigLimit = parseInt(object.txSigLimit, 10); + else if (typeof object.txSigLimit === "number") + message.txSigLimit = object.txSigLimit; + else if (typeof object.txSigLimit === "object") + message.txSigLimit = new $util.LongBits(object.txSigLimit.low >>> 0, object.txSigLimit.high >>> 0).toNumber(true); + if (object.txSizeCostPerByte != null) + if ($util.Long) + (message.txSizeCostPerByte = $util.Long.fromValue(object.txSizeCostPerByte)).unsigned = true; + else if (typeof object.txSizeCostPerByte === "string") + message.txSizeCostPerByte = parseInt(object.txSizeCostPerByte, 10); + else if (typeof object.txSizeCostPerByte === "number") + message.txSizeCostPerByte = object.txSizeCostPerByte; + else if (typeof object.txSizeCostPerByte === "object") + message.txSizeCostPerByte = new $util.LongBits(object.txSizeCostPerByte.low >>> 0, object.txSizeCostPerByte.high >>> 0).toNumber(true); + if (object.sigVerifyCostEd25519 != null) + if ($util.Long) + (message.sigVerifyCostEd25519 = $util.Long.fromValue(object.sigVerifyCostEd25519)).unsigned = true; + else if (typeof object.sigVerifyCostEd25519 === "string") + message.sigVerifyCostEd25519 = parseInt(object.sigVerifyCostEd25519, 10); + else if (typeof object.sigVerifyCostEd25519 === "number") + message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519; + else if (typeof object.sigVerifyCostEd25519 === "object") + message.sigVerifyCostEd25519 = new $util.LongBits(object.sigVerifyCostEd25519.low >>> 0, object.sigVerifyCostEd25519.high >>> 0).toNumber(true); + if (object.sigVerifyCostSecp256k1 != null) + if ($util.Long) + (message.sigVerifyCostSecp256k1 = $util.Long.fromValue(object.sigVerifyCostSecp256k1)).unsigned = true; + else if (typeof object.sigVerifyCostSecp256k1 === "string") + message.sigVerifyCostSecp256k1 = parseInt(object.sigVerifyCostSecp256k1, 10); + else if (typeof object.sigVerifyCostSecp256k1 === "number") + message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1; + else if (typeof object.sigVerifyCostSecp256k1 === "object") + message.sigVerifyCostSecp256k1 = new $util.LongBits(object.sigVerifyCostSecp256k1.low >>> 0, object.sigVerifyCostSecp256k1.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.auth.v1.Params + * @static + * @param {cosmos_sdk.x.auth.v1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.maxMemoCharacters = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxMemoCharacters = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.txSigLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.txSigLimit = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.txSizeCostPerByte = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.txSizeCostPerByte = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.sigVerifyCostEd25519 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sigVerifyCostEd25519 = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.sigVerifyCostSecp256k1 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sigVerifyCostSecp256k1 = options.longs === String ? "0" : 0; + } + if (message.maxMemoCharacters != null && message.hasOwnProperty("maxMemoCharacters")) + if (typeof message.maxMemoCharacters === "number") + object.maxMemoCharacters = options.longs === String ? String(message.maxMemoCharacters) : message.maxMemoCharacters; + else + object.maxMemoCharacters = options.longs === String ? $util.Long.prototype.toString.call(message.maxMemoCharacters) : options.longs === Number ? new $util.LongBits(message.maxMemoCharacters.low >>> 0, message.maxMemoCharacters.high >>> 0).toNumber(true) : message.maxMemoCharacters; + if (message.txSigLimit != null && message.hasOwnProperty("txSigLimit")) + if (typeof message.txSigLimit === "number") + object.txSigLimit = options.longs === String ? String(message.txSigLimit) : message.txSigLimit; + else + object.txSigLimit = options.longs === String ? $util.Long.prototype.toString.call(message.txSigLimit) : options.longs === Number ? new $util.LongBits(message.txSigLimit.low >>> 0, message.txSigLimit.high >>> 0).toNumber(true) : message.txSigLimit; + if (message.txSizeCostPerByte != null && message.hasOwnProperty("txSizeCostPerByte")) + if (typeof message.txSizeCostPerByte === "number") + object.txSizeCostPerByte = options.longs === String ? String(message.txSizeCostPerByte) : message.txSizeCostPerByte; + else + object.txSizeCostPerByte = options.longs === String ? $util.Long.prototype.toString.call(message.txSizeCostPerByte) : options.longs === Number ? new $util.LongBits(message.txSizeCostPerByte.low >>> 0, message.txSizeCostPerByte.high >>> 0).toNumber(true) : message.txSizeCostPerByte; + if (message.sigVerifyCostEd25519 != null && message.hasOwnProperty("sigVerifyCostEd25519")) + if (typeof message.sigVerifyCostEd25519 === "number") + object.sigVerifyCostEd25519 = options.longs === String ? String(message.sigVerifyCostEd25519) : message.sigVerifyCostEd25519; + else + object.sigVerifyCostEd25519 = options.longs === String ? $util.Long.prototype.toString.call(message.sigVerifyCostEd25519) : options.longs === Number ? new $util.LongBits(message.sigVerifyCostEd25519.low >>> 0, message.sigVerifyCostEd25519.high >>> 0).toNumber(true) : message.sigVerifyCostEd25519; + if (message.sigVerifyCostSecp256k1 != null && message.hasOwnProperty("sigVerifyCostSecp256k1")) + if (typeof message.sigVerifyCostSecp256k1 === "number") + object.sigVerifyCostSecp256k1 = options.longs === String ? String(message.sigVerifyCostSecp256k1) : message.sigVerifyCostSecp256k1; + else + object.sigVerifyCostSecp256k1 = options.longs === String ? $util.Long.prototype.toString.call(message.sigVerifyCostSecp256k1) : options.longs === Number ? new $util.LongBits(message.sigVerifyCostSecp256k1.low >>> 0, message.sigVerifyCostSecp256k1.high >>> 0).toNumber(true) : message.sigVerifyCostSecp256k1; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.auth.v1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(); + + return v1; + })(); + + auth.vesting = (function() { + + /** + * Namespace vesting. + * @memberof cosmos_sdk.x.auth + * @namespace + */ + var vesting = {}; + + vesting.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.auth.vesting + * @namespace + */ + var v1 = {}; + + v1.BaseVestingAccount = (function() { + + /** + * Properties of a BaseVestingAccount. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @interface IBaseVestingAccount + * @property {cosmos_sdk.x.auth.v1.IBaseAccount|null} [baseAccount] BaseVestingAccount baseAccount + * @property {Array.|null} [originalVesting] BaseVestingAccount originalVesting + * @property {Array.|null} [delegatedFree] BaseVestingAccount delegatedFree + * @property {Array.|null} [delegatedVesting] BaseVestingAccount delegatedVesting + * @property {number|Long|null} [endTime] BaseVestingAccount endTime + */ + + /** + * Constructs a new BaseVestingAccount. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @classdesc Represents a BaseVestingAccount. + * @implements IBaseVestingAccount + * @constructor + * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount=} [properties] Properties to set + */ + function BaseVestingAccount(properties) { + this.originalVesting = []; + this.delegatedFree = []; + this.delegatedVesting = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BaseVestingAccount baseAccount. + * @member {cosmos_sdk.x.auth.v1.IBaseAccount|null|undefined} baseAccount + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.baseAccount = null; + + /** + * BaseVestingAccount originalVesting. + * @member {Array.} originalVesting + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.originalVesting = $util.emptyArray; + + /** + * BaseVestingAccount delegatedFree. + * @member {Array.} delegatedFree + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.delegatedFree = $util.emptyArray; + + /** + * BaseVestingAccount delegatedVesting. + * @member {Array.} delegatedVesting + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.delegatedVesting = $util.emptyArray; + + /** + * BaseVestingAccount endTime. + * @member {number|Long} endTime + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @instance + */ + BaseVestingAccount.prototype.endTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BaseVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount=} [properties] Properties to set + * @returns {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} BaseVestingAccount instance + */ + BaseVestingAccount.create = function create(properties) { + return new BaseVestingAccount(properties); + }; + + /** + * Encodes the specified BaseVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount} message BaseVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BaseVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseAccount != null && Object.hasOwnProperty.call(message, "baseAccount")) + $root.cosmos_sdk.x.auth.v1.BaseAccount.encode(message.baseAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.originalVesting != null && message.originalVesting.length) + for (var i = 0; i < message.originalVesting.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.originalVesting[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.delegatedFree != null && message.delegatedFree.length) + for (var i = 0; i < message.delegatedFree.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.delegatedFree[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.delegatedVesting != null && message.delegatedVesting.length) + for (var i = 0; i < message.delegatedVesting.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.delegatedVesting[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.endTime); + return writer; + }; + + /** + * Encodes the specified BaseVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount} message BaseVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BaseVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BaseVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} BaseVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BaseVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.originalVesting && message.originalVesting.length)) + message.originalVesting = []; + message.originalVesting.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.delegatedFree && message.delegatedFree.length)) + message.delegatedFree = []; + message.delegatedFree.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.delegatedVesting && message.delegatedVesting.length)) + message.delegatedVesting = []; + message.delegatedVesting.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + case 5: + message.endTime = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BaseVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} BaseVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BaseVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BaseVestingAccount message. + * @function verify + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BaseVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) { + var error = $root.cosmos_sdk.x.auth.v1.BaseAccount.verify(message.baseAccount); + if (error) + return "baseAccount." + error; + } + if (message.originalVesting != null && message.hasOwnProperty("originalVesting")) { + if (!Array.isArray(message.originalVesting)) + return "originalVesting: array expected"; + for (var i = 0; i < message.originalVesting.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.originalVesting[i]); + if (error) + return "originalVesting." + error; + } + } + if (message.delegatedFree != null && message.hasOwnProperty("delegatedFree")) { + if (!Array.isArray(message.delegatedFree)) + return "delegatedFree: array expected"; + for (var i = 0; i < message.delegatedFree.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.delegatedFree[i]); + if (error) + return "delegatedFree." + error; + } + } + if (message.delegatedVesting != null && message.hasOwnProperty("delegatedVesting")) { + if (!Array.isArray(message.delegatedVesting)) + return "delegatedVesting: array expected"; + for (var i = 0; i < message.delegatedVesting.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.delegatedVesting[i]); + if (error) + return "delegatedVesting." + error; + } + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) + return "endTime: integer|Long expected"; + return null; + }; + + /** + * Creates a BaseVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} BaseVestingAccount + */ + BaseVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount) + return object; + var message = new $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount(); + if (object.baseAccount != null) { + if (typeof object.baseAccount !== "object") + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.baseAccount: object expected"); + message.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.fromObject(object.baseAccount); + } + if (object.originalVesting) { + if (!Array.isArray(object.originalVesting)) + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.originalVesting: array expected"); + message.originalVesting = []; + for (var i = 0; i < object.originalVesting.length; ++i) { + if (typeof object.originalVesting[i] !== "object") + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.originalVesting: object expected"); + message.originalVesting[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.originalVesting[i]); + } + } + if (object.delegatedFree) { + if (!Array.isArray(object.delegatedFree)) + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.delegatedFree: array expected"); + message.delegatedFree = []; + for (var i = 0; i < object.delegatedFree.length; ++i) { + if (typeof object.delegatedFree[i] !== "object") + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.delegatedFree: object expected"); + message.delegatedFree[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.delegatedFree[i]); + } + } + if (object.delegatedVesting) { + if (!Array.isArray(object.delegatedVesting)) + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.delegatedVesting: array expected"); + message.delegatedVesting = []; + for (var i = 0; i < object.delegatedVesting.length; ++i) { + if (typeof object.delegatedVesting[i] !== "object") + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.delegatedVesting: object expected"); + message.delegatedVesting[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.delegatedVesting[i]); + } + } + if (object.endTime != null) + if ($util.Long) + (message.endTime = $util.Long.fromValue(object.endTime)).unsigned = false; + else if (typeof object.endTime === "string") + message.endTime = parseInt(object.endTime, 10); + else if (typeof object.endTime === "number") + message.endTime = object.endTime; + else if (typeof object.endTime === "object") + message.endTime = new $util.LongBits(object.endTime.low >>> 0, object.endTime.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BaseVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} message BaseVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BaseVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.originalVesting = []; + object.delegatedFree = []; + object.delegatedVesting = []; + } + if (options.defaults) { + object.baseAccount = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.endTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endTime = options.longs === String ? "0" : 0; + } + if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) + object.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.toObject(message.baseAccount, options); + if (message.originalVesting && message.originalVesting.length) { + object.originalVesting = []; + for (var j = 0; j < message.originalVesting.length; ++j) + object.originalVesting[j] = $root.cosmos_sdk.v1.Coin.toObject(message.originalVesting[j], options); + } + if (message.delegatedFree && message.delegatedFree.length) { + object.delegatedFree = []; + for (var j = 0; j < message.delegatedFree.length; ++j) + object.delegatedFree[j] = $root.cosmos_sdk.v1.Coin.toObject(message.delegatedFree[j], options); + } + if (message.delegatedVesting && message.delegatedVesting.length) { + object.delegatedVesting = []; + for (var j = 0; j < message.delegatedVesting.length; ++j) + object.delegatedVesting[j] = $root.cosmos_sdk.v1.Coin.toObject(message.delegatedVesting[j], options); + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + if (typeof message.endTime === "number") + object.endTime = options.longs === String ? String(message.endTime) : message.endTime; + else + object.endTime = options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() : message.endTime; + return object; + }; + + /** + * Converts this BaseVestingAccount to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount + * @instance + * @returns {Object.} JSON object + */ + BaseVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BaseVestingAccount; + })(); + + v1.ContinuousVestingAccount = (function() { + + /** + * Properties of a ContinuousVestingAccount. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @interface IContinuousVestingAccount + * @property {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null} [baseVestingAccount] ContinuousVestingAccount baseVestingAccount + * @property {number|Long|null} [startTime] ContinuousVestingAccount startTime + */ + + /** + * Constructs a new ContinuousVestingAccount. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @classdesc Represents a ContinuousVestingAccount. + * @implements IContinuousVestingAccount + * @constructor + * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount=} [properties] Properties to set + */ + function ContinuousVestingAccount(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContinuousVestingAccount baseVestingAccount. + * @member {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null|undefined} baseVestingAccount + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @instance + */ + ContinuousVestingAccount.prototype.baseVestingAccount = null; + + /** + * ContinuousVestingAccount startTime. + * @member {number|Long} startTime + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @instance + */ + ContinuousVestingAccount.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ContinuousVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount=} [properties] Properties to set + * @returns {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} ContinuousVestingAccount instance + */ + ContinuousVestingAccount.create = function create(properties) { + return new ContinuousVestingAccount(properties); + }; + + /** + * Encodes the specified ContinuousVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount} message ContinuousVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContinuousVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseVestingAccount != null && Object.hasOwnProperty.call(message, "baseVestingAccount")) + $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.startTime); + return writer; + }; + + /** + * Encodes the specified ContinuousVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount} message ContinuousVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContinuousVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContinuousVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} ContinuousVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContinuousVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(reader, reader.uint32()); + break; + case 2: + message.startTime = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ContinuousVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} ContinuousVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContinuousVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContinuousVestingAccount message. + * @function verify + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContinuousVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) { + var error = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify(message.baseVestingAccount); + if (error) + return "baseVestingAccount." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) + return "startTime: integer|Long expected"; + return null; + }; + + /** + * Creates a ContinuousVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} ContinuousVestingAccount + */ + ContinuousVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount) + return object; + var message = new $root.cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount(); + if (object.baseVestingAccount != null) { + if (typeof object.baseVestingAccount !== "object") + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.baseVestingAccount: object expected"); + message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.fromObject(object.baseVestingAccount); + } + if (object.startTime != null) + if ($util.Long) + (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false; + else if (typeof object.startTime === "string") + message.startTime = parseInt(object.startTime, 10); + else if (typeof object.startTime === "number") + message.startTime = object.startTime; + else if (typeof object.startTime === "object") + message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ContinuousVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} message ContinuousVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContinuousVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.baseVestingAccount = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startTime = options.longs === String ? "0" : 0; + } + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) + object.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.toObject(message.baseVestingAccount, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (typeof message.startTime === "number") + object.startTime = options.longs === String ? String(message.startTime) : message.startTime; + else + object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; + return object; + }; + + /** + * Converts this ContinuousVestingAccount to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount + * @instance + * @returns {Object.} JSON object + */ + ContinuousVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ContinuousVestingAccount; + })(); + + v1.DelayedVestingAccount = (function() { + + /** + * Properties of a DelayedVestingAccount. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @interface IDelayedVestingAccount + * @property {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null} [baseVestingAccount] DelayedVestingAccount baseVestingAccount + */ + + /** + * Constructs a new DelayedVestingAccount. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @classdesc Represents a DelayedVestingAccount. + * @implements IDelayedVestingAccount + * @constructor + * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount=} [properties] Properties to set + */ + function DelayedVestingAccount(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelayedVestingAccount baseVestingAccount. + * @member {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null|undefined} baseVestingAccount + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @instance + */ + DelayedVestingAccount.prototype.baseVestingAccount = null; + + /** + * Creates a new DelayedVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount=} [properties] Properties to set + * @returns {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} DelayedVestingAccount instance + */ + DelayedVestingAccount.create = function create(properties) { + return new DelayedVestingAccount(properties); + }; + + /** + * Encodes the specified DelayedVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount} message DelayedVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelayedVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseVestingAccount != null && Object.hasOwnProperty.call(message, "baseVestingAccount")) + $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DelayedVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount} message DelayedVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelayedVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelayedVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} DelayedVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelayedVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelayedVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} DelayedVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelayedVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelayedVestingAccount message. + * @function verify + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelayedVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) { + var error = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify(message.baseVestingAccount); + if (error) + return "baseVestingAccount." + error; + } + return null; + }; + + /** + * Creates a DelayedVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} DelayedVestingAccount + */ + DelayedVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount) + return object; + var message = new $root.cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount(); + if (object.baseVestingAccount != null) { + if (typeof object.baseVestingAccount !== "object") + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.baseVestingAccount: object expected"); + message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.fromObject(object.baseVestingAccount); + } + return message; + }; + + /** + * Creates a plain object from a DelayedVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} message DelayedVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelayedVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.baseVestingAccount = null; + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) + object.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.toObject(message.baseVestingAccount, options); + return object; + }; + + /** + * Converts this DelayedVestingAccount to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount + * @instance + * @returns {Object.} JSON object + */ + DelayedVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelayedVestingAccount; + })(); + + v1.Period = (function() { + + /** + * Properties of a Period. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @interface IPeriod + * @property {number|Long|null} [length] Period length + * @property {Array.|null} [amount] Period amount + */ + + /** + * Constructs a new Period. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @classdesc Represents a Period. + * @implements IPeriod + * @constructor + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod=} [properties] Properties to set + */ + function Period(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Period length. + * @member {number|Long} length + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @instance + */ + Period.prototype.length = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Period amount. + * @member {Array.} amount + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @instance + */ + Period.prototype.amount = $util.emptyArray; + + /** + * Creates a new Period instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod=} [properties] Properties to set + * @returns {cosmos_sdk.x.auth.vesting.v1.Period} Period instance + */ + Period.create = function create(properties) { + return new Period(properties); + }; + + /** + * Encodes the specified Period message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod} message Period message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Period.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.length != null && Object.hasOwnProperty.call(message, "length")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.length); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Period message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod} message Period message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Period.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Period message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.auth.vesting.v1.Period} Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Period.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.Period(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.length = reader.int64(); + break; + case 2: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Period message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.auth.vesting.v1.Period} Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Period.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Period message. + * @function verify + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Period.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.length != null && message.hasOwnProperty("length")) + if (!$util.isInteger(message.length) && !(message.length && $util.isInteger(message.length.low) && $util.isInteger(message.length.high))) + return "length: integer|Long expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a Period message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.auth.vesting.v1.Period} Period + */ + Period.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.Period) + return object; + var message = new $root.cosmos_sdk.x.auth.vesting.v1.Period(); + if (object.length != null) + if ($util.Long) + (message.length = $util.Long.fromValue(object.length)).unsigned = false; + else if (typeof object.length === "string") + message.length = parseInt(object.length, 10); + else if (typeof object.length === "number") + message.length = object.length; + else if (typeof object.length === "object") + message.length = new $util.LongBits(object.length.low >>> 0, object.length.high >>> 0).toNumber(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.Period.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.Period.amount: object expected"); + message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Period message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.Period} message Period + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Period.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.length = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.length = options.longs === String ? "0" : 0; + if (message.length != null && message.hasOwnProperty("length")) + if (typeof message.length === "number") + object.length = options.longs === String ? String(message.length) : message.length; + else + object.length = options.longs === String ? $util.Long.prototype.toString.call(message.length) : options.longs === Number ? new $util.LongBits(message.length.low >>> 0, message.length.high >>> 0).toNumber() : message.length; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this Period to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.auth.vesting.v1.Period + * @instance + * @returns {Object.} JSON object + */ + Period.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Period; + })(); + + v1.PeriodicVestingAccount = (function() { + + /** + * Properties of a PeriodicVestingAccount. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @interface IPeriodicVestingAccount + * @property {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null} [baseVestingAccount] PeriodicVestingAccount baseVestingAccount + * @property {number|Long|null} [startTime] PeriodicVestingAccount startTime + * @property {Array.|null} [vestingPeriods] PeriodicVestingAccount vestingPeriods + */ + + /** + * Constructs a new PeriodicVestingAccount. + * @memberof cosmos_sdk.x.auth.vesting.v1 + * @classdesc Represents a PeriodicVestingAccount. + * @implements IPeriodicVestingAccount + * @constructor + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount=} [properties] Properties to set + */ + function PeriodicVestingAccount(properties) { + this.vestingPeriods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PeriodicVestingAccount baseVestingAccount. + * @member {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null|undefined} baseVestingAccount + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @instance + */ + PeriodicVestingAccount.prototype.baseVestingAccount = null; + + /** + * PeriodicVestingAccount startTime. + * @member {number|Long} startTime + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @instance + */ + PeriodicVestingAccount.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * PeriodicVestingAccount vestingPeriods. + * @member {Array.} vestingPeriods + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @instance + */ + PeriodicVestingAccount.prototype.vestingPeriods = $util.emptyArray; + + /** + * Creates a new PeriodicVestingAccount instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount=} [properties] Properties to set + * @returns {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} PeriodicVestingAccount instance + */ + PeriodicVestingAccount.create = function create(properties) { + return new PeriodicVestingAccount(properties); + }; + + /** + * Encodes the specified PeriodicVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount} message PeriodicVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeriodicVestingAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.baseVestingAccount != null && Object.hasOwnProperty.call(message, "baseVestingAccount")) + $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.startTime); + if (message.vestingPeriods != null && message.vestingPeriods.length) + for (var i = 0; i < message.vestingPeriods.length; ++i) + $root.cosmos_sdk.x.auth.vesting.v1.Period.encode(message.vestingPeriods[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PeriodicVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount} message PeriodicVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PeriodicVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PeriodicVestingAccount message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} PeriodicVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeriodicVestingAccount.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(reader, reader.uint32()); + break; + case 2: + message.startTime = reader.int64(); + break; + case 3: + if (!(message.vestingPeriods && message.vestingPeriods.length)) + message.vestingPeriods = []; + message.vestingPeriods.push($root.cosmos_sdk.x.auth.vesting.v1.Period.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PeriodicVestingAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} PeriodicVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PeriodicVestingAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PeriodicVestingAccount message. + * @function verify + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PeriodicVestingAccount.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) { + var error = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify(message.baseVestingAccount); + if (error) + return "baseVestingAccount." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) + return "startTime: integer|Long expected"; + if (message.vestingPeriods != null && message.hasOwnProperty("vestingPeriods")) { + if (!Array.isArray(message.vestingPeriods)) + return "vestingPeriods: array expected"; + for (var i = 0; i < message.vestingPeriods.length; ++i) { + var error = $root.cosmos_sdk.x.auth.vesting.v1.Period.verify(message.vestingPeriods[i]); + if (error) + return "vestingPeriods." + error; + } + } + return null; + }; + + /** + * Creates a PeriodicVestingAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} PeriodicVestingAccount + */ + PeriodicVestingAccount.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount) + return object; + var message = new $root.cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount(); + if (object.baseVestingAccount != null) { + if (typeof object.baseVestingAccount !== "object") + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.baseVestingAccount: object expected"); + message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.fromObject(object.baseVestingAccount); + } + if (object.startTime != null) + if ($util.Long) + (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false; + else if (typeof object.startTime === "string") + message.startTime = parseInt(object.startTime, 10); + else if (typeof object.startTime === "number") + message.startTime = object.startTime; + else if (typeof object.startTime === "object") + message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); + if (object.vestingPeriods) { + if (!Array.isArray(object.vestingPeriods)) + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.vestingPeriods: array expected"); + message.vestingPeriods = []; + for (var i = 0; i < object.vestingPeriods.length; ++i) { + if (typeof object.vestingPeriods[i] !== "object") + throw TypeError(".cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.vestingPeriods: object expected"); + message.vestingPeriods[i] = $root.cosmos_sdk.x.auth.vesting.v1.Period.fromObject(object.vestingPeriods[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PeriodicVestingAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @static + * @param {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} message PeriodicVestingAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PeriodicVestingAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.vestingPeriods = []; + if (options.defaults) { + object.baseVestingAccount = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startTime = options.longs === String ? "0" : 0; + } + if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) + object.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.toObject(message.baseVestingAccount, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + if (typeof message.startTime === "number") + object.startTime = options.longs === String ? String(message.startTime) : message.startTime; + else + object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; + if (message.vestingPeriods && message.vestingPeriods.length) { + object.vestingPeriods = []; + for (var j = 0; j < message.vestingPeriods.length; ++j) + object.vestingPeriods[j] = $root.cosmos_sdk.x.auth.vesting.v1.Period.toObject(message.vestingPeriods[j], options); + } + return object; + }; + + /** + * Converts this PeriodicVestingAccount to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount + * @instance + * @returns {Object.} JSON object + */ + PeriodicVestingAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PeriodicVestingAccount; + })(); + + return v1; + })(); + + return vesting; + })(); + + return auth; + })(); + + x.bank = (function() { + + /** + * Namespace bank. + * @memberof cosmos_sdk.x + * @namespace + */ + var bank = {}; + + bank.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.bank + * @namespace + */ + var v1 = {}; + + v1.Query = (function() { + + /** + * Constructs a new Query service. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a Query + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function Query(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; + + /** + * Creates new Query service using the specified rpc implementation. + * @function create + * @memberof cosmos_sdk.x.bank.v1.Query + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {Query} RPC service. Useful where requests and/or responses are streamed. + */ + Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#balance}. + * @memberof cosmos_sdk.x.bank.v1.Query + * @typedef BalanceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos_sdk.x.bank.v1.QueryBalanceResponse} [response] QueryBalanceResponse + */ + + /** + * Calls Balance. + * @function balance + * @memberof cosmos_sdk.x.bank.v1.Query + * @instance + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} request QueryBalanceRequest message or plain object + * @param {cosmos_sdk.x.bank.v1.Query.BalanceCallback} callback Node-style callback called with the error, if any, and QueryBalanceResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.balance = function balance(request, callback) { + return this.rpcCall(balance, $root.cosmos_sdk.x.bank.v1.QueryBalanceRequest, $root.cosmos_sdk.x.bank.v1.QueryBalanceResponse, request, callback); + }, "name", { value: "Balance" }); + + /** + * Calls Balance. + * @function balance + * @memberof cosmos_sdk.x.bank.v1.Query + * @instance + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} request QueryBalanceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#allBalances}. + * @memberof cosmos_sdk.x.bank.v1.Query + * @typedef AllBalancesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} [response] QueryAllBalancesResponse + */ + + /** + * Calls AllBalances. + * @function allBalances + * @memberof cosmos_sdk.x.bank.v1.Query + * @instance + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} request QueryAllBalancesRequest message or plain object + * @param {cosmos_sdk.x.bank.v1.Query.AllBalancesCallback} callback Node-style callback called with the error, if any, and QueryAllBalancesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.allBalances = function allBalances(request, callback) { + return this.rpcCall(allBalances, $root.cosmos_sdk.x.bank.v1.QueryAllBalancesRequest, $root.cosmos_sdk.x.bank.v1.QueryAllBalancesResponse, request, callback); + }, "name", { value: "AllBalances" }); + + /** + * Calls AllBalances. + * @function allBalances + * @memberof cosmos_sdk.x.bank.v1.Query + * @instance + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} request QueryAllBalancesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#totalSupply}. + * @memberof cosmos_sdk.x.bank.v1.Query + * @typedef TotalSupplyCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} [response] QueryTotalSupplyResponse + */ + + /** + * Calls TotalSupply. + * @function totalSupply + * @memberof cosmos_sdk.x.bank.v1.Query + * @instance + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} request QueryTotalSupplyRequest message or plain object + * @param {cosmos_sdk.x.bank.v1.Query.TotalSupplyCallback} callback Node-style callback called with the error, if any, and QueryTotalSupplyResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.totalSupply = function totalSupply(request, callback) { + return this.rpcCall(totalSupply, $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest, $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse, request, callback); + }, "name", { value: "TotalSupply" }); + + /** + * Calls TotalSupply. + * @function totalSupply + * @memberof cosmos_sdk.x.bank.v1.Query + * @instance + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} request QueryTotalSupplyRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#supplyOf}. + * @memberof cosmos_sdk.x.bank.v1.Query + * @typedef SupplyOfCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} [response] QuerySupplyOfResponse + */ + + /** + * Calls SupplyOf. + * @function supplyOf + * @memberof cosmos_sdk.x.bank.v1.Query + * @instance + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} request QuerySupplyOfRequest message or plain object + * @param {cosmos_sdk.x.bank.v1.Query.SupplyOfCallback} callback Node-style callback called with the error, if any, and QuerySupplyOfResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Query.prototype.supplyOf = function supplyOf(request, callback) { + return this.rpcCall(supplyOf, $root.cosmos_sdk.x.bank.v1.QuerySupplyOfRequest, $root.cosmos_sdk.x.bank.v1.QuerySupplyOfResponse, request, callback); + }, "name", { value: "SupplyOf" }); + + /** + * Calls SupplyOf. + * @function supplyOf + * @memberof cosmos_sdk.x.bank.v1.Query + * @instance + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} request QuerySupplyOfRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Query; + })(); + + v1.QueryBalanceRequest = (function() { + + /** + * Properties of a QueryBalanceRequest. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IQueryBalanceRequest + * @property {Uint8Array|null} [address] QueryBalanceRequest address + * @property {string|null} [denom] QueryBalanceRequest denom + */ + + /** + * Constructs a new QueryBalanceRequest. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a QueryBalanceRequest. + * @implements IQueryBalanceRequest + * @constructor + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest=} [properties] Properties to set + */ + function QueryBalanceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryBalanceRequest address. + * @member {Uint8Array} address + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @instance + */ + QueryBalanceRequest.prototype.address = $util.newBuffer([]); + + /** + * QueryBalanceRequest denom. + * @member {string} denom + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @instance + */ + QueryBalanceRequest.prototype.denom = ""; + + /** + * Creates a new QueryBalanceRequest instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.QueryBalanceRequest} QueryBalanceRequest instance + */ + QueryBalanceRequest.create = function create(properties) { + return new QueryBalanceRequest(properties); + }; + + /** + * Encodes the specified QueryBalanceRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} message QueryBalanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryBalanceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.denom); + return writer; + }; + + /** + * Encodes the specified QueryBalanceRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} message QueryBalanceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryBalanceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryBalanceRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.QueryBalanceRequest} QueryBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryBalanceRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryBalanceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryBalanceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.QueryBalanceRequest} QueryBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryBalanceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryBalanceRequest message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryBalanceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + return null; + }; + + /** + * Creates a QueryBalanceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.QueryBalanceRequest} QueryBalanceRequest + */ + QueryBalanceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryBalanceRequest) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.QueryBalanceRequest(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.denom != null) + message.denom = String(object.denom); + return message; + }; + + /** + * Creates a plain object from a QueryBalanceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @static + * @param {cosmos_sdk.x.bank.v1.QueryBalanceRequest} message QueryBalanceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryBalanceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + object.denom = ""; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + return object; + }; + + /** + * Converts this QueryBalanceRequest to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest + * @instance + * @returns {Object.} JSON object + */ + QueryBalanceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryBalanceRequest; + })(); + + v1.QueryBalanceResponse = (function() { + + /** + * Properties of a QueryBalanceResponse. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IQueryBalanceResponse + * @property {cosmos_sdk.v1.ICoin|null} [balance] QueryBalanceResponse balance + */ + + /** + * Constructs a new QueryBalanceResponse. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a QueryBalanceResponse. + * @implements IQueryBalanceResponse + * @constructor + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse=} [properties] Properties to set + */ + function QueryBalanceResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryBalanceResponse balance. + * @member {cosmos_sdk.v1.ICoin|null|undefined} balance + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @instance + */ + QueryBalanceResponse.prototype.balance = null; + + /** + * Creates a new QueryBalanceResponse instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.QueryBalanceResponse} QueryBalanceResponse instance + */ + QueryBalanceResponse.create = function create(properties) { + return new QueryBalanceResponse(properties); + }; + + /** + * Encodes the specified QueryBalanceResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse} message QueryBalanceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryBalanceResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + $root.cosmos_sdk.v1.Coin.encode(message.balance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryBalanceResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse} message QueryBalanceResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryBalanceResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryBalanceResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.QueryBalanceResponse} QueryBalanceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryBalanceResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryBalanceResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.balance = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryBalanceResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.QueryBalanceResponse} QueryBalanceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryBalanceResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryBalanceResponse message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryBalanceResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.balance != null && message.hasOwnProperty("balance")) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.balance); + if (error) + return "balance." + error; + } + return null; + }; + + /** + * Creates a QueryBalanceResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.QueryBalanceResponse} QueryBalanceResponse + */ + QueryBalanceResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryBalanceResponse) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.QueryBalanceResponse(); + if (object.balance != null) { + if (typeof object.balance !== "object") + throw TypeError(".cosmos_sdk.x.bank.v1.QueryBalanceResponse.balance: object expected"); + message.balance = $root.cosmos_sdk.v1.Coin.fromObject(object.balance); + } + return message; + }; + + /** + * Creates a plain object from a QueryBalanceResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @static + * @param {cosmos_sdk.x.bank.v1.QueryBalanceResponse} message QueryBalanceResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryBalanceResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.balance = null; + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = $root.cosmos_sdk.v1.Coin.toObject(message.balance, options); + return object; + }; + + /** + * Converts this QueryBalanceResponse to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse + * @instance + * @returns {Object.} JSON object + */ + QueryBalanceResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryBalanceResponse; + })(); + + v1.QueryAllBalancesRequest = (function() { + + /** + * Properties of a QueryAllBalancesRequest. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IQueryAllBalancesRequest + * @property {Uint8Array|null} [address] QueryAllBalancesRequest address + */ + + /** + * Constructs a new QueryAllBalancesRequest. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a QueryAllBalancesRequest. + * @implements IQueryAllBalancesRequest + * @constructor + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest=} [properties] Properties to set + */ + function QueryAllBalancesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAllBalancesRequest address. + * @member {Uint8Array} address + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @instance + */ + QueryAllBalancesRequest.prototype.address = $util.newBuffer([]); + + /** + * Creates a new QueryAllBalancesRequest instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} QueryAllBalancesRequest instance + */ + QueryAllBalancesRequest.create = function create(properties) { + return new QueryAllBalancesRequest(properties); + }; + + /** + * Encodes the specified QueryAllBalancesRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} message QueryAllBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllBalancesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + return writer; + }; + + /** + * Encodes the specified QueryAllBalancesRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} message QueryAllBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllBalancesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAllBalancesRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} QueryAllBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllBalancesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryAllBalancesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAllBalancesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} QueryAllBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllBalancesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAllBalancesRequest message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAllBalancesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + return null; + }; + + /** + * Creates a QueryAllBalancesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} QueryAllBalancesRequest + */ + QueryAllBalancesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryAllBalancesRequest) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.QueryAllBalancesRequest(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + return message; + }; + + /** + * Creates a plain object from a QueryAllBalancesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @static + * @param {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} message QueryAllBalancesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAllBalancesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + return object; + }; + + /** + * Converts this QueryAllBalancesRequest to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest + * @instance + * @returns {Object.} JSON object + */ + QueryAllBalancesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAllBalancesRequest; + })(); + + v1.QueryAllBalancesResponse = (function() { + + /** + * Properties of a QueryAllBalancesResponse. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IQueryAllBalancesResponse + * @property {Array.|null} [balances] QueryAllBalancesResponse balances + */ + + /** + * Constructs a new QueryAllBalancesResponse. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a QueryAllBalancesResponse. + * @implements IQueryAllBalancesResponse + * @constructor + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse=} [properties] Properties to set + */ + function QueryAllBalancesResponse(properties) { + this.balances = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryAllBalancesResponse balances. + * @member {Array.} balances + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @instance + */ + QueryAllBalancesResponse.prototype.balances = $util.emptyArray; + + /** + * Creates a new QueryAllBalancesResponse instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} QueryAllBalancesResponse instance + */ + QueryAllBalancesResponse.create = function create(properties) { + return new QueryAllBalancesResponse(properties); + }; + + /** + * Encodes the specified QueryAllBalancesResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse} message QueryAllBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllBalancesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.balances != null && message.balances.length) + for (var i = 0; i < message.balances.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.balances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryAllBalancesResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse} message QueryAllBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryAllBalancesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryAllBalancesResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} QueryAllBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllBalancesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryAllBalancesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.balances && message.balances.length)) + message.balances = []; + message.balances.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryAllBalancesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} QueryAllBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryAllBalancesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryAllBalancesResponse message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryAllBalancesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.balances != null && message.hasOwnProperty("balances")) { + if (!Array.isArray(message.balances)) + return "balances: array expected"; + for (var i = 0; i < message.balances.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.balances[i]); + if (error) + return "balances." + error; + } + } + return null; + }; + + /** + * Creates a QueryAllBalancesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} QueryAllBalancesResponse + */ + QueryAllBalancesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryAllBalancesResponse) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.QueryAllBalancesResponse(); + if (object.balances) { + if (!Array.isArray(object.balances)) + throw TypeError(".cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.balances: array expected"); + message.balances = []; + for (var i = 0; i < object.balances.length; ++i) { + if (typeof object.balances[i] !== "object") + throw TypeError(".cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.balances: object expected"); + message.balances[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.balances[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QueryAllBalancesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @static + * @param {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} message QueryAllBalancesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryAllBalancesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.balances = []; + if (message.balances && message.balances.length) { + object.balances = []; + for (var j = 0; j < message.balances.length; ++j) + object.balances[j] = $root.cosmos_sdk.v1.Coin.toObject(message.balances[j], options); + } + return object; + }; + + /** + * Converts this QueryAllBalancesResponse to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse + * @instance + * @returns {Object.} JSON object + */ + QueryAllBalancesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryAllBalancesResponse; + })(); + + v1.QueryTotalSupplyRequest = (function() { + + /** + * Properties of a QueryTotalSupplyRequest. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IQueryTotalSupplyRequest + */ + + /** + * Constructs a new QueryTotalSupplyRequest. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a QueryTotalSupplyRequest. + * @implements IQueryTotalSupplyRequest + * @constructor + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest=} [properties] Properties to set + */ + function QueryTotalSupplyRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new QueryTotalSupplyRequest instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} QueryTotalSupplyRequest instance + */ + QueryTotalSupplyRequest.create = function create(properties) { + return new QueryTotalSupplyRequest(properties); + }; + + /** + * Encodes the specified QueryTotalSupplyRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} message QueryTotalSupplyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTotalSupplyRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified QueryTotalSupplyRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} message QueryTotalSupplyRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTotalSupplyRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} QueryTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTotalSupplyRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} QueryTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTotalSupplyRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryTotalSupplyRequest message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryTotalSupplyRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a QueryTotalSupplyRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} QueryTotalSupplyRequest + */ + QueryTotalSupplyRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest) + return object; + return new $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest(); + }; + + /** + * Creates a plain object from a QueryTotalSupplyRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest + * @static + * @param {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} message QueryTotalSupplyRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryTotalSupplyRequest.toObject = function toObject() { + return {}; + }; + + /** + * Converts this QueryTotalSupplyRequest to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest + * @instance + * @returns {Object.} JSON object + */ + QueryTotalSupplyRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryTotalSupplyRequest; + })(); + + v1.QueryTotalSupplyResponse = (function() { + + /** + * Properties of a QueryTotalSupplyResponse. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IQueryTotalSupplyResponse + * @property {Array.|null} [supply] QueryTotalSupplyResponse supply + */ + + /** + * Constructs a new QueryTotalSupplyResponse. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a QueryTotalSupplyResponse. + * @implements IQueryTotalSupplyResponse + * @constructor + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse=} [properties] Properties to set + */ + function QueryTotalSupplyResponse(properties) { + this.supply = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QueryTotalSupplyResponse supply. + * @member {Array.} supply + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @instance + */ + QueryTotalSupplyResponse.prototype.supply = $util.emptyArray; + + /** + * Creates a new QueryTotalSupplyResponse instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} QueryTotalSupplyResponse instance + */ + QueryTotalSupplyResponse.create = function create(properties) { + return new QueryTotalSupplyResponse(properties); + }; + + /** + * Encodes the specified QueryTotalSupplyResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse} message QueryTotalSupplyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTotalSupplyResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.supply != null && message.supply.length) + for (var i = 0; i < message.supply.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.supply[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QueryTotalSupplyResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse} message QueryTotalSupplyResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QueryTotalSupplyResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} QueryTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTotalSupplyResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.supply && message.supply.length)) + message.supply = []; + message.supply.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} QueryTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QueryTotalSupplyResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QueryTotalSupplyResponse message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QueryTotalSupplyResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.supply != null && message.hasOwnProperty("supply")) { + if (!Array.isArray(message.supply)) + return "supply: array expected"; + for (var i = 0; i < message.supply.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.supply[i]); + if (error) + return "supply." + error; + } + } + return null; + }; + + /** + * Creates a QueryTotalSupplyResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} QueryTotalSupplyResponse + */ + QueryTotalSupplyResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse(); + if (object.supply) { + if (!Array.isArray(object.supply)) + throw TypeError(".cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.supply: array expected"); + message.supply = []; + for (var i = 0; i < object.supply.length; ++i) { + if (typeof object.supply[i] !== "object") + throw TypeError(".cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.supply: object expected"); + message.supply[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.supply[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QueryTotalSupplyResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @static + * @param {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} message QueryTotalSupplyResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QueryTotalSupplyResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.supply = []; + if (message.supply && message.supply.length) { + object.supply = []; + for (var j = 0; j < message.supply.length; ++j) + object.supply[j] = $root.cosmos_sdk.v1.Coin.toObject(message.supply[j], options); + } + return object; + }; + + /** + * Converts this QueryTotalSupplyResponse to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse + * @instance + * @returns {Object.} JSON object + */ + QueryTotalSupplyResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QueryTotalSupplyResponse; + })(); + + v1.QuerySupplyOfRequest = (function() { + + /** + * Properties of a QuerySupplyOfRequest. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IQuerySupplyOfRequest + * @property {string|null} [denom] QuerySupplyOfRequest denom + */ + + /** + * Constructs a new QuerySupplyOfRequest. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a QuerySupplyOfRequest. + * @implements IQuerySupplyOfRequest + * @constructor + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest=} [properties] Properties to set + */ + function QuerySupplyOfRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuerySupplyOfRequest denom. + * @member {string} denom + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @instance + */ + QuerySupplyOfRequest.prototype.denom = ""; + + /** + * Creates a new QuerySupplyOfRequest instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} QuerySupplyOfRequest instance + */ + QuerySupplyOfRequest.create = function create(properties) { + return new QuerySupplyOfRequest(properties); + }; + + /** + * Encodes the specified QuerySupplyOfRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} message QuerySupplyOfRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySupplyOfRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); + return writer; + }; + + /** + * Encodes the specified QuerySupplyOfRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @static + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} message QuerySupplyOfRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySupplyOfRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySupplyOfRequest message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} QuerySupplyOfRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySupplyOfRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QuerySupplyOfRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.denom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySupplyOfRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} QuerySupplyOfRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySupplyOfRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySupplyOfRequest message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySupplyOfRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.denom != null && message.hasOwnProperty("denom")) + if (!$util.isString(message.denom)) + return "denom: string expected"; + return null; + }; + + /** + * Creates a QuerySupplyOfRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} QuerySupplyOfRequest + */ + QuerySupplyOfRequest.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.QuerySupplyOfRequest) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.QuerySupplyOfRequest(); + if (object.denom != null) + message.denom = String(object.denom); + return message; + }; + + /** + * Creates a plain object from a QuerySupplyOfRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @static + * @param {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} message QuerySupplyOfRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySupplyOfRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.denom = ""; + if (message.denom != null && message.hasOwnProperty("denom")) + object.denom = message.denom; + return object; + }; + + /** + * Converts this QuerySupplyOfRequest to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest + * @instance + * @returns {Object.} JSON object + */ + QuerySupplyOfRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuerySupplyOfRequest; + })(); + + v1.QuerySupplyOfResponse = (function() { + + /** + * Properties of a QuerySupplyOfResponse. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IQuerySupplyOfResponse + * @property {string|null} [amount] QuerySupplyOfResponse amount + */ + + /** + * Constructs a new QuerySupplyOfResponse. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a QuerySupplyOfResponse. + * @implements IQuerySupplyOfResponse + * @constructor + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse=} [properties] Properties to set + */ + function QuerySupplyOfResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuerySupplyOfResponse amount. + * @member {string} amount + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @instance + */ + QuerySupplyOfResponse.prototype.amount = ""; + + /** + * Creates a new QuerySupplyOfResponse instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} QuerySupplyOfResponse instance + */ + QuerySupplyOfResponse.create = function create(properties) { + return new QuerySupplyOfResponse(properties); + }; + + /** + * Encodes the specified QuerySupplyOfResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse} message QuerySupplyOfResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySupplyOfResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.amount); + return writer; + }; + + /** + * Encodes the specified QuerySupplyOfResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @static + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse} message QuerySupplyOfResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuerySupplyOfResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuerySupplyOfResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} QuerySupplyOfResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySupplyOfResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QuerySupplyOfResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.amount = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuerySupplyOfResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} QuerySupplyOfResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuerySupplyOfResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuerySupplyOfResponse message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuerySupplyOfResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) + if (!$util.isString(message.amount)) + return "amount: string expected"; + return null; + }; + + /** + * Creates a QuerySupplyOfResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} QuerySupplyOfResponse + */ + QuerySupplyOfResponse.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.QuerySupplyOfResponse) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.QuerySupplyOfResponse(); + if (object.amount != null) + message.amount = String(object.amount); + return message; + }; + + /** + * Creates a plain object from a QuerySupplyOfResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @static + * @param {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} message QuerySupplyOfResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuerySupplyOfResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.amount = ""; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = message.amount; + return object; + }; + + /** + * Converts this QuerySupplyOfResponse to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse + * @instance + * @returns {Object.} JSON object + */ + QuerySupplyOfResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return QuerySupplyOfResponse; + })(); + + v1.MsgSend = (function() { + + /** + * Properties of a MsgSend. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IMsgSend + * @property {Uint8Array|null} [fromAddress] MsgSend fromAddress + * @property {Uint8Array|null} [toAddress] MsgSend toAddress + * @property {Array.|null} [amount] MsgSend amount + */ + + /** + * Constructs a new MsgSend. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a MsgSend. + * @implements IMsgSend + * @constructor + * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [properties] Properties to set + */ + function MsgSend(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSend fromAddress. + * @member {Uint8Array} fromAddress + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @instance + */ + MsgSend.prototype.fromAddress = $util.newBuffer([]); + + /** + * MsgSend toAddress. + * @member {Uint8Array} toAddress + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @instance + */ + MsgSend.prototype.toAddress = $util.newBuffer([]); + + /** + * MsgSend amount. + * @member {Array.} amount + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @instance + */ + MsgSend.prototype.amount = $util.emptyArray; + + /** + * Creates a new MsgSend instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend instance + */ + MsgSend.create = function create(properties) { + return new MsgSend(properties); + }; + + /** + * Encodes the specified MsgSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgSend} message MsgSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fromAddress); + if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.toAddress); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgSend} message MsgSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.MsgSend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.fromAddress = reader.bytes(); + break; + case 2: + message.toAddress = reader.bytes(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSend message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + if (!(message.fromAddress && typeof message.fromAddress.length === "number" || $util.isString(message.fromAddress))) + return "fromAddress: buffer expected"; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + if (!(message.toAddress && typeof message.toAddress.length === "number" || $util.isString(message.toAddress))) + return "toAddress: buffer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend + */ + MsgSend.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.MsgSend) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.MsgSend(); + if (object.fromAddress != null) + if (typeof object.fromAddress === "string") + $util.base64.decode(object.fromAddress, message.fromAddress = $util.newBuffer($util.base64.length(object.fromAddress)), 0); + else if (object.fromAddress.length) + message.fromAddress = object.fromAddress; + if (object.toAddress != null) + if (typeof object.toAddress === "string") + $util.base64.decode(object.toAddress, message.toAddress = $util.newBuffer($util.base64.length(object.toAddress)), 0); + else if (object.toAddress.length) + message.toAddress = object.toAddress; + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos_sdk.x.bank.v1.MsgSend.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos_sdk.x.bank.v1.MsgSend.amount: object expected"); + message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgSend message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {cosmos_sdk.x.bank.v1.MsgSend} message MsgSend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if (options.bytes === String) + object.fromAddress = ""; + else { + object.fromAddress = []; + if (options.bytes !== Array) + object.fromAddress = $util.newBuffer(object.fromAddress); + } + if (options.bytes === String) + object.toAddress = ""; + else { + object.toAddress = []; + if (options.bytes !== Array) + object.toAddress = $util.newBuffer(object.toAddress); + } + } + if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) + object.fromAddress = options.bytes === String ? $util.base64.encode(message.fromAddress, 0, message.fromAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.fromAddress) : message.fromAddress; + if (message.toAddress != null && message.hasOwnProperty("toAddress")) + object.toAddress = options.bytes === String ? $util.base64.encode(message.toAddress, 0, message.toAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.toAddress) : message.toAddress; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this MsgSend to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @instance + * @returns {Object.} JSON object + */ + MsgSend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSend; + })(); + + v1.Input = (function() { + + /** + * Properties of an Input. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IInput + * @property {Uint8Array|null} [address] Input address + * @property {Array.|null} [coins] Input coins + */ + + /** + * Constructs a new Input. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents an Input. + * @implements IInput + * @constructor + * @param {cosmos_sdk.x.bank.v1.IInput=} [properties] Properties to set + */ + function Input(properties) { + this.coins = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Input address. + * @member {Uint8Array} address + * @memberof cosmos_sdk.x.bank.v1.Input + * @instance + */ + Input.prototype.address = $util.newBuffer([]); + + /** + * Input coins. + * @member {Array.} coins + * @memberof cosmos_sdk.x.bank.v1.Input + * @instance + */ + Input.prototype.coins = $util.emptyArray; + + /** + * Creates a new Input instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {cosmos_sdk.x.bank.v1.IInput=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.Input} Input instance + */ + Input.create = function create(properties) { + return new Input(properties); + }; + + /** + * Encodes the specified Input message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {cosmos_sdk.x.bank.v1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.coins != null && message.coins.length) + for (var i = 0; i < message.coins.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {cosmos_sdk.x.bank.v1.IInput} message Input message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Input.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Input message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.Input(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + if (!(message.coins && message.coins.length)) + message.coins = []; + message.coins.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Input message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Input.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.coins != null && message.hasOwnProperty("coins")) { + if (!Array.isArray(message.coins)) + return "coins: array expected"; + for (var i = 0; i < message.coins.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.coins[i]); + if (error) + return "coins." + error; + } + } + return null; + }; + + /** + * Creates an Input message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.Input} Input + */ + Input.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.Input) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.Input(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.coins) { + if (!Array.isArray(object.coins)) + throw TypeError(".cosmos_sdk.x.bank.v1.Input.coins: array expected"); + message.coins = []; + for (var i = 0; i < object.coins.length; ++i) { + if (typeof object.coins[i] !== "object") + throw TypeError(".cosmos_sdk.x.bank.v1.Input.coins: object expected"); + message.coins[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.coins[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {cosmos_sdk.x.bank.v1.Input} message Input + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Input.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.coins = []; + if (options.defaults) + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.coins && message.coins.length) { + object.coins = []; + for (var j = 0; j < message.coins.length; ++j) + object.coins[j] = $root.cosmos_sdk.v1.Coin.toObject(message.coins[j], options); + } + return object; + }; + + /** + * Converts this Input to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.Input + * @instance + * @returns {Object.} JSON object + */ + Input.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Input; + })(); + + v1.Output = (function() { + + /** + * Properties of an Output. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IOutput + * @property {Uint8Array|null} [address] Output address + * @property {Array.|null} [coins] Output coins + */ + + /** + * Constructs a new Output. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents an Output. + * @implements IOutput + * @constructor + * @param {cosmos_sdk.x.bank.v1.IOutput=} [properties] Properties to set + */ + function Output(properties) { + this.coins = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Output address. + * @member {Uint8Array} address + * @memberof cosmos_sdk.x.bank.v1.Output + * @instance + */ + Output.prototype.address = $util.newBuffer([]); + + /** + * Output coins. + * @member {Array.} coins + * @memberof cosmos_sdk.x.bank.v1.Output + * @instance + */ + Output.prototype.coins = $util.emptyArray; + + /** + * Creates a new Output instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {cosmos_sdk.x.bank.v1.IOutput=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.Output} Output instance + */ + Output.create = function create(properties) { + return new Output(properties); + }; + + /** + * Encodes the specified Output message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {cosmos_sdk.x.bank.v1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.coins != null && message.coins.length) + for (var i = 0; i < message.coins.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {cosmos_sdk.x.bank.v1.IOutput} message Output message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Output.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Output message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.Output(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + if (!(message.coins && message.coins.length)) + message.coins = []; + message.coins.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Output message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Output message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Output.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.coins != null && message.hasOwnProperty("coins")) { + if (!Array.isArray(message.coins)) + return "coins: array expected"; + for (var i = 0; i < message.coins.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.coins[i]); + if (error) + return "coins." + error; + } + } + return null; + }; + + /** + * Creates an Output message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.Output} Output + */ + Output.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.Output) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.Output(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.coins) { + if (!Array.isArray(object.coins)) + throw TypeError(".cosmos_sdk.x.bank.v1.Output.coins: array expected"); + message.coins = []; + for (var i = 0; i < object.coins.length; ++i) { + if (typeof object.coins[i] !== "object") + throw TypeError(".cosmos_sdk.x.bank.v1.Output.coins: object expected"); + message.coins[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.coins[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {cosmos_sdk.x.bank.v1.Output} message Output + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Output.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.coins = []; + if (options.defaults) + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.coins && message.coins.length) { + object.coins = []; + for (var j = 0; j < message.coins.length; ++j) + object.coins[j] = $root.cosmos_sdk.v1.Coin.toObject(message.coins[j], options); + } + return object; + }; + + /** + * Converts this Output to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.Output + * @instance + * @returns {Object.} JSON object + */ + Output.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Output; + })(); + + v1.MsgMultiSend = (function() { + + /** + * Properties of a MsgMultiSend. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IMsgMultiSend + * @property {Array.|null} [inputs] MsgMultiSend inputs + * @property {Array.|null} [outputs] MsgMultiSend outputs + */ + + /** + * Constructs a new MsgMultiSend. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a MsgMultiSend. + * @implements IMsgMultiSend + * @constructor + * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [properties] Properties to set + */ + function MsgMultiSend(properties) { + this.inputs = []; + this.outputs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgMultiSend inputs. + * @member {Array.} inputs + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.inputs = $util.emptyArray; + + /** + * MsgMultiSend outputs. + * @member {Array.} outputs + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.outputs = $util.emptyArray; + + /** + * Creates a new MsgMultiSend instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend instance + */ + MsgMultiSend.create = function create(properties) { + return new MsgMultiSend(properties); + }; + + /** + * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend} message MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSend.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputs != null && message.inputs.length) + for (var i = 0; i < message.inputs.length; ++i) + $root.cosmos_sdk.x.bank.v1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputs != null && message.outputs.length) + for (var i = 0; i < message.outputs.length; ++i) + $root.cosmos_sdk.x.bank.v1.Output.encode(message.outputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend} message MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgMultiSend.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSend.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.MsgMultiSend(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.inputs && message.inputs.length)) + message.inputs = []; + message.inputs.push($root.cosmos_sdk.x.bank.v1.Input.decode(reader, reader.uint32())); + break; + case 2: + if (!(message.outputs && message.outputs.length)) + message.outputs = []; + message.outputs.push($root.cosmos_sdk.x.bank.v1.Output.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSend.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgMultiSend message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgMultiSend.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputs != null && message.hasOwnProperty("inputs")) { + if (!Array.isArray(message.inputs)) + return "inputs: array expected"; + for (var i = 0; i < message.inputs.length; ++i) { + var error = $root.cosmos_sdk.x.bank.v1.Input.verify(message.inputs[i]); + if (error) + return "inputs." + error; + } + } + if (message.outputs != null && message.hasOwnProperty("outputs")) { + if (!Array.isArray(message.outputs)) + return "outputs: array expected"; + for (var i = 0; i < message.outputs.length; ++i) { + var error = $root.cosmos_sdk.x.bank.v1.Output.verify(message.outputs[i]); + if (error) + return "outputs." + error; + } + } + return null; + }; + + /** + * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend + */ + MsgMultiSend.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.MsgMultiSend) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.MsgMultiSend(); + if (object.inputs) { + if (!Array.isArray(object.inputs)) + throw TypeError(".cosmos_sdk.x.bank.v1.MsgMultiSend.inputs: array expected"); + message.inputs = []; + for (var i = 0; i < object.inputs.length; ++i) { + if (typeof object.inputs[i] !== "object") + throw TypeError(".cosmos_sdk.x.bank.v1.MsgMultiSend.inputs: object expected"); + message.inputs[i] = $root.cosmos_sdk.x.bank.v1.Input.fromObject(object.inputs[i]); + } + } + if (object.outputs) { + if (!Array.isArray(object.outputs)) + throw TypeError(".cosmos_sdk.x.bank.v1.MsgMultiSend.outputs: array expected"); + message.outputs = []; + for (var i = 0; i < object.outputs.length; ++i) { + if (typeof object.outputs[i] !== "object") + throw TypeError(".cosmos_sdk.x.bank.v1.MsgMultiSend.outputs: object expected"); + message.outputs[i] = $root.cosmos_sdk.x.bank.v1.Output.fromObject(object.outputs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {cosmos_sdk.x.bank.v1.MsgMultiSend} message MsgMultiSend + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgMultiSend.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.inputs = []; + object.outputs = []; + } + if (message.inputs && message.inputs.length) { + object.inputs = []; + for (var j = 0; j < message.inputs.length; ++j) + object.inputs[j] = $root.cosmos_sdk.x.bank.v1.Input.toObject(message.inputs[j], options); + } + if (message.outputs && message.outputs.length) { + object.outputs = []; + for (var j = 0; j < message.outputs.length; ++j) + object.outputs[j] = $root.cosmos_sdk.x.bank.v1.Output.toObject(message.outputs[j], options); + } + return object; + }; + + /** + * Converts this MsgMultiSend to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @instance + * @returns {Object.} JSON object + */ + MsgMultiSend.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgMultiSend; + })(); + + v1.Supply = (function() { + + /** + * Properties of a Supply. + * @memberof cosmos_sdk.x.bank.v1 + * @interface ISupply + * @property {Array.|null} [total] Supply total + */ + + /** + * Constructs a new Supply. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a Supply. + * @implements ISupply + * @constructor + * @param {cosmos_sdk.x.bank.v1.ISupply=} [properties] Properties to set + */ + function Supply(properties) { + this.total = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Supply total. + * @member {Array.} total + * @memberof cosmos_sdk.x.bank.v1.Supply + * @instance + */ + Supply.prototype.total = $util.emptyArray; + + /** + * Creates a new Supply instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {cosmos_sdk.x.bank.v1.ISupply=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.Supply} Supply instance + */ + Supply.create = function create(properties) { + return new Supply(properties); + }; + + /** + * Encodes the specified Supply message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {cosmos_sdk.x.bank.v1.ISupply} message Supply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Supply.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && message.total.length) + for (var i = 0; i < message.total.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.total[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {cosmos_sdk.x.bank.v1.ISupply} message Supply message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Supply.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Supply message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.Supply} Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Supply.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.Supply(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.total && message.total.length)) + message.total = []; + message.total.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Supply message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.bank.v1.Supply} Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Supply.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Supply message. + * @function verify + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Supply.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) { + if (!Array.isArray(message.total)) + return "total: array expected"; + for (var i = 0; i < message.total.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.total[i]); + if (error) + return "total." + error; + } + } + return null; + }; + + /** + * Creates a Supply message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.bank.v1.Supply} Supply + */ + Supply.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.bank.v1.Supply) + return object; + var message = new $root.cosmos_sdk.x.bank.v1.Supply(); + if (object.total) { + if (!Array.isArray(object.total)) + throw TypeError(".cosmos_sdk.x.bank.v1.Supply.total: array expected"); + message.total = []; + for (var i = 0; i < object.total.length; ++i) { + if (typeof object.total[i] !== "object") + throw TypeError(".cosmos_sdk.x.bank.v1.Supply.total: object expected"); + message.total[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.total[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Supply message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {cosmos_sdk.x.bank.v1.Supply} message Supply + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Supply.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.total = []; + if (message.total && message.total.length) { + object.total = []; + for (var j = 0; j < message.total.length; ++j) + object.total[j] = $root.cosmos_sdk.v1.Coin.toObject(message.total[j], options); + } + return object; + }; + + /** + * Converts this Supply to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.bank.v1.Supply + * @instance + * @returns {Object.} JSON object + */ + Supply.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Supply; + })(); + + return v1; + })(); + + return bank; + })(); + + x.capability = (function() { + + /** + * Namespace capability. + * @memberof cosmos_sdk.x + * @namespace + */ + var capability = {}; + + capability.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.capability + * @namespace + */ + var v1 = {}; + + v1.Capability = (function() { + + /** + * Properties of a Capability. + * @memberof cosmos_sdk.x.capability.v1 + * @interface ICapability + * @property {number|Long|null} [index] Capability index + */ + + /** + * Constructs a new Capability. + * @memberof cosmos_sdk.x.capability.v1 + * @classdesc Represents a Capability. + * @implements ICapability + * @constructor + * @param {cosmos_sdk.x.capability.v1.ICapability=} [properties] Properties to set + */ + function Capability(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Capability index. + * @member {number|Long} index + * @memberof cosmos_sdk.x.capability.v1.Capability + * @instance + */ + Capability.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Capability instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.capability.v1.Capability + * @static + * @param {cosmos_sdk.x.capability.v1.ICapability=} [properties] Properties to set + * @returns {cosmos_sdk.x.capability.v1.Capability} Capability instance + */ + Capability.create = function create(properties) { + return new Capability(properties); + }; + + /** + * Encodes the specified Capability message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.capability.v1.Capability + * @static + * @param {cosmos_sdk.x.capability.v1.ICapability} message Capability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Capability.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.index); + return writer; + }; + + /** + * Encodes the specified Capability message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.capability.v1.Capability + * @static + * @param {cosmos_sdk.x.capability.v1.ICapability} message Capability message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Capability.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Capability message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.capability.v1.Capability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.capability.v1.Capability} Capability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Capability.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.capability.v1.Capability(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.index = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Capability message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.capability.v1.Capability + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.capability.v1.Capability} Capability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Capability.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Capability message. + * @function verify + * @memberof cosmos_sdk.x.capability.v1.Capability + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Capability.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + return null; + }; + + /** + * Creates a Capability message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.capability.v1.Capability + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.capability.v1.Capability} Capability + */ + Capability.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.capability.v1.Capability) + return object; + var message = new $root.cosmos_sdk.x.capability.v1.Capability(); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = true; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Capability message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.capability.v1.Capability + * @static + * @param {cosmos_sdk.x.capability.v1.Capability} message Capability + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Capability.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber(true) : message.index; + return object; + }; + + /** + * Converts this Capability to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.capability.v1.Capability + * @instance + * @returns {Object.} JSON object + */ + Capability.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Capability; + })(); + + v1.Owner = (function() { + + /** + * Properties of an Owner. + * @memberof cosmos_sdk.x.capability.v1 + * @interface IOwner + * @property {string|null} [module] Owner module + * @property {string|null} [name] Owner name + */ + + /** + * Constructs a new Owner. + * @memberof cosmos_sdk.x.capability.v1 + * @classdesc Represents an Owner. + * @implements IOwner + * @constructor + * @param {cosmos_sdk.x.capability.v1.IOwner=} [properties] Properties to set + */ + function Owner(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Owner module. + * @member {string} module + * @memberof cosmos_sdk.x.capability.v1.Owner + * @instance + */ + Owner.prototype.module = ""; + + /** + * Owner name. + * @member {string} name + * @memberof cosmos_sdk.x.capability.v1.Owner + * @instance + */ + Owner.prototype.name = ""; + + /** + * Creates a new Owner instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.capability.v1.Owner + * @static + * @param {cosmos_sdk.x.capability.v1.IOwner=} [properties] Properties to set + * @returns {cosmos_sdk.x.capability.v1.Owner} Owner instance + */ + Owner.create = function create(properties) { + return new Owner(properties); + }; + + /** + * Encodes the specified Owner message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.capability.v1.Owner + * @static + * @param {cosmos_sdk.x.capability.v1.IOwner} message Owner message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Owner.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.module != null && Object.hasOwnProperty.call(message, "module")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.module); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + return writer; + }; + + /** + * Encodes the specified Owner message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.capability.v1.Owner + * @static + * @param {cosmos_sdk.x.capability.v1.IOwner} message Owner message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Owner.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Owner message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.capability.v1.Owner + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.capability.v1.Owner} Owner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Owner.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.capability.v1.Owner(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.module = reader.string(); + break; + case 2: + message.name = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Owner message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.capability.v1.Owner + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.capability.v1.Owner} Owner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Owner.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Owner message. + * @function verify + * @memberof cosmos_sdk.x.capability.v1.Owner + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Owner.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.module != null && message.hasOwnProperty("module")) + if (!$util.isString(message.module)) + return "module: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an Owner message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.capability.v1.Owner + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.capability.v1.Owner} Owner + */ + Owner.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.capability.v1.Owner) + return object; + var message = new $root.cosmos_sdk.x.capability.v1.Owner(); + if (object.module != null) + message.module = String(object.module); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an Owner message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.capability.v1.Owner + * @static + * @param {cosmos_sdk.x.capability.v1.Owner} message Owner + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Owner.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.module = ""; + object.name = ""; + } + if (message.module != null && message.hasOwnProperty("module")) + object.module = message.module; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this Owner to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.capability.v1.Owner + * @instance + * @returns {Object.} JSON object + */ + Owner.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Owner; + })(); + + v1.CapabilityOwners = (function() { + + /** + * Properties of a CapabilityOwners. + * @memberof cosmos_sdk.x.capability.v1 + * @interface ICapabilityOwners + * @property {Array.|null} [owners] CapabilityOwners owners + */ + + /** + * Constructs a new CapabilityOwners. + * @memberof cosmos_sdk.x.capability.v1 + * @classdesc Represents a CapabilityOwners. + * @implements ICapabilityOwners + * @constructor + * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners=} [properties] Properties to set + */ + function CapabilityOwners(properties) { + this.owners = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CapabilityOwners owners. + * @member {Array.} owners + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @instance + */ + CapabilityOwners.prototype.owners = $util.emptyArray; + + /** + * Creates a new CapabilityOwners instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @static + * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners=} [properties] Properties to set + * @returns {cosmos_sdk.x.capability.v1.CapabilityOwners} CapabilityOwners instance + */ + CapabilityOwners.create = function create(properties) { + return new CapabilityOwners(properties); + }; + + /** + * Encodes the specified CapabilityOwners message. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @static + * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners} message CapabilityOwners message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CapabilityOwners.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.owners != null && message.owners.length) + for (var i = 0; i < message.owners.length; ++i) + $root.cosmos_sdk.x.capability.v1.Owner.encode(message.owners[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CapabilityOwners message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @static + * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners} message CapabilityOwners message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CapabilityOwners.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CapabilityOwners message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.capability.v1.CapabilityOwners} CapabilityOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CapabilityOwners.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.capability.v1.CapabilityOwners(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.owners && message.owners.length)) + message.owners = []; + message.owners.push($root.cosmos_sdk.x.capability.v1.Owner.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CapabilityOwners message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.capability.v1.CapabilityOwners} CapabilityOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CapabilityOwners.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CapabilityOwners message. + * @function verify + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CapabilityOwners.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.owners != null && message.hasOwnProperty("owners")) { + if (!Array.isArray(message.owners)) + return "owners: array expected"; + for (var i = 0; i < message.owners.length; ++i) { + var error = $root.cosmos_sdk.x.capability.v1.Owner.verify(message.owners[i]); + if (error) + return "owners." + error; + } + } + return null; + }; + + /** + * Creates a CapabilityOwners message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.capability.v1.CapabilityOwners} CapabilityOwners + */ + CapabilityOwners.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.capability.v1.CapabilityOwners) + return object; + var message = new $root.cosmos_sdk.x.capability.v1.CapabilityOwners(); + if (object.owners) { + if (!Array.isArray(object.owners)) + throw TypeError(".cosmos_sdk.x.capability.v1.CapabilityOwners.owners: array expected"); + message.owners = []; + for (var i = 0; i < object.owners.length; ++i) { + if (typeof object.owners[i] !== "object") + throw TypeError(".cosmos_sdk.x.capability.v1.CapabilityOwners.owners: object expected"); + message.owners[i] = $root.cosmos_sdk.x.capability.v1.Owner.fromObject(object.owners[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CapabilityOwners message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @static + * @param {cosmos_sdk.x.capability.v1.CapabilityOwners} message CapabilityOwners + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CapabilityOwners.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.owners = []; + if (message.owners && message.owners.length) { + object.owners = []; + for (var j = 0; j < message.owners.length; ++j) + object.owners[j] = $root.cosmos_sdk.x.capability.v1.Owner.toObject(message.owners[j], options); + } + return object; + }; + + /** + * Converts this CapabilityOwners to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners + * @instance + * @returns {Object.} JSON object + */ + CapabilityOwners.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CapabilityOwners; + })(); + + return v1; + })(); + + return capability; + })(); + + x.crisis = (function() { + + /** + * Namespace crisis. + * @memberof cosmos_sdk.x + * @namespace + */ + var crisis = {}; + + crisis.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.crisis + * @namespace + */ + var v1 = {}; + + v1.MsgVerifyInvariant = (function() { + + /** + * Properties of a MsgVerifyInvariant. + * @memberof cosmos_sdk.x.crisis.v1 + * @interface IMsgVerifyInvariant + * @property {Uint8Array|null} [sender] MsgVerifyInvariant sender + * @property {string|null} [invariantModuleName] MsgVerifyInvariant invariantModuleName + * @property {string|null} [invariantRoute] MsgVerifyInvariant invariantRoute + */ + + /** + * Constructs a new MsgVerifyInvariant. + * @memberof cosmos_sdk.x.crisis.v1 + * @classdesc Represents a MsgVerifyInvariant. + * @implements IMsgVerifyInvariant + * @constructor + * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant=} [properties] Properties to set + */ + function MsgVerifyInvariant(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgVerifyInvariant sender. + * @member {Uint8Array} sender + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.sender = $util.newBuffer([]); + + /** + * MsgVerifyInvariant invariantModuleName. + * @member {string} invariantModuleName + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.invariantModuleName = ""; + + /** + * MsgVerifyInvariant invariantRoute. + * @member {string} invariantRoute + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @instance + */ + MsgVerifyInvariant.prototype.invariantRoute = ""; + + /** + * Creates a new MsgVerifyInvariant instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @static + * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant=} [properties] Properties to set + * @returns {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} MsgVerifyInvariant instance + */ + MsgVerifyInvariant.create = function create(properties) { + return new MsgVerifyInvariant(properties); + }; + + /** + * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @static + * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariant.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sender); + if (message.invariantModuleName != null && Object.hasOwnProperty.call(message, "invariantModuleName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.invariantModuleName); + if (message.invariantRoute != null && Object.hasOwnProperty.call(message, "invariantRoute")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.invariantRoute); + return writer; + }; + + /** + * Encodes the specified MsgVerifyInvariant message, length delimited. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @static + * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVerifyInvariant.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariant.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.crisis.v1.MsgVerifyInvariant(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sender = reader.bytes(); + break; + case 2: + message.invariantModuleName = reader.string(); + break; + case 3: + message.invariantRoute = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVerifyInvariant.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVerifyInvariant message. + * @function verify + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVerifyInvariant.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sender != null && message.hasOwnProperty("sender")) + if (!(message.sender && typeof message.sender.length === "number" || $util.isString(message.sender))) + return "sender: buffer expected"; + if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) + if (!$util.isString(message.invariantModuleName)) + return "invariantModuleName: string expected"; + if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) + if (!$util.isString(message.invariantRoute)) + return "invariantRoute: string expected"; + return null; + }; + + /** + * Creates a MsgVerifyInvariant message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} MsgVerifyInvariant + */ + MsgVerifyInvariant.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.crisis.v1.MsgVerifyInvariant) + return object; + var message = new $root.cosmos_sdk.x.crisis.v1.MsgVerifyInvariant(); + if (object.sender != null) + if (typeof object.sender === "string") + $util.base64.decode(object.sender, message.sender = $util.newBuffer($util.base64.length(object.sender)), 0); + else if (object.sender.length) + message.sender = object.sender; + if (object.invariantModuleName != null) + message.invariantModuleName = String(object.invariantModuleName); + if (object.invariantRoute != null) + message.invariantRoute = String(object.invariantRoute); + return message; + }; + + /** + * Creates a plain object from a MsgVerifyInvariant message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @static + * @param {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} message MsgVerifyInvariant + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVerifyInvariant.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.sender = ""; + else { + object.sender = []; + if (options.bytes !== Array) + object.sender = $util.newBuffer(object.sender); + } + object.invariantModuleName = ""; + object.invariantRoute = ""; + } + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = options.bytes === String ? $util.base64.encode(message.sender, 0, message.sender.length) : options.bytes === Array ? Array.prototype.slice.call(message.sender) : message.sender; + if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) + object.invariantModuleName = message.invariantModuleName; + if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) + object.invariantRoute = message.invariantRoute; + return object; + }; + + /** + * Converts this MsgVerifyInvariant to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant + * @instance + * @returns {Object.} JSON object + */ + MsgVerifyInvariant.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVerifyInvariant; + })(); + + return v1; + })(); + + return crisis; + })(); + + x.distribution = (function() { + + /** + * Namespace distribution. + * @memberof cosmos_sdk.x + * @namespace + */ + var distribution = {}; + + distribution.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.distribution + * @namespace + */ + var v1 = {}; + + v1.MsgSetWithdrawAddress = (function() { + + /** + * Properties of a MsgSetWithdrawAddress. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IMsgSetWithdrawAddress + * @property {Uint8Array|null} [delegatorAddress] MsgSetWithdrawAddress delegatorAddress + * @property {Uint8Array|null} [withdrawAddress] MsgSetWithdrawAddress withdrawAddress + */ + + /** + * Constructs a new MsgSetWithdrawAddress. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a MsgSetWithdrawAddress. + * @implements IMsgSetWithdrawAddress + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress=} [properties] Properties to set + */ + function MsgSetWithdrawAddress(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSetWithdrawAddress delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @instance + */ + MsgSetWithdrawAddress.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * MsgSetWithdrawAddress withdrawAddress. + * @member {Uint8Array} withdrawAddress + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @instance + */ + MsgSetWithdrawAddress.prototype.withdrawAddress = $util.newBuffer([]); + + /** + * Creates a new MsgSetWithdrawAddress instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} MsgSetWithdrawAddress instance + */ + MsgSetWithdrawAddress.create = function create(properties) { + return new MsgSetWithdrawAddress(properties); + }; + + /** + * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddress.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.withdrawAddress != null && Object.hasOwnProperty.call(message, "withdrawAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.withdrawAddress); + return writer; + }; + + /** + * Encodes the specified MsgSetWithdrawAddress message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSetWithdrawAddress.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddress.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.withdrawAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSetWithdrawAddress.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSetWithdrawAddress message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSetWithdrawAddress.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + if (!(message.withdrawAddress && typeof message.withdrawAddress.length === "number" || $util.isString(message.withdrawAddress))) + return "withdrawAddress: buffer expected"; + return null; + }; + + /** + * Creates a MsgSetWithdrawAddress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} MsgSetWithdrawAddress + */ + MsgSetWithdrawAddress.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.withdrawAddress != null) + if (typeof object.withdrawAddress === "string") + $util.base64.decode(object.withdrawAddress, message.withdrawAddress = $util.newBuffer($util.base64.length(object.withdrawAddress)), 0); + else if (object.withdrawAddress.length) + message.withdrawAddress = object.withdrawAddress; + return message; + }; + + /** + * Creates a plain object from a MsgSetWithdrawAddress message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @static + * @param {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} message MsgSetWithdrawAddress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSetWithdrawAddress.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.withdrawAddress = ""; + else { + object.withdrawAddress = []; + if (options.bytes !== Array) + object.withdrawAddress = $util.newBuffer(object.withdrawAddress); + } + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) + object.withdrawAddress = options.bytes === String ? $util.base64.encode(message.withdrawAddress, 0, message.withdrawAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.withdrawAddress) : message.withdrawAddress; + return object; + }; + + /** + * Converts this MsgSetWithdrawAddress to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress + * @instance + * @returns {Object.} JSON object + */ + MsgSetWithdrawAddress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSetWithdrawAddress; + })(); + + v1.MsgWithdrawDelegatorReward = (function() { + + /** + * Properties of a MsgWithdrawDelegatorReward. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IMsgWithdrawDelegatorReward + * @property {Uint8Array|null} [delegatorAddress] MsgWithdrawDelegatorReward delegatorAddress + * @property {Uint8Array|null} [validatorAddress] MsgWithdrawDelegatorReward validatorAddress + */ + + /** + * Constructs a new MsgWithdrawDelegatorReward. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a MsgWithdrawDelegatorReward. + * @implements IMsgWithdrawDelegatorReward + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward=} [properties] Properties to set + */ + function MsgWithdrawDelegatorReward(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgWithdrawDelegatorReward delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @instance + */ + MsgWithdrawDelegatorReward.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * MsgWithdrawDelegatorReward validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @instance + */ + MsgWithdrawDelegatorReward.prototype.validatorAddress = $util.newBuffer([]); + + /** + * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward instance + */ + MsgWithdrawDelegatorReward.create = function create(properties) { + return new MsgWithdrawDelegatorReward(properties); + }; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorReward.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawDelegatorReward.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorReward.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawDelegatorReward.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawDelegatorReward message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawDelegatorReward.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + return null; + }; + + /** + * Creates a MsgWithdrawDelegatorReward message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward + */ + MsgWithdrawDelegatorReward.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + return message; + }; + + /** + * Creates a plain object from a MsgWithdrawDelegatorReward message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @static + * @param {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawDelegatorReward.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + return object; + }; + + /** + * Converts this MsgWithdrawDelegatorReward to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawDelegatorReward.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawDelegatorReward; + })(); + + v1.MsgWithdrawValidatorCommission = (function() { + + /** + * Properties of a MsgWithdrawValidatorCommission. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IMsgWithdrawValidatorCommission + * @property {Uint8Array|null} [validatorAddress] MsgWithdrawValidatorCommission validatorAddress + */ + + /** + * Constructs a new MsgWithdrawValidatorCommission. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a MsgWithdrawValidatorCommission. + * @implements IMsgWithdrawValidatorCommission + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission=} [properties] Properties to set + */ + function MsgWithdrawValidatorCommission(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgWithdrawValidatorCommission validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @instance + */ + MsgWithdrawValidatorCommission.prototype.validatorAddress = $util.newBuffer([]); + + /** + * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission instance + */ + MsgWithdrawValidatorCommission.create = function create(properties) { + return new MsgWithdrawValidatorCommission(properties); + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgWithdrawValidatorCommission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgWithdrawValidatorCommission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgWithdrawValidatorCommission message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgWithdrawValidatorCommission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + return null; + }; + + /** + * Creates a MsgWithdrawValidatorCommission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission + */ + MsgWithdrawValidatorCommission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission(); + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + return message; + }; + + /** + * Creates a plain object from a MsgWithdrawValidatorCommission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @static + * @param {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgWithdrawValidatorCommission.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + return object; + }; + + /** + * Converts this MsgWithdrawValidatorCommission to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission + * @instance + * @returns {Object.} JSON object + */ + MsgWithdrawValidatorCommission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgWithdrawValidatorCommission; + })(); + + v1.MsgFundCommunityPool = (function() { + + /** + * Properties of a MsgFundCommunityPool. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IMsgFundCommunityPool + * @property {Array.|null} [amount] MsgFundCommunityPool amount + * @property {Uint8Array|null} [depositor] MsgFundCommunityPool depositor + */ + + /** + * Constructs a new MsgFundCommunityPool. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a MsgFundCommunityPool. + * @implements IMsgFundCommunityPool + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool=} [properties] Properties to set + */ + function MsgFundCommunityPool(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgFundCommunityPool amount. + * @member {Array.} amount + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @instance + */ + MsgFundCommunityPool.prototype.amount = $util.emptyArray; + + /** + * MsgFundCommunityPool depositor. + * @member {Uint8Array} depositor + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @instance + */ + MsgFundCommunityPool.prototype.depositor = $util.newBuffer([]); + + /** + * Creates a new MsgFundCommunityPool instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} MsgFundCommunityPool instance + */ + MsgFundCommunityPool.create = function create(properties) { + return new MsgFundCommunityPool(properties); + }; + + /** + * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.depositor); + return writer; + }; + + /** + * Encodes the specified MsgFundCommunityPool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @static + * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgFundCommunityPool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.MsgFundCommunityPool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.depositor = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgFundCommunityPool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgFundCommunityPool message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgFundCommunityPool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!(message.depositor && typeof message.depositor.length === "number" || $util.isString(message.depositor))) + return "depositor: buffer expected"; + return null; + }; + + /** + * Creates a MsgFundCommunityPool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} MsgFundCommunityPool + */ + MsgFundCommunityPool.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.MsgFundCommunityPool) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.MsgFundCommunityPool(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.amount: object expected"); + message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); + } + } + if (object.depositor != null) + if (typeof object.depositor === "string") + $util.base64.decode(object.depositor, message.depositor = $util.newBuffer($util.base64.length(object.depositor)), 0); + else if (object.depositor.length) + message.depositor = object.depositor; + return message; + }; + + /** + * Creates a plain object from a MsgFundCommunityPool message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @static + * @param {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} message MsgFundCommunityPool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgFundCommunityPool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) + if (options.bytes === String) + object.depositor = ""; + else { + object.depositor = []; + if (options.bytes !== Array) + object.depositor = $util.newBuffer(object.depositor); + } + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); + } + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = options.bytes === String ? $util.base64.encode(message.depositor, 0, message.depositor.length) : options.bytes === Array ? Array.prototype.slice.call(message.depositor) : message.depositor; + return object; + }; + + /** + * Converts this MsgFundCommunityPool to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool + * @instance + * @returns {Object.} JSON object + */ + MsgFundCommunityPool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgFundCommunityPool; + })(); + + v1.Params = (function() { + + /** + * Properties of a Params. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IParams + * @property {string|null} [communityTax] Params communityTax + * @property {string|null} [baseProposerReward] Params baseProposerReward + * @property {string|null} [bonusProposerReward] Params bonusProposerReward + * @property {boolean|null} [withdrawAddrEnabled] Params withdrawAddrEnabled + */ + + /** + * Constructs a new Params. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params communityTax. + * @member {string} communityTax + * @memberof cosmos_sdk.x.distribution.v1.Params + * @instance + */ + Params.prototype.communityTax = ""; + + /** + * Params baseProposerReward. + * @member {string} baseProposerReward + * @memberof cosmos_sdk.x.distribution.v1.Params + * @instance + */ + Params.prototype.baseProposerReward = ""; + + /** + * Params bonusProposerReward. + * @member {string} bonusProposerReward + * @memberof cosmos_sdk.x.distribution.v1.Params + * @instance + */ + Params.prototype.bonusProposerReward = ""; + + /** + * Params withdrawAddrEnabled. + * @member {boolean} withdrawAddrEnabled + * @memberof cosmos_sdk.x.distribution.v1.Params + * @instance + */ + Params.prototype.withdrawAddrEnabled = false; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.Params + * @static + * @param {cosmos_sdk.x.distribution.v1.IParams=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.Params + * @static + * @param {cosmos_sdk.x.distribution.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.communityTax != null && Object.hasOwnProperty.call(message, "communityTax")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.communityTax); + if (message.baseProposerReward != null && Object.hasOwnProperty.call(message, "baseProposerReward")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseProposerReward); + if (message.bonusProposerReward != null && Object.hasOwnProperty.call(message, "bonusProposerReward")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.bonusProposerReward); + if (message.withdrawAddrEnabled != null && Object.hasOwnProperty.call(message, "withdrawAddrEnabled")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.withdrawAddrEnabled); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.Params + * @static + * @param {cosmos_sdk.x.distribution.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.Params(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.communityTax = reader.string(); + break; + case 2: + message.baseProposerReward = reader.string(); + break; + case 3: + message.bonusProposerReward = reader.string(); + break; + case 4: + message.withdrawAddrEnabled = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.communityTax != null && message.hasOwnProperty("communityTax")) + if (!$util.isString(message.communityTax)) + return "communityTax: string expected"; + if (message.baseProposerReward != null && message.hasOwnProperty("baseProposerReward")) + if (!$util.isString(message.baseProposerReward)) + return "baseProposerReward: string expected"; + if (message.bonusProposerReward != null && message.hasOwnProperty("bonusProposerReward")) + if (!$util.isString(message.bonusProposerReward)) + return "bonusProposerReward: string expected"; + if (message.withdrawAddrEnabled != null && message.hasOwnProperty("withdrawAddrEnabled")) + if (typeof message.withdrawAddrEnabled !== "boolean") + return "withdrawAddrEnabled: boolean expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.Params) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.Params(); + if (object.communityTax != null) + message.communityTax = String(object.communityTax); + if (object.baseProposerReward != null) + message.baseProposerReward = String(object.baseProposerReward); + if (object.bonusProposerReward != null) + message.bonusProposerReward = String(object.bonusProposerReward); + if (object.withdrawAddrEnabled != null) + message.withdrawAddrEnabled = Boolean(object.withdrawAddrEnabled); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.Params + * @static + * @param {cosmos_sdk.x.distribution.v1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.communityTax = ""; + object.baseProposerReward = ""; + object.bonusProposerReward = ""; + object.withdrawAddrEnabled = false; + } + if (message.communityTax != null && message.hasOwnProperty("communityTax")) + object.communityTax = message.communityTax; + if (message.baseProposerReward != null && message.hasOwnProperty("baseProposerReward")) + object.baseProposerReward = message.baseProposerReward; + if (message.bonusProposerReward != null && message.hasOwnProperty("bonusProposerReward")) + object.bonusProposerReward = message.bonusProposerReward; + if (message.withdrawAddrEnabled != null && message.hasOwnProperty("withdrawAddrEnabled")) + object.withdrawAddrEnabled = message.withdrawAddrEnabled; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(); + + v1.ValidatorHistoricalRewards = (function() { + + /** + * Properties of a ValidatorHistoricalRewards. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IValidatorHistoricalRewards + * @property {Array.|null} [cumulativeRewardRatio] ValidatorHistoricalRewards cumulativeRewardRatio + * @property {number|null} [referenceCount] ValidatorHistoricalRewards referenceCount + */ + + /** + * Constructs a new ValidatorHistoricalRewards. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a ValidatorHistoricalRewards. + * @implements IValidatorHistoricalRewards + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards=} [properties] Properties to set + */ + function ValidatorHistoricalRewards(properties) { + this.cumulativeRewardRatio = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorHistoricalRewards cumulativeRewardRatio. + * @member {Array.} cumulativeRewardRatio + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @instance + */ + ValidatorHistoricalRewards.prototype.cumulativeRewardRatio = $util.emptyArray; + + /** + * ValidatorHistoricalRewards referenceCount. + * @member {number} referenceCount + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @instance + */ + ValidatorHistoricalRewards.prototype.referenceCount = 0; + + /** + * Creates a new ValidatorHistoricalRewards instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} ValidatorHistoricalRewards instance + */ + ValidatorHistoricalRewards.create = function create(properties) { + return new ValidatorHistoricalRewards(properties); + }; + + /** + * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards} message ValidatorHistoricalRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorHistoricalRewards.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cumulativeRewardRatio != null && message.cumulativeRewardRatio.length) + for (var i = 0; i < message.cumulativeRewardRatio.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(message.cumulativeRewardRatio[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.referenceCount != null && Object.hasOwnProperty.call(message, "referenceCount")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.referenceCount); + return writer; + }; + + /** + * Encodes the specified ValidatorHistoricalRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards} message ValidatorHistoricalRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorHistoricalRewards.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorHistoricalRewards.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.cumulativeRewardRatio && message.cumulativeRewardRatio.length)) + message.cumulativeRewardRatio = []; + message.cumulativeRewardRatio.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + break; + case 2: + message.referenceCount = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorHistoricalRewards.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorHistoricalRewards message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorHistoricalRewards.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cumulativeRewardRatio != null && message.hasOwnProperty("cumulativeRewardRatio")) { + if (!Array.isArray(message.cumulativeRewardRatio)) + return "cumulativeRewardRatio: array expected"; + for (var i = 0; i < message.cumulativeRewardRatio.length; ++i) { + var error = $root.cosmos_sdk.v1.DecCoin.verify(message.cumulativeRewardRatio[i]); + if (error) + return "cumulativeRewardRatio." + error; + } + } + if (message.referenceCount != null && message.hasOwnProperty("referenceCount")) + if (!$util.isInteger(message.referenceCount)) + return "referenceCount: integer expected"; + return null; + }; + + /** + * Creates a ValidatorHistoricalRewards message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} ValidatorHistoricalRewards + */ + ValidatorHistoricalRewards.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards(); + if (object.cumulativeRewardRatio) { + if (!Array.isArray(object.cumulativeRewardRatio)) + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.cumulativeRewardRatio: array expected"); + message.cumulativeRewardRatio = []; + for (var i = 0; i < object.cumulativeRewardRatio.length; ++i) { + if (typeof object.cumulativeRewardRatio[i] !== "object") + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.cumulativeRewardRatio: object expected"); + message.cumulativeRewardRatio[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.cumulativeRewardRatio[i]); + } + } + if (object.referenceCount != null) + message.referenceCount = object.referenceCount >>> 0; + return message; + }; + + /** + * Creates a plain object from a ValidatorHistoricalRewards message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} message ValidatorHistoricalRewards + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorHistoricalRewards.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cumulativeRewardRatio = []; + if (options.defaults) + object.referenceCount = 0; + if (message.cumulativeRewardRatio && message.cumulativeRewardRatio.length) { + object.cumulativeRewardRatio = []; + for (var j = 0; j < message.cumulativeRewardRatio.length; ++j) + object.cumulativeRewardRatio[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.cumulativeRewardRatio[j], options); + } + if (message.referenceCount != null && message.hasOwnProperty("referenceCount")) + object.referenceCount = message.referenceCount; + return object; + }; + + /** + * Converts this ValidatorHistoricalRewards to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards + * @instance + * @returns {Object.} JSON object + */ + ValidatorHistoricalRewards.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorHistoricalRewards; + })(); + + v1.ValidatorCurrentRewards = (function() { + + /** + * Properties of a ValidatorCurrentRewards. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IValidatorCurrentRewards + * @property {Array.|null} [rewards] ValidatorCurrentRewards rewards + * @property {number|Long|null} [period] ValidatorCurrentRewards period + */ + + /** + * Constructs a new ValidatorCurrentRewards. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a ValidatorCurrentRewards. + * @implements IValidatorCurrentRewards + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards=} [properties] Properties to set + */ + function ValidatorCurrentRewards(properties) { + this.rewards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorCurrentRewards rewards. + * @member {Array.} rewards + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @instance + */ + ValidatorCurrentRewards.prototype.rewards = $util.emptyArray; + + /** + * ValidatorCurrentRewards period. + * @member {number|Long} period + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @instance + */ + ValidatorCurrentRewards.prototype.period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new ValidatorCurrentRewards instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} ValidatorCurrentRewards instance + */ + ValidatorCurrentRewards.create = function create(properties) { + return new ValidatorCurrentRewards(properties); + }; + + /** + * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards} message ValidatorCurrentRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorCurrentRewards.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rewards != null && message.rewards.length) + for (var i = 0; i < message.rewards.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(message.rewards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.period != null && Object.hasOwnProperty.call(message, "period")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.period); + return writer; + }; + + /** + * Encodes the specified ValidatorCurrentRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards} message ValidatorCurrentRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorCurrentRewards.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorCurrentRewards.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rewards && message.rewards.length)) + message.rewards = []; + message.rewards.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + break; + case 2: + message.period = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorCurrentRewards.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorCurrentRewards message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorCurrentRewards.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rewards != null && message.hasOwnProperty("rewards")) { + if (!Array.isArray(message.rewards)) + return "rewards: array expected"; + for (var i = 0; i < message.rewards.length; ++i) { + var error = $root.cosmos_sdk.v1.DecCoin.verify(message.rewards[i]); + if (error) + return "rewards." + error; + } + } + if (message.period != null && message.hasOwnProperty("period")) + if (!$util.isInteger(message.period) && !(message.period && $util.isInteger(message.period.low) && $util.isInteger(message.period.high))) + return "period: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorCurrentRewards message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} ValidatorCurrentRewards + */ + ValidatorCurrentRewards.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards(); + if (object.rewards) { + if (!Array.isArray(object.rewards)) + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.rewards: array expected"); + message.rewards = []; + for (var i = 0; i < object.rewards.length; ++i) { + if (typeof object.rewards[i] !== "object") + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.rewards: object expected"); + message.rewards[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.rewards[i]); + } + } + if (object.period != null) + if ($util.Long) + (message.period = $util.Long.fromValue(object.period)).unsigned = true; + else if (typeof object.period === "string") + message.period = parseInt(object.period, 10); + else if (typeof object.period === "number") + message.period = object.period; + else if (typeof object.period === "object") + message.period = new $util.LongBits(object.period.low >>> 0, object.period.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a ValidatorCurrentRewards message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} message ValidatorCurrentRewards + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorCurrentRewards.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rewards = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.period = options.longs === String ? "0" : 0; + if (message.rewards && message.rewards.length) { + object.rewards = []; + for (var j = 0; j < message.rewards.length; ++j) + object.rewards[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.rewards[j], options); + } + if (message.period != null && message.hasOwnProperty("period")) + if (typeof message.period === "number") + object.period = options.longs === String ? String(message.period) : message.period; + else + object.period = options.longs === String ? $util.Long.prototype.toString.call(message.period) : options.longs === Number ? new $util.LongBits(message.period.low >>> 0, message.period.high >>> 0).toNumber(true) : message.period; + return object; + }; + + /** + * Converts this ValidatorCurrentRewards to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards + * @instance + * @returns {Object.} JSON object + */ + ValidatorCurrentRewards.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorCurrentRewards; + })(); + + v1.ValidatorAccumulatedCommission = (function() { + + /** + * Properties of a ValidatorAccumulatedCommission. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IValidatorAccumulatedCommission + * @property {Array.|null} [commission] ValidatorAccumulatedCommission commission + */ + + /** + * Constructs a new ValidatorAccumulatedCommission. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a ValidatorAccumulatedCommission. + * @implements IValidatorAccumulatedCommission + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission=} [properties] Properties to set + */ + function ValidatorAccumulatedCommission(properties) { + this.commission = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorAccumulatedCommission commission. + * @member {Array.} commission + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @instance + */ + ValidatorAccumulatedCommission.prototype.commission = $util.emptyArray; + + /** + * Creates a new ValidatorAccumulatedCommission instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission instance + */ + ValidatorAccumulatedCommission.create = function create(properties) { + return new ValidatorAccumulatedCommission(properties); + }; + + /** + * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission} message ValidatorAccumulatedCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorAccumulatedCommission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commission != null && message.commission.length) + for (var i = 0; i < message.commission.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(message.commission[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorAccumulatedCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission} message ValidatorAccumulatedCommission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorAccumulatedCommission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorAccumulatedCommission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.commission && message.commission.length)) + message.commission = []; + message.commission.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorAccumulatedCommission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorAccumulatedCommission message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorAccumulatedCommission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commission != null && message.hasOwnProperty("commission")) { + if (!Array.isArray(message.commission)) + return "commission: array expected"; + for (var i = 0; i < message.commission.length; ++i) { + var error = $root.cosmos_sdk.v1.DecCoin.verify(message.commission[i]); + if (error) + return "commission." + error; + } + } + return null; + }; + + /** + * Creates a ValidatorAccumulatedCommission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission + */ + ValidatorAccumulatedCommission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission(); + if (object.commission) { + if (!Array.isArray(object.commission)) + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.commission: array expected"); + message.commission = []; + for (var i = 0; i < object.commission.length; ++i) { + if (typeof object.commission[i] !== "object") + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.commission: object expected"); + message.commission[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.commission[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValidatorAccumulatedCommission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @static + * @param {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} message ValidatorAccumulatedCommission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorAccumulatedCommission.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.commission = []; + if (message.commission && message.commission.length) { + object.commission = []; + for (var j = 0; j < message.commission.length; ++j) + object.commission[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.commission[j], options); + } + return object; + }; + + /** + * Converts this ValidatorAccumulatedCommission to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission + * @instance + * @returns {Object.} JSON object + */ + ValidatorAccumulatedCommission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorAccumulatedCommission; + })(); + + v1.ValidatorOutstandingRewards = (function() { + + /** + * Properties of a ValidatorOutstandingRewards. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IValidatorOutstandingRewards + * @property {Array.|null} [rewards] ValidatorOutstandingRewards rewards + */ + + /** + * Constructs a new ValidatorOutstandingRewards. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a ValidatorOutstandingRewards. + * @implements IValidatorOutstandingRewards + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards=} [properties] Properties to set + */ + function ValidatorOutstandingRewards(properties) { + this.rewards = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorOutstandingRewards rewards. + * @member {Array.} rewards + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @instance + */ + ValidatorOutstandingRewards.prototype.rewards = $util.emptyArray; + + /** + * Creates a new ValidatorOutstandingRewards instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} ValidatorOutstandingRewards instance + */ + ValidatorOutstandingRewards.create = function create(properties) { + return new ValidatorOutstandingRewards(properties); + }; + + /** + * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards} message ValidatorOutstandingRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorOutstandingRewards.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rewards != null && message.rewards.length) + for (var i = 0; i < message.rewards.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(message.rewards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorOutstandingRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards} message ValidatorOutstandingRewards message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorOutstandingRewards.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorOutstandingRewards.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.rewards && message.rewards.length)) + message.rewards = []; + message.rewards.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorOutstandingRewards.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorOutstandingRewards message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorOutstandingRewards.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rewards != null && message.hasOwnProperty("rewards")) { + if (!Array.isArray(message.rewards)) + return "rewards: array expected"; + for (var i = 0; i < message.rewards.length; ++i) { + var error = $root.cosmos_sdk.v1.DecCoin.verify(message.rewards[i]); + if (error) + return "rewards." + error; + } + } + return null; + }; + + /** + * Creates a ValidatorOutstandingRewards message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} ValidatorOutstandingRewards + */ + ValidatorOutstandingRewards.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards(); + if (object.rewards) { + if (!Array.isArray(object.rewards)) + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.rewards: array expected"); + message.rewards = []; + for (var i = 0; i < object.rewards.length; ++i) { + if (typeof object.rewards[i] !== "object") + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.rewards: object expected"); + message.rewards[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.rewards[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValidatorOutstandingRewards message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @static + * @param {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} message ValidatorOutstandingRewards + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorOutstandingRewards.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rewards = []; + if (message.rewards && message.rewards.length) { + object.rewards = []; + for (var j = 0; j < message.rewards.length; ++j) + object.rewards[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.rewards[j], options); + } + return object; + }; + + /** + * Converts this ValidatorOutstandingRewards to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards + * @instance + * @returns {Object.} JSON object + */ + ValidatorOutstandingRewards.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorOutstandingRewards; + })(); + + v1.ValidatorSlashEvent = (function() { + + /** + * Properties of a ValidatorSlashEvent. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IValidatorSlashEvent + * @property {number|Long|null} [validatorPeriod] ValidatorSlashEvent validatorPeriod + * @property {string|null} [fraction] ValidatorSlashEvent fraction + */ + + /** + * Constructs a new ValidatorSlashEvent. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a ValidatorSlashEvent. + * @implements IValidatorSlashEvent + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent=} [properties] Properties to set + */ + function ValidatorSlashEvent(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSlashEvent validatorPeriod. + * @member {number|Long} validatorPeriod + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @instance + */ + ValidatorSlashEvent.prototype.validatorPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ValidatorSlashEvent fraction. + * @member {string} fraction + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @instance + */ + ValidatorSlashEvent.prototype.fraction = ""; + + /** + * Creates a new ValidatorSlashEvent instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} ValidatorSlashEvent instance + */ + ValidatorSlashEvent.create = function create(properties) { + return new ValidatorSlashEvent(properties); + }; + + /** + * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent} message ValidatorSlashEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEvent.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorPeriod != null && Object.hasOwnProperty.call(message, "validatorPeriod")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.validatorPeriod); + if (message.fraction != null && Object.hasOwnProperty.call(message, "fraction")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fraction); + return writer; + }; + + /** + * Encodes the specified ValidatorSlashEvent message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent} message ValidatorSlashEvent message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEvent.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEvent.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorPeriod = reader.uint64(); + break; + case 2: + message.fraction = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEvent.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSlashEvent message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSlashEvent.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorPeriod != null && message.hasOwnProperty("validatorPeriod")) + if (!$util.isInteger(message.validatorPeriod) && !(message.validatorPeriod && $util.isInteger(message.validatorPeriod.low) && $util.isInteger(message.validatorPeriod.high))) + return "validatorPeriod: integer|Long expected"; + if (message.fraction != null && message.hasOwnProperty("fraction")) + if (!$util.isString(message.fraction)) + return "fraction: string expected"; + return null; + }; + + /** + * Creates a ValidatorSlashEvent message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} ValidatorSlashEvent + */ + ValidatorSlashEvent.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent(); + if (object.validatorPeriod != null) + if ($util.Long) + (message.validatorPeriod = $util.Long.fromValue(object.validatorPeriod)).unsigned = true; + else if (typeof object.validatorPeriod === "string") + message.validatorPeriod = parseInt(object.validatorPeriod, 10); + else if (typeof object.validatorPeriod === "number") + message.validatorPeriod = object.validatorPeriod; + else if (typeof object.validatorPeriod === "object") + message.validatorPeriod = new $util.LongBits(object.validatorPeriod.low >>> 0, object.validatorPeriod.high >>> 0).toNumber(true); + if (object.fraction != null) + message.fraction = String(object.fraction); + return message; + }; + + /** + * Creates a plain object from a ValidatorSlashEvent message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @static + * @param {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} message ValidatorSlashEvent + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSlashEvent.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.validatorPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.validatorPeriod = options.longs === String ? "0" : 0; + object.fraction = ""; + } + if (message.validatorPeriod != null && message.hasOwnProperty("validatorPeriod")) + if (typeof message.validatorPeriod === "number") + object.validatorPeriod = options.longs === String ? String(message.validatorPeriod) : message.validatorPeriod; + else + object.validatorPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.validatorPeriod) : options.longs === Number ? new $util.LongBits(message.validatorPeriod.low >>> 0, message.validatorPeriod.high >>> 0).toNumber(true) : message.validatorPeriod; + if (message.fraction != null && message.hasOwnProperty("fraction")) + object.fraction = message.fraction; + return object; + }; + + /** + * Converts this ValidatorSlashEvent to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent + * @instance + * @returns {Object.} JSON object + */ + ValidatorSlashEvent.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSlashEvent; + })(); + + v1.ValidatorSlashEvents = (function() { + + /** + * Properties of a ValidatorSlashEvents. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IValidatorSlashEvents + * @property {Array.|null} [validatorSlashEvents] ValidatorSlashEvents validatorSlashEvents + */ + + /** + * Constructs a new ValidatorSlashEvents. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a ValidatorSlashEvents. + * @implements IValidatorSlashEvents + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents=} [properties] Properties to set + */ + function ValidatorSlashEvents(properties) { + this.validatorSlashEvents = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSlashEvents validatorSlashEvents. + * @member {Array.} validatorSlashEvents + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @instance + */ + ValidatorSlashEvents.prototype.validatorSlashEvents = $util.emptyArray; + + /** + * Creates a new ValidatorSlashEvents instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} ValidatorSlashEvents instance + */ + ValidatorSlashEvents.create = function create(properties) { + return new ValidatorSlashEvents(properties); + }; + + /** + * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents} message ValidatorSlashEvents message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEvents.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorSlashEvents != null && message.validatorSlashEvents.length) + for (var i = 0; i < message.validatorSlashEvents.length; ++i) + $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.encode(message.validatorSlashEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ValidatorSlashEvents message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @static + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents} message ValidatorSlashEvents message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSlashEvents.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEvents.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvents(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validatorSlashEvents && message.validatorSlashEvents.length)) + message.validatorSlashEvents = []; + message.validatorSlashEvents.push($root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSlashEvents.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSlashEvents message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSlashEvents.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorSlashEvents != null && message.hasOwnProperty("validatorSlashEvents")) { + if (!Array.isArray(message.validatorSlashEvents)) + return "validatorSlashEvents: array expected"; + for (var i = 0; i < message.validatorSlashEvents.length; ++i) { + var error = $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify(message.validatorSlashEvents[i]); + if (error) + return "validatorSlashEvents." + error; + } + } + return null; + }; + + /** + * Creates a ValidatorSlashEvents message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} ValidatorSlashEvents + */ + ValidatorSlashEvents.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvents) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvents(); + if (object.validatorSlashEvents) { + if (!Array.isArray(object.validatorSlashEvents)) + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.validatorSlashEvents: array expected"); + message.validatorSlashEvents = []; + for (var i = 0; i < object.validatorSlashEvents.length; ++i) { + if (typeof object.validatorSlashEvents[i] !== "object") + throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.validatorSlashEvents: object expected"); + message.validatorSlashEvents[i] = $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.fromObject(object.validatorSlashEvents[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ValidatorSlashEvents message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @static + * @param {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} message ValidatorSlashEvents + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSlashEvents.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validatorSlashEvents = []; + if (message.validatorSlashEvents && message.validatorSlashEvents.length) { + object.validatorSlashEvents = []; + for (var j = 0; j < message.validatorSlashEvents.length; ++j) + object.validatorSlashEvents[j] = $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.toObject(message.validatorSlashEvents[j], options); + } + return object; + }; + + /** + * Converts this ValidatorSlashEvents to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents + * @instance + * @returns {Object.} JSON object + */ + ValidatorSlashEvents.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSlashEvents; + })(); + + v1.FeePool = (function() { + + /** + * Properties of a FeePool. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IFeePool + * @property {Array.|null} [communityPool] FeePool communityPool + */ + + /** + * Constructs a new FeePool. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a FeePool. + * @implements IFeePool + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IFeePool=} [properties] Properties to set + */ + function FeePool(properties) { + this.communityPool = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeePool communityPool. + * @member {Array.} communityPool + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @instance + */ + FeePool.prototype.communityPool = $util.emptyArray; + + /** + * Creates a new FeePool instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @static + * @param {cosmos_sdk.x.distribution.v1.IFeePool=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.FeePool} FeePool instance + */ + FeePool.create = function create(properties) { + return new FeePool(properties); + }; + + /** + * Encodes the specified FeePool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @static + * @param {cosmos_sdk.x.distribution.v1.IFeePool} message FeePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeePool.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.communityPool != null && message.communityPool.length) + for (var i = 0; i < message.communityPool.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(message.communityPool[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeePool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @static + * @param {cosmos_sdk.x.distribution.v1.IFeePool} message FeePool message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeePool.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeePool message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.FeePool} FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeePool.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.FeePool(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.communityPool && message.communityPool.length)) + message.communityPool = []; + message.communityPool.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeePool message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.FeePool} FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeePool.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeePool message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeePool.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.communityPool != null && message.hasOwnProperty("communityPool")) { + if (!Array.isArray(message.communityPool)) + return "communityPool: array expected"; + for (var i = 0; i < message.communityPool.length; ++i) { + var error = $root.cosmos_sdk.v1.DecCoin.verify(message.communityPool[i]); + if (error) + return "communityPool." + error; + } + } + return null; + }; + + /** + * Creates a FeePool message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.FeePool} FeePool + */ + FeePool.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.FeePool) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.FeePool(); + if (object.communityPool) { + if (!Array.isArray(object.communityPool)) + throw TypeError(".cosmos_sdk.x.distribution.v1.FeePool.communityPool: array expected"); + message.communityPool = []; + for (var i = 0; i < object.communityPool.length; ++i) { + if (typeof object.communityPool[i] !== "object") + throw TypeError(".cosmos_sdk.x.distribution.v1.FeePool.communityPool: object expected"); + message.communityPool[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.communityPool[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FeePool message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @static + * @param {cosmos_sdk.x.distribution.v1.FeePool} message FeePool + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeePool.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.communityPool = []; + if (message.communityPool && message.communityPool.length) { + object.communityPool = []; + for (var j = 0; j < message.communityPool.length; ++j) + object.communityPool[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.communityPool[j], options); + } + return object; + }; + + /** + * Converts this FeePool to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.FeePool + * @instance + * @returns {Object.} JSON object + */ + FeePool.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FeePool; + })(); + + v1.CommunityPoolSpendProposal = (function() { + + /** + * Properties of a CommunityPoolSpendProposal. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface ICommunityPoolSpendProposal + * @property {string|null} [title] CommunityPoolSpendProposal title + * @property {string|null} [description] CommunityPoolSpendProposal description + * @property {Uint8Array|null} [recipient] CommunityPoolSpendProposal recipient + * @property {Array.|null} [amount] CommunityPoolSpendProposal amount + */ + + /** + * Constructs a new CommunityPoolSpendProposal. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a CommunityPoolSpendProposal. + * @implements ICommunityPoolSpendProposal + * @constructor + * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal=} [properties] Properties to set + */ + function CommunityPoolSpendProposal(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommunityPoolSpendProposal title. + * @member {string} title + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @instance + */ + CommunityPoolSpendProposal.prototype.title = ""; + + /** + * CommunityPoolSpendProposal description. + * @member {string} description + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @instance + */ + CommunityPoolSpendProposal.prototype.description = ""; + + /** + * CommunityPoolSpendProposal recipient. + * @member {Uint8Array} recipient + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @instance + */ + CommunityPoolSpendProposal.prototype.recipient = $util.newBuffer([]); + + /** + * CommunityPoolSpendProposal amount. + * @member {Array.} amount + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @instance + */ + CommunityPoolSpendProposal.prototype.amount = $util.emptyArray; + + /** + * Creates a new CommunityPoolSpendProposal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @static + * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} CommunityPoolSpendProposal instance + */ + CommunityPoolSpendProposal.create = function create(properties) { + return new CommunityPoolSpendProposal(properties); + }; + + /** + * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @static + * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal} message CommunityPoolSpendProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommunityPoolSpendProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.recipient != null && Object.hasOwnProperty.call(message, "recipient")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.recipient); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommunityPoolSpendProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @static + * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal} message CommunityPoolSpendProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommunityPoolSpendProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommunityPoolSpendProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.recipient = reader.bytes(); + break; + case 4: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommunityPoolSpendProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommunityPoolSpendProposal message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommunityPoolSpendProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.recipient != null && message.hasOwnProperty("recipient")) + if (!(message.recipient && typeof message.recipient.length === "number" || $util.isString(message.recipient))) + return "recipient: buffer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a CommunityPoolSpendProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} CommunityPoolSpendProposal + */ + CommunityPoolSpendProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.recipient != null) + if (typeof object.recipient === "string") + $util.base64.decode(object.recipient, message.recipient = $util.newBuffer($util.base64.length(object.recipient)), 0); + else if (object.recipient.length) + message.recipient = object.recipient; + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.amount: object expected"); + message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CommunityPoolSpendProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @static + * @param {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} message CommunityPoolSpendProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommunityPoolSpendProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.title = ""; + object.description = ""; + if (options.bytes === String) + object.recipient = ""; + else { + object.recipient = []; + if (options.bytes !== Array) + object.recipient = $util.newBuffer(object.recipient); + } + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.recipient != null && message.hasOwnProperty("recipient")) + object.recipient = options.bytes === String ? $util.base64.encode(message.recipient, 0, message.recipient.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipient) : message.recipient; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this CommunityPoolSpendProposal to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal + * @instance + * @returns {Object.} JSON object + */ + CommunityPoolSpendProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommunityPoolSpendProposal; + })(); + + v1.DelegatorStartingInfo = (function() { + + /** + * Properties of a DelegatorStartingInfo. + * @memberof cosmos_sdk.x.distribution.v1 + * @interface IDelegatorStartingInfo + * @property {number|Long|null} [previousPeriod] DelegatorStartingInfo previousPeriod + * @property {string|null} [stake] DelegatorStartingInfo stake + * @property {number|Long|null} [height] DelegatorStartingInfo height + */ + + /** + * Constructs a new DelegatorStartingInfo. + * @memberof cosmos_sdk.x.distribution.v1 + * @classdesc Represents a DelegatorStartingInfo. + * @implements IDelegatorStartingInfo + * @constructor + * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo=} [properties] Properties to set + */ + function DelegatorStartingInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DelegatorStartingInfo previousPeriod. + * @member {number|Long} previousPeriod + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @instance + */ + DelegatorStartingInfo.prototype.previousPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * DelegatorStartingInfo stake. + * @member {string} stake + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @instance + */ + DelegatorStartingInfo.prototype.stake = ""; + + /** + * DelegatorStartingInfo height. + * @member {number|Long} height + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @instance + */ + DelegatorStartingInfo.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new DelegatorStartingInfo instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @static + * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo=} [properties] Properties to set + * @returns {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} DelegatorStartingInfo instance + */ + DelegatorStartingInfo.create = function create(properties) { + return new DelegatorStartingInfo(properties); + }; + + /** + * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @static + * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo} message DelegatorStartingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegatorStartingInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.previousPeriod != null && Object.hasOwnProperty.call(message, "previousPeriod")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.previousPeriod); + if (message.stake != null && Object.hasOwnProperty.call(message, "stake")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.stake); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.height); + return writer; + }; + + /** + * Encodes the specified DelegatorStartingInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @static + * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo} message DelegatorStartingInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DelegatorStartingInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegatorStartingInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.DelegatorStartingInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.previousPeriod = reader.uint64(); + break; + case 2: + message.stake = reader.string(); + break; + case 3: + message.height = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DelegatorStartingInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DelegatorStartingInfo message. + * @function verify + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DelegatorStartingInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.previousPeriod != null && message.hasOwnProperty("previousPeriod")) + if (!$util.isInteger(message.previousPeriod) && !(message.previousPeriod && $util.isInteger(message.previousPeriod.low) && $util.isInteger(message.previousPeriod.high))) + return "previousPeriod: integer|Long expected"; + if (message.stake != null && message.hasOwnProperty("stake")) + if (!$util.isString(message.stake)) + return "stake: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + return null; + }; + + /** + * Creates a DelegatorStartingInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} DelegatorStartingInfo + */ + DelegatorStartingInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.distribution.v1.DelegatorStartingInfo) + return object; + var message = new $root.cosmos_sdk.x.distribution.v1.DelegatorStartingInfo(); + if (object.previousPeriod != null) + if ($util.Long) + (message.previousPeriod = $util.Long.fromValue(object.previousPeriod)).unsigned = true; + else if (typeof object.previousPeriod === "string") + message.previousPeriod = parseInt(object.previousPeriod, 10); + else if (typeof object.previousPeriod === "number") + message.previousPeriod = object.previousPeriod; + else if (typeof object.previousPeriod === "object") + message.previousPeriod = new $util.LongBits(object.previousPeriod.low >>> 0, object.previousPeriod.high >>> 0).toNumber(true); + if (object.stake != null) + message.stake = String(object.stake); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = true; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a DelegatorStartingInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @static + * @param {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} message DelegatorStartingInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DelegatorStartingInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.previousPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.previousPeriod = options.longs === String ? "0" : 0; + object.stake = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + } + if (message.previousPeriod != null && message.hasOwnProperty("previousPeriod")) + if (typeof message.previousPeriod === "number") + object.previousPeriod = options.longs === String ? String(message.previousPeriod) : message.previousPeriod; + else + object.previousPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.previousPeriod) : options.longs === Number ? new $util.LongBits(message.previousPeriod.low >>> 0, message.previousPeriod.high >>> 0).toNumber(true) : message.previousPeriod; + if (message.stake != null && message.hasOwnProperty("stake")) + object.stake = message.stake; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; + return object; + }; + + /** + * Converts this DelegatorStartingInfo to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo + * @instance + * @returns {Object.} JSON object + */ + DelegatorStartingInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DelegatorStartingInfo; + })(); + + return v1; + })(); + + return distribution; + })(); + + x.evidence = (function() { + + /** + * Namespace evidence. + * @memberof cosmos_sdk.x + * @namespace + */ + var evidence = {}; + + evidence.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.evidence + * @namespace + */ + var v1 = {}; + + v1.MsgSubmitEvidence = (function() { + + /** + * Properties of a MsgSubmitEvidence. + * @memberof cosmos_sdk.x.evidence.v1 + * @interface IMsgSubmitEvidence + * @property {Uint8Array|null} [submitter] MsgSubmitEvidence submitter + * @property {google.protobuf.IAny|null} [evidence] MsgSubmitEvidence evidence + */ + + /** + * Constructs a new MsgSubmitEvidence. + * @memberof cosmos_sdk.x.evidence.v1 + * @classdesc Represents a MsgSubmitEvidence. + * @implements IMsgSubmitEvidence + * @constructor + * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence=} [properties] Properties to set + */ + function MsgSubmitEvidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitEvidence submitter. + * @member {Uint8Array} submitter + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @instance + */ + MsgSubmitEvidence.prototype.submitter = $util.newBuffer([]); + + /** + * MsgSubmitEvidence evidence. + * @member {google.protobuf.IAny|null|undefined} evidence + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @instance + */ + MsgSubmitEvidence.prototype.evidence = null; + + /** + * Creates a new MsgSubmitEvidence instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @static + * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence=} [properties] Properties to set + * @returns {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} MsgSubmitEvidence instance + */ + MsgSubmitEvidence.create = function create(properties) { + return new MsgSubmitEvidence(properties); + }; + + /** + * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @static + * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.submitter != null && Object.hasOwnProperty.call(message, "submitter")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.submitter); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.google.protobuf.Any.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgSubmitEvidence message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @static + * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitEvidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.evidence.v1.MsgSubmitEvidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.submitter = reader.bytes(); + break; + case 2: + message.evidence = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitEvidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitEvidence message. + * @function verify + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitEvidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.submitter != null && message.hasOwnProperty("submitter")) + if (!(message.submitter && typeof message.submitter.length === "number" || $util.isString(message.submitter))) + return "submitter: buffer expected"; + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.google.protobuf.Any.verify(message.evidence); + if (error) + return "evidence." + error; + } + return null; + }; + + /** + * Creates a MsgSubmitEvidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} MsgSubmitEvidence + */ + MsgSubmitEvidence.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.evidence.v1.MsgSubmitEvidence) + return object; + var message = new $root.cosmos_sdk.x.evidence.v1.MsgSubmitEvidence(); + if (object.submitter != null) + if (typeof object.submitter === "string") + $util.base64.decode(object.submitter, message.submitter = $util.newBuffer($util.base64.length(object.submitter)), 0); + else if (object.submitter.length) + message.submitter = object.submitter; + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.evidence: object expected"); + message.evidence = $root.google.protobuf.Any.fromObject(object.evidence); + } + return message; + }; + + /** + * Creates a plain object from a MsgSubmitEvidence message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @static + * @param {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} message MsgSubmitEvidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitEvidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.submitter = ""; + else { + object.submitter = []; + if (options.bytes !== Array) + object.submitter = $util.newBuffer(object.submitter); + } + object.evidence = null; + } + if (message.submitter != null && message.hasOwnProperty("submitter")) + object.submitter = options.bytes === String ? $util.base64.encode(message.submitter, 0, message.submitter.length) : options.bytes === Array ? Array.prototype.slice.call(message.submitter) : message.submitter; + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.google.protobuf.Any.toObject(message.evidence, options); + return object; + }; + + /** + * Converts this MsgSubmitEvidence to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitEvidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitEvidence; + })(); + + v1.Equivocation = (function() { + + /** + * Properties of an Equivocation. + * @memberof cosmos_sdk.x.evidence.v1 + * @interface IEquivocation + * @property {number|Long|null} [height] Equivocation height + * @property {google.protobuf.ITimestamp|null} [time] Equivocation time + * @property {number|Long|null} [power] Equivocation power + * @property {Uint8Array|null} [consensusAddress] Equivocation consensusAddress + */ + + /** + * Constructs a new Equivocation. + * @memberof cosmos_sdk.x.evidence.v1 + * @classdesc Represents an Equivocation. + * @implements IEquivocation + * @constructor + * @param {cosmos_sdk.x.evidence.v1.IEquivocation=} [properties] Properties to set + */ + function Equivocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Equivocation height. + * @member {number|Long} height + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @instance + */ + Equivocation.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Equivocation time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @instance + */ + Equivocation.prototype.time = null; + + /** + * Equivocation power. + * @member {number|Long} power + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @instance + */ + Equivocation.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Equivocation consensusAddress. + * @member {Uint8Array} consensusAddress + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @instance + */ + Equivocation.prototype.consensusAddress = $util.newBuffer([]); + + /** + * Creates a new Equivocation instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @static + * @param {cosmos_sdk.x.evidence.v1.IEquivocation=} [properties] Properties to set + * @returns {cosmos_sdk.x.evidence.v1.Equivocation} Equivocation instance + */ + Equivocation.create = function create(properties) { + return new Equivocation(properties); + }; + + /** + * Encodes the specified Equivocation message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @static + * @param {cosmos_sdk.x.evidence.v1.IEquivocation} message Equivocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Equivocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.power); + if (message.consensusAddress != null && Object.hasOwnProperty.call(message, "consensusAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.consensusAddress); + return writer; + }; + + /** + * Encodes the specified Equivocation message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @static + * @param {cosmos_sdk.x.evidence.v1.IEquivocation} message Equivocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Equivocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Equivocation message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.evidence.v1.Equivocation} Equivocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Equivocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.evidence.v1.Equivocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + case 2: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.power = reader.int64(); + break; + case 4: + message.consensusAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Equivocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.evidence.v1.Equivocation} Equivocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Equivocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Equivocation message. + * @function verify + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Equivocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + if (message.consensusAddress != null && message.hasOwnProperty("consensusAddress")) + if (!(message.consensusAddress && typeof message.consensusAddress.length === "number" || $util.isString(message.consensusAddress))) + return "consensusAddress: buffer expected"; + return null; + }; + + /** + * Creates an Equivocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.evidence.v1.Equivocation} Equivocation + */ + Equivocation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.evidence.v1.Equivocation) + return object; + var message = new $root.cosmos_sdk.x.evidence.v1.Equivocation(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".cosmos_sdk.x.evidence.v1.Equivocation.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + if (object.consensusAddress != null) + if (typeof object.consensusAddress === "string") + $util.base64.decode(object.consensusAddress, message.consensusAddress = $util.newBuffer($util.base64.length(object.consensusAddress)), 0); + else if (object.consensusAddress.length) + message.consensusAddress = object.consensusAddress; + return message; + }; + + /** + * Creates a plain object from an Equivocation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @static + * @param {cosmos_sdk.x.evidence.v1.Equivocation} message Equivocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Equivocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.consensusAddress = ""; + else { + object.consensusAddress = []; + if (options.bytes !== Array) + object.consensusAddress = $util.newBuffer(object.consensusAddress); + } + } + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + if (message.consensusAddress != null && message.hasOwnProperty("consensusAddress")) + object.consensusAddress = options.bytes === String ? $util.base64.encode(message.consensusAddress, 0, message.consensusAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensusAddress) : message.consensusAddress; + return object; + }; + + /** + * Converts this Equivocation to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.evidence.v1.Equivocation + * @instance + * @returns {Object.} JSON object + */ + Equivocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Equivocation; + })(); + + return v1; + })(); + + return evidence; + })(); + + x.gov = (function() { + + /** + * Namespace gov. + * @memberof cosmos_sdk.x + * @namespace + */ + var gov = {}; + + gov.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.gov + * @namespace + */ + var v1 = {}; + + v1.MsgSubmitProposal = (function() { + + /** + * Properties of a MsgSubmitProposal. + * @memberof cosmos_sdk.x.gov.v1 + * @interface IMsgSubmitProposal + * @property {google.protobuf.IAny|null} [content] MsgSubmitProposal content + * @property {Array.|null} [initialDeposit] MsgSubmitProposal initialDeposit + * @property {Uint8Array|null} [proposer] MsgSubmitProposal proposer + */ + + /** + * Constructs a new MsgSubmitProposal. + * @memberof cosmos_sdk.x.gov.v1 + * @classdesc Represents a MsgSubmitProposal. + * @implements IMsgSubmitProposal + * @constructor + * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal=} [properties] Properties to set + */ + function MsgSubmitProposal(properties) { + this.initialDeposit = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgSubmitProposal content. + * @member {google.protobuf.IAny|null|undefined} content + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.content = null; + + /** + * MsgSubmitProposal initialDeposit. + * @member {Array.} initialDeposit + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.initialDeposit = $util.emptyArray; + + /** + * MsgSubmitProposal proposer. + * @member {Uint8Array} proposer + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @instance + */ + MsgSubmitProposal.prototype.proposer = $util.newBuffer([]); + + /** + * Creates a new MsgSubmitProposal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @static + * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal=} [properties] Properties to set + * @returns {cosmos_sdk.x.gov.v1.MsgSubmitProposal} MsgSubmitProposal instance + */ + MsgSubmitProposal.create = function create(properties) { + return new MsgSubmitProposal(properties); + }; + + /** + * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @static + * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.initialDeposit != null && message.initialDeposit.length) + for (var i = 0; i < message.initialDeposit.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.initialDeposit[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proposer); + return writer; + }; + + /** + * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @static + * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgSubmitProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.gov.v1.MsgSubmitProposal} MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.MsgSubmitProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.initialDeposit && message.initialDeposit.length)) + message.initialDeposit = []; + message.initialDeposit.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + case 3: + message.proposer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.gov.v1.MsgSubmitProposal} MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSubmitProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgSubmitProposal message. + * @function verify + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgSubmitProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.protobuf.Any.verify(message.content); + if (error) + return "content." + error; + } + if (message.initialDeposit != null && message.hasOwnProperty("initialDeposit")) { + if (!Array.isArray(message.initialDeposit)) + return "initialDeposit: array expected"; + for (var i = 0; i < message.initialDeposit.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.initialDeposit[i]); + if (error) + return "initialDeposit." + error; + } + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + if (!(message.proposer && typeof message.proposer.length === "number" || $util.isString(message.proposer))) + return "proposer: buffer expected"; + return null; + }; + + /** + * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.gov.v1.MsgSubmitProposal} MsgSubmitProposal + */ + MsgSubmitProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.gov.v1.MsgSubmitProposal) + return object; + var message = new $root.cosmos_sdk.x.gov.v1.MsgSubmitProposal(); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.MsgSubmitProposal.content: object expected"); + message.content = $root.google.protobuf.Any.fromObject(object.content); + } + if (object.initialDeposit) { + if (!Array.isArray(object.initialDeposit)) + throw TypeError(".cosmos_sdk.x.gov.v1.MsgSubmitProposal.initialDeposit: array expected"); + message.initialDeposit = []; + for (var i = 0; i < object.initialDeposit.length; ++i) { + if (typeof object.initialDeposit[i] !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.MsgSubmitProposal.initialDeposit: object expected"); + message.initialDeposit[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.initialDeposit[i]); + } + } + if (object.proposer != null) + if (typeof object.proposer === "string") + $util.base64.decode(object.proposer, message.proposer = $util.newBuffer($util.base64.length(object.proposer)), 0); + else if (object.proposer.length) + message.proposer = object.proposer; + return message; + }; + + /** + * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @static + * @param {cosmos_sdk.x.gov.v1.MsgSubmitProposal} message MsgSubmitProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgSubmitProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.initialDeposit = []; + if (options.defaults) { + object.content = null; + if (options.bytes === String) + object.proposer = ""; + else { + object.proposer = []; + if (options.bytes !== Array) + object.proposer = $util.newBuffer(object.proposer); + } + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.protobuf.Any.toObject(message.content, options); + if (message.initialDeposit && message.initialDeposit.length) { + object.initialDeposit = []; + for (var j = 0; j < message.initialDeposit.length; ++j) + object.initialDeposit[j] = $root.cosmos_sdk.v1.Coin.toObject(message.initialDeposit[j], options); + } + if (message.proposer != null && message.hasOwnProperty("proposer")) + object.proposer = options.bytes === String ? $util.base64.encode(message.proposer, 0, message.proposer.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposer) : message.proposer; + return object; + }; + + /** + * Converts this MsgSubmitProposal to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal + * @instance + * @returns {Object.} JSON object + */ + MsgSubmitProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgSubmitProposal; + })(); + + v1.MsgVote = (function() { + + /** + * Properties of a MsgVote. + * @memberof cosmos_sdk.x.gov.v1 + * @interface IMsgVote + * @property {number|Long|null} [proposalId] MsgVote proposalId + * @property {Uint8Array|null} [voter] MsgVote voter + * @property {cosmos_sdk.x.gov.v1.VoteOption|null} [option] MsgVote option + */ + + /** + * Constructs a new MsgVote. + * @memberof cosmos_sdk.x.gov.v1 + * @classdesc Represents a MsgVote. + * @implements IMsgVote + * @constructor + * @param {cosmos_sdk.x.gov.v1.IMsgVote=} [properties] Properties to set + */ + function MsgVote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgVote proposalId. + * @member {number|Long} proposalId + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @instance + */ + MsgVote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgVote voter. + * @member {Uint8Array} voter + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @instance + */ + MsgVote.prototype.voter = $util.newBuffer([]); + + /** + * MsgVote option. + * @member {cosmos_sdk.x.gov.v1.VoteOption} option + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @instance + */ + MsgVote.prototype.option = 0; + + /** + * Creates a new MsgVote instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @static + * @param {cosmos_sdk.x.gov.v1.IMsgVote=} [properties] Properties to set + * @returns {cosmos_sdk.x.gov.v1.MsgVote} MsgVote instance + */ + MsgVote.create = function create(properties) { + return new MsgVote(properties); + }; + + /** + * Encodes the specified MsgVote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @static + * @param {cosmos_sdk.x.gov.v1.IMsgVote} message MsgVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.voter); + if (message.option != null && Object.hasOwnProperty.call(message, "option")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); + return writer; + }; + + /** + * Encodes the specified MsgVote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @static + * @param {cosmos_sdk.x.gov.v1.IMsgVote} message MsgVote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgVote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgVote message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.gov.v1.MsgVote} MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.MsgVote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.bytes(); + break; + case 3: + message.option = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgVote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.gov.v1.MsgVote} MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgVote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgVote message. + * @function verify + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgVote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.voter != null && message.hasOwnProperty("voter")) + if (!(message.voter && typeof message.voter.length === "number" || $util.isString(message.voter))) + return "voter: buffer expected"; + if (message.option != null && message.hasOwnProperty("option")) + switch (message.option) { + default: + return "option: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a MsgVote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.gov.v1.MsgVote} MsgVote + */ + MsgVote.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.gov.v1.MsgVote) + return object; + var message = new $root.cosmos_sdk.x.gov.v1.MsgVote(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.voter != null) + if (typeof object.voter === "string") + $util.base64.decode(object.voter, message.voter = $util.newBuffer($util.base64.length(object.voter)), 0); + else if (object.voter.length) + message.voter = object.voter; + switch (object.option) { + case "VOTE_OPTION_UNSPECIFIED": + case 0: + message.option = 0; + break; + case "VOTE_OPTION_YES": + case 1: + message.option = 1; + break; + case "VOTE_OPTION_ABSTAIN": + case 2: + message.option = 2; + break; + case "VOTE_OPTION_NO": + case 3: + message.option = 3; + break; + case "VOTE_OPTION_NO_WITH_VETO": + case 4: + message.option = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a MsgVote message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @static + * @param {cosmos_sdk.x.gov.v1.MsgVote} message MsgVote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgVote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.voter = ""; + else { + object.voter = []; + if (options.bytes !== Array) + object.voter = $util.newBuffer(object.voter); + } + object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = options.bytes === String ? $util.base64.encode(message.voter, 0, message.voter.length) : options.bytes === Array ? Array.prototype.slice.call(message.voter) : message.voter; + if (message.option != null && message.hasOwnProperty("option")) + object.option = options.enums === String ? $root.cosmos_sdk.x.gov.v1.VoteOption[message.option] : message.option; + return object; + }; + + /** + * Converts this MsgVote to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.gov.v1.MsgVote + * @instance + * @returns {Object.} JSON object + */ + MsgVote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgVote; + })(); + + v1.MsgDeposit = (function() { + + /** + * Properties of a MsgDeposit. + * @memberof cosmos_sdk.x.gov.v1 + * @interface IMsgDeposit + * @property {number|Long|null} [proposalId] MsgDeposit proposalId + * @property {Uint8Array|null} [depositor] MsgDeposit depositor + * @property {Array.|null} [amount] MsgDeposit amount + */ + + /** + * Constructs a new MsgDeposit. + * @memberof cosmos_sdk.x.gov.v1 + * @classdesc Represents a MsgDeposit. + * @implements IMsgDeposit + * @constructor + * @param {cosmos_sdk.x.gov.v1.IMsgDeposit=} [properties] Properties to set + */ + function MsgDeposit(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgDeposit proposalId. + * @member {number|Long} proposalId + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgDeposit depositor. + * @member {Uint8Array} depositor + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.depositor = $util.newBuffer([]); + + /** + * MsgDeposit amount. + * @member {Array.} amount + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @instance + */ + MsgDeposit.prototype.amount = $util.emptyArray; + + /** + * Creates a new MsgDeposit instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @static + * @param {cosmos_sdk.x.gov.v1.IMsgDeposit=} [properties] Properties to set + * @returns {cosmos_sdk.x.gov.v1.MsgDeposit} MsgDeposit instance + */ + MsgDeposit.create = function create(properties) { + return new MsgDeposit(properties); + }; + + /** + * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @static + * @param {cosmos_sdk.x.gov.v1.IMsgDeposit} message MsgDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDeposit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.depositor); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgDeposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @static + * @param {cosmos_sdk.x.gov.v1.IMsgDeposit} message MsgDeposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDeposit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.gov.v1.MsgDeposit} MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDeposit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.MsgDeposit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.bytes(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.gov.v1.MsgDeposit} MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDeposit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDeposit message. + * @function verify + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDeposit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!(message.depositor && typeof message.depositor.length === "number" || $util.isString(message.depositor))) + return "depositor: buffer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a MsgDeposit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.gov.v1.MsgDeposit} MsgDeposit + */ + MsgDeposit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.gov.v1.MsgDeposit) + return object; + var message = new $root.cosmos_sdk.x.gov.v1.MsgDeposit(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.depositor != null) + if (typeof object.depositor === "string") + $util.base64.decode(object.depositor, message.depositor = $util.newBuffer($util.base64.length(object.depositor)), 0); + else if (object.depositor.length) + message.depositor = object.depositor; + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos_sdk.x.gov.v1.MsgDeposit.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.MsgDeposit.amount: object expected"); + message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MsgDeposit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @static + * @param {cosmos_sdk.x.gov.v1.MsgDeposit} message MsgDeposit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDeposit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.depositor = ""; + else { + object.depositor = []; + if (options.bytes !== Array) + object.depositor = $util.newBuffer(object.depositor); + } + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = options.bytes === String ? $util.base64.encode(message.depositor, 0, message.depositor.length) : options.bytes === Array ? Array.prototype.slice.call(message.depositor) : message.depositor; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this MsgDeposit to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.gov.v1.MsgDeposit + * @instance + * @returns {Object.} JSON object + */ + MsgDeposit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDeposit; + })(); + + /** + * VoteOption enum. + * @name cosmos_sdk.x.gov.v1.VoteOption + * @enum {number} + * @property {number} VOTE_OPTION_UNSPECIFIED=0 VOTE_OPTION_UNSPECIFIED value + * @property {number} VOTE_OPTION_YES=1 VOTE_OPTION_YES value + * @property {number} VOTE_OPTION_ABSTAIN=2 VOTE_OPTION_ABSTAIN value + * @property {number} VOTE_OPTION_NO=3 VOTE_OPTION_NO value + * @property {number} VOTE_OPTION_NO_WITH_VETO=4 VOTE_OPTION_NO_WITH_VETO value + */ + v1.VoteOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VOTE_OPTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "VOTE_OPTION_YES"] = 1; + values[valuesById[2] = "VOTE_OPTION_ABSTAIN"] = 2; + values[valuesById[3] = "VOTE_OPTION_NO"] = 3; + values[valuesById[4] = "VOTE_OPTION_NO_WITH_VETO"] = 4; + return values; + })(); + + v1.TextProposal = (function() { + + /** + * Properties of a TextProposal. + * @memberof cosmos_sdk.x.gov.v1 + * @interface ITextProposal + * @property {string|null} [title] TextProposal title + * @property {string|null} [description] TextProposal description + */ + + /** + * Constructs a new TextProposal. + * @memberof cosmos_sdk.x.gov.v1 + * @classdesc Represents a TextProposal. + * @implements ITextProposal + * @constructor + * @param {cosmos_sdk.x.gov.v1.ITextProposal=} [properties] Properties to set + */ + function TextProposal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TextProposal title. + * @member {string} title + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @instance + */ + TextProposal.prototype.title = ""; + + /** + * TextProposal description. + * @member {string} description + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @instance + */ + TextProposal.prototype.description = ""; + + /** + * Creates a new TextProposal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @static + * @param {cosmos_sdk.x.gov.v1.ITextProposal=} [properties] Properties to set + * @returns {cosmos_sdk.x.gov.v1.TextProposal} TextProposal instance + */ + TextProposal.create = function create(properties) { + return new TextProposal(properties); + }; + + /** + * Encodes the specified TextProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @static + * @param {cosmos_sdk.x.gov.v1.ITextProposal} message TextProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @static + * @param {cosmos_sdk.x.gov.v1.ITextProposal} message TextProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TextProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TextProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.gov.v1.TextProposal} TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.TextProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TextProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.gov.v1.TextProposal} TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TextProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TextProposal message. + * @function verify + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TextProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a TextProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.gov.v1.TextProposal} TextProposal + */ + TextProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.gov.v1.TextProposal) + return object; + var message = new $root.cosmos_sdk.x.gov.v1.TextProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a TextProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @static + * @param {cosmos_sdk.x.gov.v1.TextProposal} message TextProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TextProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this TextProposal to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.gov.v1.TextProposal + * @instance + * @returns {Object.} JSON object + */ + TextProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TextProposal; + })(); + + v1.Deposit = (function() { + + /** + * Properties of a Deposit. + * @memberof cosmos_sdk.x.gov.v1 + * @interface IDeposit + * @property {number|Long|null} [proposalId] Deposit proposalId + * @property {Uint8Array|null} [depositor] Deposit depositor + * @property {Array.|null} [amount] Deposit amount + */ + + /** + * Constructs a new Deposit. + * @memberof cosmos_sdk.x.gov.v1 + * @classdesc Represents a Deposit. + * @implements IDeposit + * @constructor + * @param {cosmos_sdk.x.gov.v1.IDeposit=} [properties] Properties to set + */ + function Deposit(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deposit proposalId. + * @member {number|Long} proposalId + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @instance + */ + Deposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Deposit depositor. + * @member {Uint8Array} depositor + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @instance + */ + Deposit.prototype.depositor = $util.newBuffer([]); + + /** + * Deposit amount. + * @member {Array.} amount + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @instance + */ + Deposit.prototype.amount = $util.emptyArray; + + /** + * Creates a new Deposit instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @static + * @param {cosmos_sdk.x.gov.v1.IDeposit=} [properties] Properties to set + * @returns {cosmos_sdk.x.gov.v1.Deposit} Deposit instance + */ + Deposit.create = function create(properties) { + return new Deposit(properties); + }; + + /** + * Encodes the specified Deposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @static + * @param {cosmos_sdk.x.gov.v1.IDeposit} message Deposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deposit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.depositor); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @static + * @param {cosmos_sdk.x.gov.v1.IDeposit} message Deposit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deposit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deposit message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.gov.v1.Deposit} Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deposit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.Deposit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.depositor = reader.bytes(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Deposit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.gov.v1.Deposit} Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deposit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deposit message. + * @function verify + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deposit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.depositor != null && message.hasOwnProperty("depositor")) + if (!(message.depositor && typeof message.depositor.length === "number" || $util.isString(message.depositor))) + return "depositor: buffer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + return null; + }; + + /** + * Creates a Deposit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.gov.v1.Deposit} Deposit + */ + Deposit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.gov.v1.Deposit) + return object; + var message = new $root.cosmos_sdk.x.gov.v1.Deposit(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.depositor != null) + if (typeof object.depositor === "string") + $util.base64.decode(object.depositor, message.depositor = $util.newBuffer($util.base64.length(object.depositor)), 0); + else if (object.depositor.length) + message.depositor = object.depositor; + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos_sdk.x.gov.v1.Deposit.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.Deposit.amount: object expected"); + message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Deposit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @static + * @param {cosmos_sdk.x.gov.v1.Deposit} message Deposit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deposit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.depositor = ""; + else { + object.depositor = []; + if (options.bytes !== Array) + object.depositor = $util.newBuffer(object.depositor); + } + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.depositor != null && message.hasOwnProperty("depositor")) + object.depositor = options.bytes === String ? $util.base64.encode(message.depositor, 0, message.depositor.length) : options.bytes === Array ? Array.prototype.slice.call(message.depositor) : message.depositor; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); + } + return object; + }; + + /** + * Converts this Deposit to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.gov.v1.Deposit + * @instance + * @returns {Object.} JSON object + */ + Deposit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Deposit; + })(); + + v1.Proposal = (function() { + + /** + * Properties of a Proposal. + * @memberof cosmos_sdk.x.gov.v1 + * @interface IProposal + * @property {number|Long|null} [proposalId] Proposal proposalId + * @property {google.protobuf.IAny|null} [content] Proposal content + * @property {cosmos_sdk.x.gov.v1.ProposalStatus|null} [status] Proposal status + * @property {cosmos_sdk.x.gov.v1.ITallyResult|null} [finalTallyResult] Proposal finalTallyResult + * @property {google.protobuf.ITimestamp|null} [submitTime] Proposal submitTime + * @property {google.protobuf.ITimestamp|null} [depositEndTime] Proposal depositEndTime + * @property {Array.|null} [totalDeposit] Proposal totalDeposit + * @property {google.protobuf.ITimestamp|null} [votingStartTime] Proposal votingStartTime + * @property {google.protobuf.ITimestamp|null} [votingEndTime] Proposal votingEndTime + */ + + /** + * Constructs a new Proposal. + * @memberof cosmos_sdk.x.gov.v1 + * @classdesc Represents a Proposal. + * @implements IProposal + * @constructor + * @param {cosmos_sdk.x.gov.v1.IProposal=} [properties] Properties to set + */ + function Proposal(properties) { + this.totalDeposit = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proposal proposalId. + * @member {number|Long} proposalId + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + */ + Proposal.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Proposal content. + * @member {google.protobuf.IAny|null|undefined} content + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + */ + Proposal.prototype.content = null; + + /** + * Proposal status. + * @member {cosmos_sdk.x.gov.v1.ProposalStatus} status + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + */ + Proposal.prototype.status = 0; + + /** + * Proposal finalTallyResult. + * @member {cosmos_sdk.x.gov.v1.ITallyResult|null|undefined} finalTallyResult + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + */ + Proposal.prototype.finalTallyResult = null; + + /** + * Proposal submitTime. + * @member {google.protobuf.ITimestamp|null|undefined} submitTime + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + */ + Proposal.prototype.submitTime = null; + + /** + * Proposal depositEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} depositEndTime + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + */ + Proposal.prototype.depositEndTime = null; + + /** + * Proposal totalDeposit. + * @member {Array.} totalDeposit + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + */ + Proposal.prototype.totalDeposit = $util.emptyArray; + + /** + * Proposal votingStartTime. + * @member {google.protobuf.ITimestamp|null|undefined} votingStartTime + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + */ + Proposal.prototype.votingStartTime = null; + + /** + * Proposal votingEndTime. + * @member {google.protobuf.ITimestamp|null|undefined} votingEndTime + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + */ + Proposal.prototype.votingEndTime = null; + + /** + * Creates a new Proposal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @static + * @param {cosmos_sdk.x.gov.v1.IProposal=} [properties] Properties to set + * @returns {cosmos_sdk.x.gov.v1.Proposal} Proposal instance + */ + Proposal.create = function create(properties) { + return new Proposal(properties); + }; + + /** + * Encodes the specified Proposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @static + * @param {cosmos_sdk.x.gov.v1.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); + if (message.finalTallyResult != null && Object.hasOwnProperty.call(message, "finalTallyResult")) + $root.cosmos_sdk.x.gov.v1.TallyResult.encode(message.finalTallyResult, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.submitTime != null && Object.hasOwnProperty.call(message, "submitTime")) + $root.google.protobuf.Timestamp.encode(message.submitTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.depositEndTime != null && Object.hasOwnProperty.call(message, "depositEndTime")) + $root.google.protobuf.Timestamp.encode(message.depositEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.totalDeposit != null && message.totalDeposit.length) + for (var i = 0; i < message.totalDeposit.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.totalDeposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.votingStartTime != null && Object.hasOwnProperty.call(message, "votingStartTime")) + $root.google.protobuf.Timestamp.encode(message.votingStartTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.votingEndTime != null && Object.hasOwnProperty.call(message, "votingEndTime")) + $root.google.protobuf.Timestamp.encode(message.votingEndTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @static + * @param {cosmos_sdk.x.gov.v1.IProposal} message Proposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.gov.v1.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.Proposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + case 3: + message.status = reader.int32(); + break; + case 4: + message.finalTallyResult = $root.cosmos_sdk.x.gov.v1.TallyResult.decode(reader, reader.uint32()); + break; + case 5: + message.submitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 6: + message.depositEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 7: + if (!(message.totalDeposit && message.totalDeposit.length)) + message.totalDeposit = []; + message.totalDeposit.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + case 8: + message.votingStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 9: + message.votingEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.gov.v1.Proposal} Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proposal message. + * @function verify + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.content != null && message.hasOwnProperty("content")) { + var error = $root.google.protobuf.Any.verify(message.content); + if (error) + return "content." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) { + var error = $root.cosmos_sdk.x.gov.v1.TallyResult.verify(message.finalTallyResult); + if (error) + return "finalTallyResult." + error; + } + if (message.submitTime != null && message.hasOwnProperty("submitTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.submitTime); + if (error) + return "submitTime." + error; + } + if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.depositEndTime); + if (error) + return "depositEndTime." + error; + } + if (message.totalDeposit != null && message.hasOwnProperty("totalDeposit")) { + if (!Array.isArray(message.totalDeposit)) + return "totalDeposit: array expected"; + for (var i = 0; i < message.totalDeposit.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.totalDeposit[i]); + if (error) + return "totalDeposit." + error; + } + } + if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.votingStartTime); + if (error) + return "votingStartTime." + error; + } + if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.votingEndTime); + if (error) + return "votingEndTime." + error; + } + return null; + }; + + /** + * Creates a Proposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.gov.v1.Proposal} Proposal + */ + Proposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.gov.v1.Proposal) + return object; + var message = new $root.cosmos_sdk.x.gov.v1.Proposal(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.content != null) { + if (typeof object.content !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.content: object expected"); + message.content = $root.google.protobuf.Any.fromObject(object.content); + } + switch (object.status) { + case "PROPOSAL_STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "PROPOSAL_STATUS_DEPOSIT_PERIOD": + case 1: + message.status = 1; + break; + case "PROPOSAL_STATUS_VOTING_PERIOD": + case 2: + message.status = 2; + break; + case "PROPOSAL_STATUS_PASSED": + case 3: + message.status = 3; + break; + case "PROPOSAL_STATUS_REJECTED": + case 4: + message.status = 4; + break; + case "PROPOSAL_STATUS_FAILED": + case 5: + message.status = 5; + break; + } + if (object.finalTallyResult != null) { + if (typeof object.finalTallyResult !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.finalTallyResult: object expected"); + message.finalTallyResult = $root.cosmos_sdk.x.gov.v1.TallyResult.fromObject(object.finalTallyResult); + } + if (object.submitTime != null) { + if (typeof object.submitTime !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.submitTime: object expected"); + message.submitTime = $root.google.protobuf.Timestamp.fromObject(object.submitTime); + } + if (object.depositEndTime != null) { + if (typeof object.depositEndTime !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.depositEndTime: object expected"); + message.depositEndTime = $root.google.protobuf.Timestamp.fromObject(object.depositEndTime); + } + if (object.totalDeposit) { + if (!Array.isArray(object.totalDeposit)) + throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.totalDeposit: array expected"); + message.totalDeposit = []; + for (var i = 0; i < object.totalDeposit.length; ++i) { + if (typeof object.totalDeposit[i] !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.totalDeposit: object expected"); + message.totalDeposit[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.totalDeposit[i]); + } + } + if (object.votingStartTime != null) { + if (typeof object.votingStartTime !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.votingStartTime: object expected"); + message.votingStartTime = $root.google.protobuf.Timestamp.fromObject(object.votingStartTime); + } + if (object.votingEndTime != null) { + if (typeof object.votingEndTime !== "object") + throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.votingEndTime: object expected"); + message.votingEndTime = $root.google.protobuf.Timestamp.fromObject(object.votingEndTime); + } + return message; + }; + + /** + * Creates a plain object from a Proposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @static + * @param {cosmos_sdk.x.gov.v1.Proposal} message Proposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.totalDeposit = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + object.content = null; + object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; + object.finalTallyResult = null; + object.submitTime = null; + object.depositEndTime = null; + object.votingStartTime = null; + object.votingEndTime = null; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.content != null && message.hasOwnProperty("content")) + object.content = $root.google.protobuf.Any.toObject(message.content, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.cosmos_sdk.x.gov.v1.ProposalStatus[message.status] : message.status; + if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) + object.finalTallyResult = $root.cosmos_sdk.x.gov.v1.TallyResult.toObject(message.finalTallyResult, options); + if (message.submitTime != null && message.hasOwnProperty("submitTime")) + object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options); + if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) + object.depositEndTime = $root.google.protobuf.Timestamp.toObject(message.depositEndTime, options); + if (message.totalDeposit && message.totalDeposit.length) { + object.totalDeposit = []; + for (var j = 0; j < message.totalDeposit.length; ++j) + object.totalDeposit[j] = $root.cosmos_sdk.v1.Coin.toObject(message.totalDeposit[j], options); + } + if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) + object.votingStartTime = $root.google.protobuf.Timestamp.toObject(message.votingStartTime, options); + if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) + object.votingEndTime = $root.google.protobuf.Timestamp.toObject(message.votingEndTime, options); + return object; + }; + + /** + * Converts this Proposal to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.gov.v1.Proposal + * @instance + * @returns {Object.} JSON object + */ + Proposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proposal; + })(); + + /** + * ProposalStatus enum. + * @name cosmos_sdk.x.gov.v1.ProposalStatus + * @enum {number} + * @property {number} PROPOSAL_STATUS_UNSPECIFIED=0 PROPOSAL_STATUS_UNSPECIFIED value + * @property {number} PROPOSAL_STATUS_DEPOSIT_PERIOD=1 PROPOSAL_STATUS_DEPOSIT_PERIOD value + * @property {number} PROPOSAL_STATUS_VOTING_PERIOD=2 PROPOSAL_STATUS_VOTING_PERIOD value + * @property {number} PROPOSAL_STATUS_PASSED=3 PROPOSAL_STATUS_PASSED value + * @property {number} PROPOSAL_STATUS_REJECTED=4 PROPOSAL_STATUS_REJECTED value + * @property {number} PROPOSAL_STATUS_FAILED=5 PROPOSAL_STATUS_FAILED value + */ + v1.ProposalStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROPOSAL_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1; + values[valuesById[2] = "PROPOSAL_STATUS_VOTING_PERIOD"] = 2; + values[valuesById[3] = "PROPOSAL_STATUS_PASSED"] = 3; + values[valuesById[4] = "PROPOSAL_STATUS_REJECTED"] = 4; + values[valuesById[5] = "PROPOSAL_STATUS_FAILED"] = 5; + return values; + })(); + + v1.TallyResult = (function() { + + /** + * Properties of a TallyResult. + * @memberof cosmos_sdk.x.gov.v1 + * @interface ITallyResult + * @property {string|null} [yes] TallyResult yes + * @property {string|null} [abstain] TallyResult abstain + * @property {string|null} [no] TallyResult no + * @property {string|null} [noWithVeto] TallyResult noWithVeto + */ + + /** + * Constructs a new TallyResult. + * @memberof cosmos_sdk.x.gov.v1 + * @classdesc Represents a TallyResult. + * @implements ITallyResult + * @constructor + * @param {cosmos_sdk.x.gov.v1.ITallyResult=} [properties] Properties to set + */ + function TallyResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TallyResult yes. + * @member {string} yes + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @instance + */ + TallyResult.prototype.yes = ""; + + /** + * TallyResult abstain. + * @member {string} abstain + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @instance + */ + TallyResult.prototype.abstain = ""; + + /** + * TallyResult no. + * @member {string} no + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @instance + */ + TallyResult.prototype.no = ""; + + /** + * TallyResult noWithVeto. + * @member {string} noWithVeto + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @instance + */ + TallyResult.prototype.noWithVeto = ""; + + /** + * Creates a new TallyResult instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @static + * @param {cosmos_sdk.x.gov.v1.ITallyResult=} [properties] Properties to set + * @returns {cosmos_sdk.x.gov.v1.TallyResult} TallyResult instance + */ + TallyResult.create = function create(properties) { + return new TallyResult(properties); + }; + + /** + * Encodes the specified TallyResult message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @static + * @param {cosmos_sdk.x.gov.v1.ITallyResult} message TallyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.yes != null && Object.hasOwnProperty.call(message, "yes")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.yes); + if (message.abstain != null && Object.hasOwnProperty.call(message, "abstain")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.abstain); + if (message.no != null && Object.hasOwnProperty.call(message, "no")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.no); + if (message.noWithVeto != null && Object.hasOwnProperty.call(message, "noWithVeto")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.noWithVeto); + return writer; + }; + + /** + * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @static + * @param {cosmos_sdk.x.gov.v1.ITallyResult} message TallyResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TallyResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TallyResult message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.gov.v1.TallyResult} TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyResult.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.TallyResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.yes = reader.string(); + break; + case 2: + message.abstain = reader.string(); + break; + case 3: + message.no = reader.string(); + break; + case 4: + message.noWithVeto = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TallyResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.gov.v1.TallyResult} TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TallyResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TallyResult message. + * @function verify + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TallyResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.yes != null && message.hasOwnProperty("yes")) + if (!$util.isString(message.yes)) + return "yes: string expected"; + if (message.abstain != null && message.hasOwnProperty("abstain")) + if (!$util.isString(message.abstain)) + return "abstain: string expected"; + if (message.no != null && message.hasOwnProperty("no")) + if (!$util.isString(message.no)) + return "no: string expected"; + if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) + if (!$util.isString(message.noWithVeto)) + return "noWithVeto: string expected"; + return null; + }; + + /** + * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.gov.v1.TallyResult} TallyResult + */ + TallyResult.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.gov.v1.TallyResult) + return object; + var message = new $root.cosmos_sdk.x.gov.v1.TallyResult(); + if (object.yes != null) + message.yes = String(object.yes); + if (object.abstain != null) + message.abstain = String(object.abstain); + if (object.no != null) + message.no = String(object.no); + if (object.noWithVeto != null) + message.noWithVeto = String(object.noWithVeto); + return message; + }; + + /** + * Creates a plain object from a TallyResult message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @static + * @param {cosmos_sdk.x.gov.v1.TallyResult} message TallyResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TallyResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.yes = ""; + object.abstain = ""; + object.no = ""; + object.noWithVeto = ""; + } + if (message.yes != null && message.hasOwnProperty("yes")) + object.yes = message.yes; + if (message.abstain != null && message.hasOwnProperty("abstain")) + object.abstain = message.abstain; + if (message.no != null && message.hasOwnProperty("no")) + object.no = message.no; + if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) + object.noWithVeto = message.noWithVeto; + return object; + }; + + /** + * Converts this TallyResult to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.gov.v1.TallyResult + * @instance + * @returns {Object.} JSON object + */ + TallyResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return TallyResult; + })(); + + v1.Vote = (function() { + + /** + * Properties of a Vote. + * @memberof cosmos_sdk.x.gov.v1 + * @interface IVote + * @property {number|Long|null} [proposalId] Vote proposalId + * @property {Uint8Array|null} [voter] Vote voter + * @property {cosmos_sdk.x.gov.v1.VoteOption|null} [option] Vote option + */ + + /** + * Constructs a new Vote. + * @memberof cosmos_sdk.x.gov.v1 + * @classdesc Represents a Vote. + * @implements IVote + * @constructor + * @param {cosmos_sdk.x.gov.v1.IVote=} [properties] Properties to set + */ + function Vote(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Vote proposalId. + * @member {number|Long} proposalId + * @memberof cosmos_sdk.x.gov.v1.Vote + * @instance + */ + Vote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Vote voter. + * @member {Uint8Array} voter + * @memberof cosmos_sdk.x.gov.v1.Vote + * @instance + */ + Vote.prototype.voter = $util.newBuffer([]); + + /** + * Vote option. + * @member {cosmos_sdk.x.gov.v1.VoteOption} option + * @memberof cosmos_sdk.x.gov.v1.Vote + * @instance + */ + Vote.prototype.option = 0; + + /** + * Creates a new Vote instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.gov.v1.Vote + * @static + * @param {cosmos_sdk.x.gov.v1.IVote=} [properties] Properties to set + * @returns {cosmos_sdk.x.gov.v1.Vote} Vote instance + */ + Vote.create = function create(properties) { + return new Vote(properties); + }; + + /** + * Encodes the specified Vote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.gov.v1.Vote + * @static + * @param {cosmos_sdk.x.gov.v1.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); + if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.voter); + if (message.option != null && Object.hasOwnProperty.call(message, "option")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); + return writer; + }; + + /** + * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.gov.v1.Vote + * @static + * @param {cosmos_sdk.x.gov.v1.IVote} message Vote message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Vote.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Vote message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.gov.v1.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.gov.v1.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.Vote(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proposalId = reader.uint64(); + break; + case 2: + message.voter = reader.bytes(); + break; + case 3: + message.option = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Vote message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.gov.v1.Vote + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.gov.v1.Vote} Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Vote.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Vote message. + * @function verify + * @memberof cosmos_sdk.x.gov.v1.Vote + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Vote.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) + return "proposalId: integer|Long expected"; + if (message.voter != null && message.hasOwnProperty("voter")) + if (!(message.voter && typeof message.voter.length === "number" || $util.isString(message.voter))) + return "voter: buffer expected"; + if (message.option != null && message.hasOwnProperty("option")) + switch (message.option) { + default: + return "option: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a Vote message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.gov.v1.Vote + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.gov.v1.Vote} Vote + */ + Vote.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.gov.v1.Vote) + return object; + var message = new $root.cosmos_sdk.x.gov.v1.Vote(); + if (object.proposalId != null) + if ($util.Long) + (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; + else if (typeof object.proposalId === "string") + message.proposalId = parseInt(object.proposalId, 10); + else if (typeof object.proposalId === "number") + message.proposalId = object.proposalId; + else if (typeof object.proposalId === "object") + message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); + if (object.voter != null) + if (typeof object.voter === "string") + $util.base64.decode(object.voter, message.voter = $util.newBuffer($util.base64.length(object.voter)), 0); + else if (object.voter.length) + message.voter = object.voter; + switch (object.option) { + case "VOTE_OPTION_UNSPECIFIED": + case 0: + message.option = 0; + break; + case "VOTE_OPTION_YES": + case 1: + message.option = 1; + break; + case "VOTE_OPTION_ABSTAIN": + case 2: + message.option = 2; + break; + case "VOTE_OPTION_NO": + case 3: + message.option = 3; + break; + case "VOTE_OPTION_NO_WITH_VETO": + case 4: + message.option = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a Vote message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.gov.v1.Vote + * @static + * @param {cosmos_sdk.x.gov.v1.Vote} message Vote + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Vote.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proposalId = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.voter = ""; + else { + object.voter = []; + if (options.bytes !== Array) + object.voter = $util.newBuffer(object.voter); + } + object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; + } + if (message.proposalId != null && message.hasOwnProperty("proposalId")) + if (typeof message.proposalId === "number") + object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; + else + object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; + if (message.voter != null && message.hasOwnProperty("voter")) + object.voter = options.bytes === String ? $util.base64.encode(message.voter, 0, message.voter.length) : options.bytes === Array ? Array.prototype.slice.call(message.voter) : message.voter; + if (message.option != null && message.hasOwnProperty("option")) + object.option = options.enums === String ? $root.cosmos_sdk.x.gov.v1.VoteOption[message.option] : message.option; + return object; + }; + + /** + * Converts this Vote to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.gov.v1.Vote + * @instance + * @returns {Object.} JSON object + */ + Vote.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Vote; + })(); + + return v1; + })(); + + return gov; + })(); + + x.transfer = (function() { + + /** + * Namespace transfer. + * @memberof cosmos_sdk.x + * @namespace + */ + var transfer = {}; + + transfer.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.transfer + * @namespace + */ + var v1 = {}; + + v1.MsgTransfer = (function() { + + /** + * Properties of a MsgTransfer. + * @memberof cosmos_sdk.x.transfer.v1 + * @interface IMsgTransfer + * @property {string|null} [sourcePort] MsgTransfer sourcePort + * @property {string|null} [sourceChannel] MsgTransfer sourceChannel + * @property {Array.|null} [amount] MsgTransfer amount + * @property {Uint8Array|null} [sender] MsgTransfer sender + * @property {string|null} [receiver] MsgTransfer receiver + * @property {number|Long|null} [timeoutHeight] MsgTransfer timeoutHeight + * @property {number|Long|null} [timeoutTimestamp] MsgTransfer timeoutTimestamp + */ + + /** + * Constructs a new MsgTransfer. + * @memberof cosmos_sdk.x.transfer.v1 + * @classdesc Represents a MsgTransfer. + * @implements IMsgTransfer + * @constructor + * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer=} [properties] Properties to set + */ + function MsgTransfer(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgTransfer sourcePort. + * @member {string} sourcePort + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sourcePort = ""; + + /** + * MsgTransfer sourceChannel. + * @member {string} sourceChannel + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sourceChannel = ""; + + /** + * MsgTransfer amount. + * @member {Array.} amount + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.amount = $util.emptyArray; + + /** + * MsgTransfer sender. + * @member {Uint8Array} sender + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.sender = $util.newBuffer([]); + + /** + * MsgTransfer receiver. + * @member {string} receiver + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.receiver = ""; + + /** + * MsgTransfer timeoutHeight. + * @member {number|Long} timeoutHeight + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgTransfer timeoutTimestamp. + * @member {number|Long} timeoutTimestamp + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @instance + */ + MsgTransfer.prototype.timeoutTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new MsgTransfer instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @static + * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer=} [properties] Properties to set + * @returns {cosmos_sdk.x.transfer.v1.MsgTransfer} MsgTransfer instance + */ + MsgTransfer.create = function create(properties) { + return new MsgTransfer(properties); + }; + + /** + * Encodes the specified MsgTransfer message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @static + * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransfer.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourcePort); + if (message.sourceChannel != null && Object.hasOwnProperty.call(message, "sourceChannel")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceChannel); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.sender); + if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.receiver); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.timeoutHeight); + if (message.timeoutTimestamp != null && Object.hasOwnProperty.call(message, "timeoutTimestamp")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeoutTimestamp); + return writer; + }; + + /** + * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @static + * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTransfer.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.transfer.v1.MsgTransfer} MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransfer.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.transfer.v1.MsgTransfer(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sourcePort = reader.string(); + break; + case 2: + message.sourceChannel = reader.string(); + break; + case 3: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + case 4: + message.sender = reader.bytes(); + break; + case 5: + message.receiver = reader.string(); + break; + case 6: + message.timeoutHeight = reader.uint64(); + break; + case 7: + message.timeoutTimestamp = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.transfer.v1.MsgTransfer} MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTransfer.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTransfer message. + * @function verify + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTransfer.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isString(message.sourcePort)) + return "sourcePort: string expected"; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + if (!$util.isString(message.sourceChannel)) + return "sourceChannel: string expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.sender != null && message.hasOwnProperty("sender")) + if (!(message.sender && typeof message.sender.length === "number" || $util.isString(message.sender))) + return "sender: buffer expected"; + if (message.receiver != null && message.hasOwnProperty("receiver")) + if (!$util.isString(message.receiver)) + return "receiver: string expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (!$util.isInteger(message.timeoutHeight) && !(message.timeoutHeight && $util.isInteger(message.timeoutHeight.low) && $util.isInteger(message.timeoutHeight.high))) + return "timeoutHeight: integer|Long expected"; + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (!$util.isInteger(message.timeoutTimestamp) && !(message.timeoutTimestamp && $util.isInteger(message.timeoutTimestamp.low) && $util.isInteger(message.timeoutTimestamp.high))) + return "timeoutTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.transfer.v1.MsgTransfer} MsgTransfer + */ + MsgTransfer.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.transfer.v1.MsgTransfer) + return object; + var message = new $root.cosmos_sdk.x.transfer.v1.MsgTransfer(); + if (object.sourcePort != null) + message.sourcePort = String(object.sourcePort); + if (object.sourceChannel != null) + message.sourceChannel = String(object.sourceChannel); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos_sdk.x.transfer.v1.MsgTransfer.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos_sdk.x.transfer.v1.MsgTransfer.amount: object expected"); + message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); + } + } + if (object.sender != null) + if (typeof object.sender === "string") + $util.base64.decode(object.sender, message.sender = $util.newBuffer($util.base64.length(object.sender)), 0); + else if (object.sender.length) + message.sender = object.sender; + if (object.receiver != null) + message.receiver = String(object.receiver); + if (object.timeoutHeight != null) + if ($util.Long) + (message.timeoutHeight = $util.Long.fromValue(object.timeoutHeight)).unsigned = true; + else if (typeof object.timeoutHeight === "string") + message.timeoutHeight = parseInt(object.timeoutHeight, 10); + else if (typeof object.timeoutHeight === "number") + message.timeoutHeight = object.timeoutHeight; + else if (typeof object.timeoutHeight === "object") + message.timeoutHeight = new $util.LongBits(object.timeoutHeight.low >>> 0, object.timeoutHeight.high >>> 0).toNumber(true); + if (object.timeoutTimestamp != null) + if ($util.Long) + (message.timeoutTimestamp = $util.Long.fromValue(object.timeoutTimestamp)).unsigned = true; + else if (typeof object.timeoutTimestamp === "string") + message.timeoutTimestamp = parseInt(object.timeoutTimestamp, 10); + else if (typeof object.timeoutTimestamp === "number") + message.timeoutTimestamp = object.timeoutTimestamp; + else if (typeof object.timeoutTimestamp === "object") + message.timeoutTimestamp = new $util.LongBits(object.timeoutTimestamp.low >>> 0, object.timeoutTimestamp.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @static + * @param {cosmos_sdk.x.transfer.v1.MsgTransfer} message MsgTransfer + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTransfer.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.sourcePort = ""; + object.sourceChannel = ""; + if (options.bytes === String) + object.sender = ""; + else { + object.sender = []; + if (options.bytes !== Array) + object.sender = $util.newBuffer(object.sender); + } + object.receiver = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeoutHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeoutTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutTimestamp = options.longs === String ? "0" : 0; + } + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + object.sourceChannel = message.sourceChannel; + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); + } + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = options.bytes === String ? $util.base64.encode(message.sender, 0, message.sender.length) : options.bytes === Array ? Array.prototype.slice.call(message.sender) : message.sender; + if (message.receiver != null && message.hasOwnProperty("receiver")) + object.receiver = message.receiver; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (typeof message.timeoutHeight === "number") + object.timeoutHeight = options.longs === String ? String(message.timeoutHeight) : message.timeoutHeight; + else + object.timeoutHeight = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutHeight) : options.longs === Number ? new $util.LongBits(message.timeoutHeight.low >>> 0, message.timeoutHeight.high >>> 0).toNumber(true) : message.timeoutHeight; + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (typeof message.timeoutTimestamp === "number") + object.timeoutTimestamp = options.longs === String ? String(message.timeoutTimestamp) : message.timeoutTimestamp; + else + object.timeoutTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutTimestamp) : options.longs === Number ? new $util.LongBits(message.timeoutTimestamp.low >>> 0, message.timeoutTimestamp.high >>> 0).toNumber(true) : message.timeoutTimestamp; + return object; + }; + + /** + * Converts this MsgTransfer to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer + * @instance + * @returns {Object.} JSON object + */ + MsgTransfer.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTransfer; + })(); + + v1.FungibleTokenPacketData = (function() { + + /** + * Properties of a FungibleTokenPacketData. + * @memberof cosmos_sdk.x.transfer.v1 + * @interface IFungibleTokenPacketData + * @property {Array.|null} [amount] FungibleTokenPacketData amount + * @property {string|null} [sender] FungibleTokenPacketData sender + * @property {string|null} [receiver] FungibleTokenPacketData receiver + */ + + /** + * Constructs a new FungibleTokenPacketData. + * @memberof cosmos_sdk.x.transfer.v1 + * @classdesc Represents a FungibleTokenPacketData. + * @implements IFungibleTokenPacketData + * @constructor + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData=} [properties] Properties to set + */ + function FungibleTokenPacketData(properties) { + this.amount = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FungibleTokenPacketData amount. + * @member {Array.} amount + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @instance + */ + FungibleTokenPacketData.prototype.amount = $util.emptyArray; + + /** + * FungibleTokenPacketData sender. + * @member {string} sender + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @instance + */ + FungibleTokenPacketData.prototype.sender = ""; + + /** + * FungibleTokenPacketData receiver. + * @member {string} receiver + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @instance + */ + FungibleTokenPacketData.prototype.receiver = ""; + + /** + * Creates a new FungibleTokenPacketData instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @static + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData=} [properties] Properties to set + * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData instance + */ + FungibleTokenPacketData.create = function create(properties) { + return new FungibleTokenPacketData(properties); + }; + + /** + * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @static + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData} message FungibleTokenPacketData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FungibleTokenPacketData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amount != null && message.amount.length) + for (var i = 0; i < message.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sender); + if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.receiver); + return writer; + }; + + /** + * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @static + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData} message FungibleTokenPacketData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FungibleTokenPacketData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FungibleTokenPacketData message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FungibleTokenPacketData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.amount && message.amount.length)) + message.amount = []; + message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + break; + case 2: + message.sender = reader.string(); + break; + case 3: + message.receiver = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FungibleTokenPacketData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FungibleTokenPacketData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FungibleTokenPacketData message. + * @function verify + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FungibleTokenPacketData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + if (!Array.isArray(message.amount)) + return "amount: array expected"; + for (var i = 0; i < message.amount.length; ++i) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); + if (error) + return "amount." + error; + } + } + if (message.sender != null && message.hasOwnProperty("sender")) + if (!$util.isString(message.sender)) + return "sender: string expected"; + if (message.receiver != null && message.hasOwnProperty("receiver")) + if (!$util.isString(message.receiver)) + return "receiver: string expected"; + return null; + }; + + /** + * Creates a FungibleTokenPacketData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData + */ + FungibleTokenPacketData.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketData) + return object; + var message = new $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketData(); + if (object.amount) { + if (!Array.isArray(object.amount)) + throw TypeError(".cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.amount: array expected"); + message.amount = []; + for (var i = 0; i < object.amount.length; ++i) { + if (typeof object.amount[i] !== "object") + throw TypeError(".cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.amount: object expected"); + message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); + } + } + if (object.sender != null) + message.sender = String(object.sender); + if (object.receiver != null) + message.receiver = String(object.receiver); + return message; + }; + + /** + * Creates a plain object from a FungibleTokenPacketData message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @static + * @param {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} message FungibleTokenPacketData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FungibleTokenPacketData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.amount = []; + if (options.defaults) { + object.sender = ""; + object.receiver = ""; + } + if (message.amount && message.amount.length) { + object.amount = []; + for (var j = 0; j < message.amount.length; ++j) + object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); + } + if (message.sender != null && message.hasOwnProperty("sender")) + object.sender = message.sender; + if (message.receiver != null && message.hasOwnProperty("receiver")) + object.receiver = message.receiver; + return object; + }; + + /** + * Converts this FungibleTokenPacketData to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData + * @instance + * @returns {Object.} JSON object + */ + FungibleTokenPacketData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FungibleTokenPacketData; + })(); + + v1.FungibleTokenPacketAcknowledgement = (function() { + + /** + * Properties of a FungibleTokenPacketAcknowledgement. + * @memberof cosmos_sdk.x.transfer.v1 + * @interface IFungibleTokenPacketAcknowledgement + * @property {boolean|null} [success] FungibleTokenPacketAcknowledgement success + * @property {string|null} [error] FungibleTokenPacketAcknowledgement error + */ + + /** + * Constructs a new FungibleTokenPacketAcknowledgement. + * @memberof cosmos_sdk.x.transfer.v1 + * @classdesc Represents a FungibleTokenPacketAcknowledgement. + * @implements IFungibleTokenPacketAcknowledgement + * @constructor + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement=} [properties] Properties to set + */ + function FungibleTokenPacketAcknowledgement(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FungibleTokenPacketAcknowledgement success. + * @member {boolean} success + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @instance + */ + FungibleTokenPacketAcknowledgement.prototype.success = false; + + /** + * FungibleTokenPacketAcknowledgement error. + * @member {string} error + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @instance + */ + FungibleTokenPacketAcknowledgement.prototype.error = ""; + + /** + * Creates a new FungibleTokenPacketAcknowledgement instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @static + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement=} [properties] Properties to set + * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} FungibleTokenPacketAcknowledgement instance + */ + FungibleTokenPacketAcknowledgement.create = function create(properties) { + return new FungibleTokenPacketAcknowledgement(properties); + }; + + /** + * Encodes the specified FungibleTokenPacketAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @static + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement} message FungibleTokenPacketAcknowledgement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FungibleTokenPacketAcknowledgement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.success != null && Object.hasOwnProperty.call(message, "success")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.error); + return writer; + }; + + /** + * Encodes the specified FungibleTokenPacketAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @static + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement} message FungibleTokenPacketAcknowledgement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FungibleTokenPacketAcknowledgement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} FungibleTokenPacketAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FungibleTokenPacketAcknowledgement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.success = reader.bool(); + break; + case 2: + message.error = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} FungibleTokenPacketAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FungibleTokenPacketAcknowledgement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FungibleTokenPacketAcknowledgement message. + * @function verify + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FungibleTokenPacketAcknowledgement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.success != null && message.hasOwnProperty("success")) + if (typeof message.success !== "boolean") + return "success: boolean expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + return null; + }; + + /** + * Creates a FungibleTokenPacketAcknowledgement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} FungibleTokenPacketAcknowledgement + */ + FungibleTokenPacketAcknowledgement.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement) + return object; + var message = new $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement(); + if (object.success != null) + message.success = Boolean(object.success); + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from a FungibleTokenPacketAcknowledgement message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @static + * @param {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} message FungibleTokenPacketAcknowledgement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FungibleTokenPacketAcknowledgement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.success = false; + object.error = ""; + } + if (message.success != null && message.hasOwnProperty("success")) + object.success = message.success; + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + return object; + }; + + /** + * Converts this FungibleTokenPacketAcknowledgement to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement + * @instance + * @returns {Object.} JSON object + */ + FungibleTokenPacketAcknowledgement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FungibleTokenPacketAcknowledgement; + })(); + + return v1; + })(); + + return transfer; + })(); + + x.ibc = (function() { + + /** + * Namespace ibc. + * @memberof cosmos_sdk.x + * @namespace + */ + var ibc = {}; + + ibc.connection = (function() { + + /** + * Namespace connection. + * @memberof cosmos_sdk.x.ibc + * @namespace + */ + var connection = {}; + + connection.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.ibc.connection + * @namespace + */ + var v1 = {}; + + v1.MsgConnectionOpenInit = (function() { + + /** + * Properties of a MsgConnectionOpenInit. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @interface IMsgConnectionOpenInit + * @property {string|null} [clientId] MsgConnectionOpenInit clientId + * @property {string|null} [connectionId] MsgConnectionOpenInit connectionId + * @property {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenInit counterparty + * @property {Uint8Array|null} [signer] MsgConnectionOpenInit signer + */ + + /** + * Constructs a new MsgConnectionOpenInit. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @classdesc Represents a MsgConnectionOpenInit. + * @implements IMsgConnectionOpenInit + * @constructor + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit=} [properties] Properties to set + */ + function MsgConnectionOpenInit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgConnectionOpenInit clientId. + * @member {string} clientId + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @instance + */ + MsgConnectionOpenInit.prototype.clientId = ""; + + /** + * MsgConnectionOpenInit connectionId. + * @member {string} connectionId + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @instance + */ + MsgConnectionOpenInit.prototype.connectionId = ""; + + /** + * MsgConnectionOpenInit counterparty. + * @member {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null|undefined} counterparty + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @instance + */ + MsgConnectionOpenInit.prototype.counterparty = null; + + /** + * MsgConnectionOpenInit signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @instance + */ + MsgConnectionOpenInit.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgConnectionOpenInit instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit instance + */ + MsgConnectionOpenInit.create = function create(properties) { + return new MsgConnectionOpenInit(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit} message MsgConnectionOpenInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenInit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionId); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit} message MsgConnectionOpenInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenInit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenInit message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenInit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.connectionId = reader.string(); + break; + case 3: + message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(reader, reader.uint32()); + break; + case 4: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenInit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenInit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenInit message. + * @function verify + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenInit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + var error = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenInit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit + */ + MsgConnectionOpenInit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit) + return object; + var message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.counterparty: object expected"); + message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.fromObject(object.counterparty); + } + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgConnectionOpenInit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} message MsgConnectionOpenInit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenInit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + object.connectionId = ""; + object.counterparty = null; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.toObject(message.counterparty, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgConnectionOpenInit to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenInit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenInit; + })(); + + v1.MsgConnectionOpenTry = (function() { + + /** + * Properties of a MsgConnectionOpenTry. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @interface IMsgConnectionOpenTry + * @property {string|null} [clientId] MsgConnectionOpenTry clientId + * @property {string|null} [connectionId] MsgConnectionOpenTry connectionId + * @property {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenTry counterparty + * @property {Array.|null} [counterpartyVersions] MsgConnectionOpenTry counterpartyVersions + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofInit] MsgConnectionOpenTry proofInit + * @property {number|Long|null} [proofHeight] MsgConnectionOpenTry proofHeight + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofConsensus] MsgConnectionOpenTry proofConsensus + * @property {number|Long|null} [consensusHeight] MsgConnectionOpenTry consensusHeight + * @property {Uint8Array|null} [signer] MsgConnectionOpenTry signer + */ + + /** + * Constructs a new MsgConnectionOpenTry. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @classdesc Represents a MsgConnectionOpenTry. + * @implements IMsgConnectionOpenTry + * @constructor + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry=} [properties] Properties to set + */ + function MsgConnectionOpenTry(properties) { + this.counterpartyVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgConnectionOpenTry clientId. + * @member {string} clientId + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.clientId = ""; + + /** + * MsgConnectionOpenTry connectionId. + * @member {string} connectionId + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.connectionId = ""; + + /** + * MsgConnectionOpenTry counterparty. + * @member {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null|undefined} counterparty + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.counterparty = null; + + /** + * MsgConnectionOpenTry counterpartyVersions. + * @member {Array.} counterpartyVersions + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.counterpartyVersions = $util.emptyArray; + + /** + * MsgConnectionOpenTry proofInit. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofInit + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.proofInit = null; + + /** + * MsgConnectionOpenTry proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgConnectionOpenTry proofConsensus. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofConsensus + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.proofConsensus = null; + + /** + * MsgConnectionOpenTry consensusHeight. + * @member {number|Long} consensusHeight + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.consensusHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgConnectionOpenTry signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + */ + MsgConnectionOpenTry.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgConnectionOpenTry instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry instance + */ + MsgConnectionOpenTry.create = function create(properties) { + return new MsgConnectionOpenTry(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry} message MsgConnectionOpenTry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenTry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionId); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.counterpartyVersions != null && message.counterpartyVersions.length) + for (var i = 0; i < message.counterpartyVersions.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterpartyVersions[i]); + if (message.proofInit != null && Object.hasOwnProperty.call(message, "proofInit")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofInit, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.proofHeight); + if (message.proofConsensus != null && Object.hasOwnProperty.call(message, "proofConsensus")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofConsensus, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.consensusHeight != null && Object.hasOwnProperty.call(message, "consensusHeight")) + writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.consensusHeight); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry} message MsgConnectionOpenTry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenTry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenTry message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenTry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.connectionId = reader.string(); + break; + case 3: + message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.counterpartyVersions && message.counterpartyVersions.length)) + message.counterpartyVersions = []; + message.counterpartyVersions.push(reader.string()); + break; + case 5: + message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 6: + message.proofHeight = reader.uint64(); + break; + case 7: + message.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 8: + message.consensusHeight = reader.uint64(); + break; + case 9: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenTry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenTry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenTry message. + * @function verify + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenTry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + var error = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + if (message.counterpartyVersions != null && message.hasOwnProperty("counterpartyVersions")) { + if (!Array.isArray(message.counterpartyVersions)) + return "counterpartyVersions: array expected"; + for (var i = 0; i < message.counterpartyVersions.length; ++i) + if (!$util.isString(message.counterpartyVersions[i])) + return "counterpartyVersions: string[] expected"; + } + if (message.proofInit != null && message.hasOwnProperty("proofInit")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofInit); + if (error) + return "proofInit." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofConsensus); + if (error) + return "proofConsensus." + error; + } + if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) + if (!$util.isInteger(message.consensusHeight) && !(message.consensusHeight && $util.isInteger(message.consensusHeight.low) && $util.isInteger(message.consensusHeight.high))) + return "consensusHeight: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenTry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry + */ + MsgConnectionOpenTry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry) + return object; + var message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.counterparty: object expected"); + message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.fromObject(object.counterparty); + } + if (object.counterpartyVersions) { + if (!Array.isArray(object.counterpartyVersions)) + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.counterpartyVersions: array expected"); + message.counterpartyVersions = []; + for (var i = 0; i < object.counterpartyVersions.length; ++i) + message.counterpartyVersions[i] = String(object.counterpartyVersions[i]); + } + if (object.proofInit != null) { + if (typeof object.proofInit !== "object") + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.proofInit: object expected"); + message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofInit); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.proofConsensus != null) { + if (typeof object.proofConsensus !== "object") + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.proofConsensus: object expected"); + message.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofConsensus); + } + if (object.consensusHeight != null) + if ($util.Long) + (message.consensusHeight = $util.Long.fromValue(object.consensusHeight)).unsigned = true; + else if (typeof object.consensusHeight === "string") + message.consensusHeight = parseInt(object.consensusHeight, 10); + else if (typeof object.consensusHeight === "number") + message.consensusHeight = object.consensusHeight; + else if (typeof object.consensusHeight === "object") + message.consensusHeight = new $util.LongBits(object.consensusHeight.low >>> 0, object.consensusHeight.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgConnectionOpenTry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} message MsgConnectionOpenTry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenTry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.counterpartyVersions = []; + if (options.defaults) { + object.clientId = ""; + object.connectionId = ""; + object.counterparty = null; + object.proofInit = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + object.proofConsensus = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.consensusHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.consensusHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.toObject(message.counterparty, options); + if (message.counterpartyVersions && message.counterpartyVersions.length) { + object.counterpartyVersions = []; + for (var j = 0; j < message.counterpartyVersions.length; ++j) + object.counterpartyVersions[j] = message.counterpartyVersions[j]; + } + if (message.proofInit != null && message.hasOwnProperty("proofInit")) + object.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofInit, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) + object.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofConsensus, options); + if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) + if (typeof message.consensusHeight === "number") + object.consensusHeight = options.longs === String ? String(message.consensusHeight) : message.consensusHeight; + else + object.consensusHeight = options.longs === String ? $util.Long.prototype.toString.call(message.consensusHeight) : options.longs === Number ? new $util.LongBits(message.consensusHeight.low >>> 0, message.consensusHeight.high >>> 0).toNumber(true) : message.consensusHeight; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgConnectionOpenTry to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenTry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenTry; + })(); + + v1.MsgConnectionOpenAck = (function() { + + /** + * Properties of a MsgConnectionOpenAck. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @interface IMsgConnectionOpenAck + * @property {string|null} [connectionId] MsgConnectionOpenAck connectionId + * @property {string|null} [version] MsgConnectionOpenAck version + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofTry] MsgConnectionOpenAck proofTry + * @property {number|Long|null} [proofHeight] MsgConnectionOpenAck proofHeight + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofConsensus] MsgConnectionOpenAck proofConsensus + * @property {number|Long|null} [consensusHeight] MsgConnectionOpenAck consensusHeight + * @property {Uint8Array|null} [signer] MsgConnectionOpenAck signer + */ + + /** + * Constructs a new MsgConnectionOpenAck. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @classdesc Represents a MsgConnectionOpenAck. + * @implements IMsgConnectionOpenAck + * @constructor + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck=} [properties] Properties to set + */ + function MsgConnectionOpenAck(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgConnectionOpenAck connectionId. + * @member {string} connectionId + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.connectionId = ""; + + /** + * MsgConnectionOpenAck version. + * @member {string} version + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.version = ""; + + /** + * MsgConnectionOpenAck proofTry. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofTry + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.proofTry = null; + + /** + * MsgConnectionOpenAck proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgConnectionOpenAck proofConsensus. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofConsensus + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.proofConsensus = null; + + /** + * MsgConnectionOpenAck consensusHeight. + * @member {number|Long} consensusHeight + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.consensusHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgConnectionOpenAck signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @instance + */ + MsgConnectionOpenAck.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgConnectionOpenAck instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck instance + */ + MsgConnectionOpenAck.create = function create(properties) { + return new MsgConnectionOpenAck(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck} message MsgConnectionOpenAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenAck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionId); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.proofTry != null && Object.hasOwnProperty.call(message, "proofTry")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofTry, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.proofHeight); + if (message.proofConsensus != null && Object.hasOwnProperty.call(message, "proofConsensus")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofConsensus, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.consensusHeight != null && Object.hasOwnProperty.call(message, "consensusHeight")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.consensusHeight); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck} message MsgConnectionOpenAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenAck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenAck message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenAck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connectionId = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 4: + message.proofHeight = reader.uint64(); + break; + case 5: + message.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 6: + message.consensusHeight = reader.uint64(); + break; + case 7: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenAck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenAck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenAck message. + * @function verify + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenAck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.proofTry != null && message.hasOwnProperty("proofTry")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofTry); + if (error) + return "proofTry." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofConsensus); + if (error) + return "proofConsensus." + error; + } + if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) + if (!$util.isInteger(message.consensusHeight) && !(message.consensusHeight && $util.isInteger(message.consensusHeight.low) && $util.isInteger(message.consensusHeight.high))) + return "consensusHeight: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenAck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck + */ + MsgConnectionOpenAck.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck) + return object; + var message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck(); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + if (object.version != null) + message.version = String(object.version); + if (object.proofTry != null) { + if (typeof object.proofTry !== "object") + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.proofTry: object expected"); + message.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofTry); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.proofConsensus != null) { + if (typeof object.proofConsensus !== "object") + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.proofConsensus: object expected"); + message.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofConsensus); + } + if (object.consensusHeight != null) + if ($util.Long) + (message.consensusHeight = $util.Long.fromValue(object.consensusHeight)).unsigned = true; + else if (typeof object.consensusHeight === "string") + message.consensusHeight = parseInt(object.consensusHeight, 10); + else if (typeof object.consensusHeight === "number") + message.consensusHeight = object.consensusHeight; + else if (typeof object.consensusHeight === "object") + message.consensusHeight = new $util.LongBits(object.consensusHeight.low >>> 0, object.consensusHeight.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgConnectionOpenAck message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} message MsgConnectionOpenAck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenAck.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.connectionId = ""; + object.version = ""; + object.proofTry = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + object.proofConsensus = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.consensusHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.consensusHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.proofTry != null && message.hasOwnProperty("proofTry")) + object.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofTry, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) + object.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofConsensus, options); + if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) + if (typeof message.consensusHeight === "number") + object.consensusHeight = options.longs === String ? String(message.consensusHeight) : message.consensusHeight; + else + object.consensusHeight = options.longs === String ? $util.Long.prototype.toString.call(message.consensusHeight) : options.longs === Number ? new $util.LongBits(message.consensusHeight.low >>> 0, message.consensusHeight.high >>> 0).toNumber(true) : message.consensusHeight; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgConnectionOpenAck to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenAck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenAck; + })(); + + v1.MsgConnectionOpenConfirm = (function() { + + /** + * Properties of a MsgConnectionOpenConfirm. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @interface IMsgConnectionOpenConfirm + * @property {string|null} [connectionId] MsgConnectionOpenConfirm connectionId + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofAck] MsgConnectionOpenConfirm proofAck + * @property {number|Long|null} [proofHeight] MsgConnectionOpenConfirm proofHeight + * @property {Uint8Array|null} [signer] MsgConnectionOpenConfirm signer + */ + + /** + * Constructs a new MsgConnectionOpenConfirm. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @classdesc Represents a MsgConnectionOpenConfirm. + * @implements IMsgConnectionOpenConfirm + * @constructor + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm=} [properties] Properties to set + */ + function MsgConnectionOpenConfirm(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgConnectionOpenConfirm connectionId. + * @member {string} connectionId + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @instance + */ + MsgConnectionOpenConfirm.prototype.connectionId = ""; + + /** + * MsgConnectionOpenConfirm proofAck. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofAck + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @instance + */ + MsgConnectionOpenConfirm.prototype.proofAck = null; + + /** + * MsgConnectionOpenConfirm proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @instance + */ + MsgConnectionOpenConfirm.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgConnectionOpenConfirm signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @instance + */ + MsgConnectionOpenConfirm.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgConnectionOpenConfirm instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm instance + */ + MsgConnectionOpenConfirm.create = function create(properties) { + return new MsgConnectionOpenConfirm(properties); + }; + + /** + * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm} message MsgConnectionOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenConfirm.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionId); + if (message.proofAck != null && Object.hasOwnProperty.call(message, "proofAck")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofAck, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.proofHeight); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm} message MsgConnectionOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgConnectionOpenConfirm.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenConfirm.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.connectionId = reader.string(); + break; + case 2: + message.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 3: + message.proofHeight = reader.uint64(); + break; + case 4: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgConnectionOpenConfirm.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgConnectionOpenConfirm message. + * @function verify + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgConnectionOpenConfirm.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + if (message.proofAck != null && message.hasOwnProperty("proofAck")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofAck); + if (error) + return "proofAck." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgConnectionOpenConfirm message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm + */ + MsgConnectionOpenConfirm.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm) + return object; + var message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm(); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + if (object.proofAck != null) { + if (typeof object.proofAck !== "object") + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.proofAck: object expected"); + message.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofAck); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgConnectionOpenConfirm message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} message MsgConnectionOpenConfirm + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgConnectionOpenConfirm.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.connectionId = ""; + object.proofAck = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + if (message.proofAck != null && message.hasOwnProperty("proofAck")) + object.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofAck, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgConnectionOpenConfirm to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm + * @instance + * @returns {Object.} JSON object + */ + MsgConnectionOpenConfirm.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgConnectionOpenConfirm; + })(); + + v1.ConnectionEnd = (function() { + + /** + * Properties of a ConnectionEnd. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @interface IConnectionEnd + * @property {string|null} [id] ConnectionEnd id + * @property {string|null} [clientId] ConnectionEnd clientId + * @property {Array.|null} [versions] ConnectionEnd versions + * @property {cosmos_sdk.x.ibc.connection.v1.State|null} [state] ConnectionEnd state + * @property {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null} [counterparty] ConnectionEnd counterparty + */ + + /** + * Constructs a new ConnectionEnd. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @classdesc Represents a ConnectionEnd. + * @implements IConnectionEnd + * @constructor + * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd=} [properties] Properties to set + */ + function ConnectionEnd(properties) { + this.versions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConnectionEnd id. + * @member {string} id + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.id = ""; + + /** + * ConnectionEnd clientId. + * @member {string} clientId + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.clientId = ""; + + /** + * ConnectionEnd versions. + * @member {Array.} versions + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.versions = $util.emptyArray; + + /** + * ConnectionEnd state. + * @member {cosmos_sdk.x.ibc.connection.v1.State} state + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.state = 0; + + /** + * ConnectionEnd counterparty. + * @member {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null|undefined} counterparty + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @instance + */ + ConnectionEnd.prototype.counterparty = null; + + /** + * Creates a new ConnectionEnd instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} ConnectionEnd instance + */ + ConnectionEnd.create = function create(properties) { + return new ConnectionEnd(properties); + }; + + /** + * Encodes the specified ConnectionEnd message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd} message ConnectionEnd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectionEnd.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientId); + if (message.versions != null && message.versions.length) + for (var i = 0; i < message.versions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.versions[i]); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd} message ConnectionEnd message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectionEnd.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectionEnd message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} ConnectionEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectionEnd.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.ConnectionEnd(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.id = reader.string(); + break; + case 2: + message.clientId = reader.string(); + break; + case 3: + if (!(message.versions && message.versions.length)) + message.versions = []; + message.versions.push(reader.string()); + break; + case 4: + message.state = reader.int32(); + break; + case 5: + message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectionEnd message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} ConnectionEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectionEnd.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectionEnd message. + * @function verify + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectionEnd.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.versions != null && message.hasOwnProperty("versions")) { + if (!Array.isArray(message.versions)) + return "versions: array expected"; + for (var i = 0; i < message.versions.length; ++i) + if (!$util.isString(message.versions[i])) + return "versions: string[] expected"; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + var error = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + return null; + }; + + /** + * Creates a ConnectionEnd message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} ConnectionEnd + */ + ConnectionEnd.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.ConnectionEnd) + return object; + var message = new $root.cosmos_sdk.x.ibc.connection.v1.ConnectionEnd(); + if (object.id != null) + message.id = String(object.id); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.versions: array expected"); + message.versions = []; + for (var i = 0; i < object.versions.length; ++i) + message.versions[i] = String(object.versions[i]); + } + switch (object.state) { + case "STATE_UNINITIALIZED_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STATE_INIT": + case 1: + message.state = 1; + break; + case "STATE_TRYOPEN": + case 2: + message.state = 2; + break; + case "STATE_OPEN": + case 3: + message.state = 3; + break; + } + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.counterparty: object expected"); + message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.fromObject(object.counterparty); + } + return message; + }; + + /** + * Creates a plain object from a ConnectionEnd message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} message ConnectionEnd + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectionEnd.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.versions = []; + if (options.defaults) { + object.id = ""; + object.clientId = ""; + object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; + object.counterparty = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.versions && message.versions.length) { + object.versions = []; + for (var j = 0; j < message.versions.length; ++j) + object.versions[j] = message.versions[j]; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.cosmos_sdk.x.ibc.connection.v1.State[message.state] : message.state; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.toObject(message.counterparty, options); + return object; + }; + + /** + * Converts this ConnectionEnd to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd + * @instance + * @returns {Object.} JSON object + */ + ConnectionEnd.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConnectionEnd; + })(); + + /** + * State enum. + * @name cosmos_sdk.x.ibc.connection.v1.State + * @enum {number} + * @property {number} STATE_UNINITIALIZED_UNSPECIFIED=0 STATE_UNINITIALIZED_UNSPECIFIED value + * @property {number} STATE_INIT=1 STATE_INIT value + * @property {number} STATE_TRYOPEN=2 STATE_TRYOPEN value + * @property {number} STATE_OPEN=3 STATE_OPEN value + */ + v1.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNINITIALIZED_UNSPECIFIED"] = 0; + values[valuesById[1] = "STATE_INIT"] = 1; + values[valuesById[2] = "STATE_TRYOPEN"] = 2; + values[valuesById[3] = "STATE_OPEN"] = 3; + return values; + })(); + + v1.Counterparty = (function() { + + /** + * Properties of a Counterparty. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @interface ICounterparty + * @property {string|null} [clientId] Counterparty clientId + * @property {string|null} [connectionId] Counterparty connectionId + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix|null} [prefix] Counterparty prefix + */ + + /** + * Constructs a new Counterparty. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @classdesc Represents a Counterparty. + * @implements ICounterparty + * @constructor + * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty=} [properties] Properties to set + */ + function Counterparty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Counterparty clientId. + * @member {string} clientId + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @instance + */ + Counterparty.prototype.clientId = ""; + + /** + * Counterparty connectionId. + * @member {string} connectionId + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @instance + */ + Counterparty.prototype.connectionId = ""; + + /** + * Counterparty prefix. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix|null|undefined} prefix + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @instance + */ + Counterparty.prototype.prefix = null; + + /** + * Creates a new Counterparty instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.connection.v1.Counterparty} Counterparty instance + */ + Counterparty.create = function create(properties) { + return new Counterparty(properties); + }; + + /** + * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty} message Counterparty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Counterparty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); + if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionId); + if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.encode(message.prefix, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty} message Counterparty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Counterparty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Counterparty message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.connection.v1.Counterparty} Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counterparty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.Counterparty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clientId = reader.string(); + break; + case 2: + message.connectionId = reader.string(); + break; + case 3: + message.prefix = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Counterparty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.connection.v1.Counterparty} Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counterparty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Counterparty message. + * @function verify + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Counterparty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clientId != null && message.hasOwnProperty("clientId")) + if (!$util.isString(message.clientId)) + return "clientId: string expected"; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + if (!$util.isString(message.connectionId)) + return "connectionId: string expected"; + if (message.prefix != null && message.hasOwnProperty("prefix")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify(message.prefix); + if (error) + return "prefix." + error; + } + return null; + }; + + /** + * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.connection.v1.Counterparty} Counterparty + */ + Counterparty.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.Counterparty) + return object; + var message = new $root.cosmos_sdk.x.ibc.connection.v1.Counterparty(); + if (object.clientId != null) + message.clientId = String(object.clientId); + if (object.connectionId != null) + message.connectionId = String(object.connectionId); + if (object.prefix != null) { + if (typeof object.prefix !== "object") + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.Counterparty.prefix: object expected"); + message.prefix = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.fromObject(object.prefix); + } + return message; + }; + + /** + * Creates a plain object from a Counterparty message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.Counterparty} message Counterparty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Counterparty.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.clientId = ""; + object.connectionId = ""; + object.prefix = null; + } + if (message.clientId != null && message.hasOwnProperty("clientId")) + object.clientId = message.clientId; + if (message.connectionId != null && message.hasOwnProperty("connectionId")) + object.connectionId = message.connectionId; + if (message.prefix != null && message.hasOwnProperty("prefix")) + object.prefix = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.toObject(message.prefix, options); + return object; + }; + + /** + * Converts this Counterparty to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty + * @instance + * @returns {Object.} JSON object + */ + Counterparty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Counterparty; + })(); + + v1.ClientPaths = (function() { + + /** + * Properties of a ClientPaths. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @interface IClientPaths + * @property {Array.|null} [paths] ClientPaths paths + */ + + /** + * Constructs a new ClientPaths. + * @memberof cosmos_sdk.x.ibc.connection.v1 + * @classdesc Represents a ClientPaths. + * @implements IClientPaths + * @constructor + * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths=} [properties] Properties to set + */ + function ClientPaths(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientPaths paths. + * @member {Array.} paths + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @instance + */ + ClientPaths.prototype.paths = $util.emptyArray; + + /** + * Creates a new ClientPaths instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.connection.v1.ClientPaths} ClientPaths instance + */ + ClientPaths.create = function create(properties) { + return new ClientPaths(properties); + }; + + /** + * Encodes the specified ClientPaths message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths} message ClientPaths message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPaths.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified ClientPaths message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths} message ClientPaths message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientPaths.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientPaths message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.connection.v1.ClientPaths} ClientPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPaths.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.ClientPaths(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientPaths message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.connection.v1.ClientPaths} ClientPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientPaths.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientPaths message. + * @function verify + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientPaths.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a ClientPaths message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.connection.v1.ClientPaths} ClientPaths + */ + ClientPaths.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.ClientPaths) + return object; + var message = new $root.cosmos_sdk.x.ibc.connection.v1.ClientPaths(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".cosmos_sdk.x.ibc.connection.v1.ClientPaths.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a ClientPaths message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @static + * @param {cosmos_sdk.x.ibc.connection.v1.ClientPaths} message ClientPaths + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientPaths.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this ClientPaths to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths + * @instance + * @returns {Object.} JSON object + */ + ClientPaths.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClientPaths; + })(); + + return v1; + })(); + + return connection; + })(); + + ibc.channel = (function() { + + /** + * Namespace channel. + * @memberof cosmos_sdk.x.ibc + * @namespace + */ + var channel = {}; + + channel.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.ibc.channel + * @namespace + */ + var v1 = {}; + + v1.MsgChannelOpenInit = (function() { + + /** + * Properties of a MsgChannelOpenInit. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IMsgChannelOpenInit + * @property {string|null} [portId] MsgChannelOpenInit portId + * @property {string|null} [channelId] MsgChannelOpenInit channelId + * @property {cosmos_sdk.x.ibc.channel.v1.IChannel|null} [channel] MsgChannelOpenInit channel + * @property {Uint8Array|null} [signer] MsgChannelOpenInit signer + */ + + /** + * Constructs a new MsgChannelOpenInit. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a MsgChannelOpenInit. + * @implements IMsgChannelOpenInit + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit=} [properties] Properties to set + */ + function MsgChannelOpenInit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelOpenInit portId. + * @member {string} portId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @instance + */ + MsgChannelOpenInit.prototype.portId = ""; + + /** + * MsgChannelOpenInit channelId. + * @member {string} channelId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @instance + */ + MsgChannelOpenInit.prototype.channelId = ""; + + /** + * MsgChannelOpenInit channel. + * @member {cosmos_sdk.x.ibc.channel.v1.IChannel|null|undefined} channel + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @instance + */ + MsgChannelOpenInit.prototype.channel = null; + + /** + * MsgChannelOpenInit signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @instance + */ + MsgChannelOpenInit.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgChannelOpenInit instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit instance + */ + MsgChannelOpenInit.create = function create(properties) { + return new MsgChannelOpenInit(properties); + }; + + /** + * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit} message MsgChannelOpenInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenInit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + $root.cosmos_sdk.x.ibc.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit} message MsgChannelOpenInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenInit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenInit message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenInit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.decode(reader, reader.uint32()); + break; + case 4: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenInit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenInit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenInit message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenInit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.channel != null && message.hasOwnProperty("channel")) { + var error = $root.cosmos_sdk.x.ibc.channel.v1.Channel.verify(message.channel); + if (error) + return "channel." + error; + } + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenInit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit + */ + MsgChannelOpenInit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.channel != null) { + if (typeof object.channel !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.channel: object expected"); + message.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.fromObject(object.channel); + } + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgChannelOpenInit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} message MsgChannelOpenInit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenInit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + object.channel = null; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.toObject(message.channel, options); + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgChannelOpenInit to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenInit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenInit; + })(); + + v1.MsgChannelOpenTry = (function() { + + /** + * Properties of a MsgChannelOpenTry. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IMsgChannelOpenTry + * @property {string|null} [portId] MsgChannelOpenTry portId + * @property {string|null} [channelId] MsgChannelOpenTry channelId + * @property {cosmos_sdk.x.ibc.channel.v1.IChannel|null} [channel] MsgChannelOpenTry channel + * @property {string|null} [counterpartyVersion] MsgChannelOpenTry counterpartyVersion + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofInit] MsgChannelOpenTry proofInit + * @property {number|Long|null} [proofHeight] MsgChannelOpenTry proofHeight + * @property {Uint8Array|null} [signer] MsgChannelOpenTry signer + */ + + /** + * Constructs a new MsgChannelOpenTry. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a MsgChannelOpenTry. + * @implements IMsgChannelOpenTry + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry=} [properties] Properties to set + */ + function MsgChannelOpenTry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelOpenTry portId. + * @member {string} portId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.portId = ""; + + /** + * MsgChannelOpenTry channelId. + * @member {string} channelId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.channelId = ""; + + /** + * MsgChannelOpenTry channel. + * @member {cosmos_sdk.x.ibc.channel.v1.IChannel|null|undefined} channel + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.channel = null; + + /** + * MsgChannelOpenTry counterpartyVersion. + * @member {string} counterpartyVersion + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.counterpartyVersion = ""; + + /** + * MsgChannelOpenTry proofInit. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofInit + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.proofInit = null; + + /** + * MsgChannelOpenTry proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgChannelOpenTry signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @instance + */ + MsgChannelOpenTry.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgChannelOpenTry instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry instance + */ + MsgChannelOpenTry.create = function create(properties) { + return new MsgChannelOpenTry(properties); + }; + + /** + * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry} message MsgChannelOpenTry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenTry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) + $root.cosmos_sdk.x.ibc.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.counterpartyVersion != null && Object.hasOwnProperty.call(message, "counterpartyVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterpartyVersion); + if (message.proofInit != null && Object.hasOwnProperty.call(message, "proofInit")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofInit, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.proofHeight); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry} message MsgChannelOpenTry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenTry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenTry message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenTry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.decode(reader, reader.uint32()); + break; + case 4: + message.counterpartyVersion = reader.string(); + break; + case 5: + message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 6: + message.proofHeight = reader.uint64(); + break; + case 7: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenTry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenTry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenTry message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenTry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.channel != null && message.hasOwnProperty("channel")) { + var error = $root.cosmos_sdk.x.ibc.channel.v1.Channel.verify(message.channel); + if (error) + return "channel." + error; + } + if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) + if (!$util.isString(message.counterpartyVersion)) + return "counterpartyVersion: string expected"; + if (message.proofInit != null && message.hasOwnProperty("proofInit")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofInit); + if (error) + return "proofInit." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenTry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry + */ + MsgChannelOpenTry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.channel != null) { + if (typeof object.channel !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.channel: object expected"); + message.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.fromObject(object.channel); + } + if (object.counterpartyVersion != null) + message.counterpartyVersion = String(object.counterpartyVersion); + if (object.proofInit != null) { + if (typeof object.proofInit !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.proofInit: object expected"); + message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofInit); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgChannelOpenTry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} message MsgChannelOpenTry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenTry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + object.channel = null; + object.counterpartyVersion = ""; + object.proofInit = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.channel != null && message.hasOwnProperty("channel")) + object.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.toObject(message.channel, options); + if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) + object.counterpartyVersion = message.counterpartyVersion; + if (message.proofInit != null && message.hasOwnProperty("proofInit")) + object.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofInit, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgChannelOpenTry to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenTry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenTry; + })(); + + v1.MsgChannelOpenAck = (function() { + + /** + * Properties of a MsgChannelOpenAck. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IMsgChannelOpenAck + * @property {string|null} [portId] MsgChannelOpenAck portId + * @property {string|null} [channelId] MsgChannelOpenAck channelId + * @property {string|null} [counterpartyVersion] MsgChannelOpenAck counterpartyVersion + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofTry] MsgChannelOpenAck proofTry + * @property {number|Long|null} [proofHeight] MsgChannelOpenAck proofHeight + * @property {Uint8Array|null} [signer] MsgChannelOpenAck signer + */ + + /** + * Constructs a new MsgChannelOpenAck. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a MsgChannelOpenAck. + * @implements IMsgChannelOpenAck + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck=} [properties] Properties to set + */ + function MsgChannelOpenAck(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelOpenAck portId. + * @member {string} portId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.portId = ""; + + /** + * MsgChannelOpenAck channelId. + * @member {string} channelId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.channelId = ""; + + /** + * MsgChannelOpenAck counterpartyVersion. + * @member {string} counterpartyVersion + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.counterpartyVersion = ""; + + /** + * MsgChannelOpenAck proofTry. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofTry + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.proofTry = null; + + /** + * MsgChannelOpenAck proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgChannelOpenAck signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @instance + */ + MsgChannelOpenAck.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgChannelOpenAck instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck instance + */ + MsgChannelOpenAck.create = function create(properties) { + return new MsgChannelOpenAck(properties); + }; + + /** + * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck} message MsgChannelOpenAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenAck.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.counterpartyVersion != null && Object.hasOwnProperty.call(message, "counterpartyVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.counterpartyVersion); + if (message.proofTry != null && Object.hasOwnProperty.call(message, "proofTry")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofTry, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.proofHeight); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck} message MsgChannelOpenAck message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenAck.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenAck message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenAck.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.counterpartyVersion = reader.string(); + break; + case 4: + message.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 5: + message.proofHeight = reader.uint64(); + break; + case 6: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenAck message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenAck.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenAck message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenAck.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) + if (!$util.isString(message.counterpartyVersion)) + return "counterpartyVersion: string expected"; + if (message.proofTry != null && message.hasOwnProperty("proofTry")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofTry); + if (error) + return "proofTry." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenAck message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck + */ + MsgChannelOpenAck.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.counterpartyVersion != null) + message.counterpartyVersion = String(object.counterpartyVersion); + if (object.proofTry != null) { + if (typeof object.proofTry !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.proofTry: object expected"); + message.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofTry); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgChannelOpenAck message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} message MsgChannelOpenAck + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenAck.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + object.counterpartyVersion = ""; + object.proofTry = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) + object.counterpartyVersion = message.counterpartyVersion; + if (message.proofTry != null && message.hasOwnProperty("proofTry")) + object.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofTry, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgChannelOpenAck to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenAck.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenAck; + })(); + + v1.MsgChannelOpenConfirm = (function() { + + /** + * Properties of a MsgChannelOpenConfirm. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IMsgChannelOpenConfirm + * @property {string|null} [portId] MsgChannelOpenConfirm portId + * @property {string|null} [channelId] MsgChannelOpenConfirm channelId + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofAck] MsgChannelOpenConfirm proofAck + * @property {number|Long|null} [proofHeight] MsgChannelOpenConfirm proofHeight + * @property {Uint8Array|null} [signer] MsgChannelOpenConfirm signer + */ + + /** + * Constructs a new MsgChannelOpenConfirm. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a MsgChannelOpenConfirm. + * @implements IMsgChannelOpenConfirm + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm=} [properties] Properties to set + */ + function MsgChannelOpenConfirm(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelOpenConfirm portId. + * @member {string} portId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.portId = ""; + + /** + * MsgChannelOpenConfirm channelId. + * @member {string} channelId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.channelId = ""; + + /** + * MsgChannelOpenConfirm proofAck. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofAck + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.proofAck = null; + + /** + * MsgChannelOpenConfirm proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgChannelOpenConfirm signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @instance + */ + MsgChannelOpenConfirm.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgChannelOpenConfirm instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm instance + */ + MsgChannelOpenConfirm.create = function create(properties) { + return new MsgChannelOpenConfirm(properties); + }; + + /** + * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm} message MsgChannelOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenConfirm.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.proofAck != null && Object.hasOwnProperty.call(message, "proofAck")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofAck, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.proofHeight); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm} message MsgChannelOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelOpenConfirm.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenConfirm.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 4: + message.proofHeight = reader.uint64(); + break; + case 5: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelOpenConfirm.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelOpenConfirm message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelOpenConfirm.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.proofAck != null && message.hasOwnProperty("proofAck")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofAck); + if (error) + return "proofAck." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgChannelOpenConfirm message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm + */ + MsgChannelOpenConfirm.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.proofAck != null) { + if (typeof object.proofAck !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.proofAck: object expected"); + message.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofAck); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgChannelOpenConfirm message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} message MsgChannelOpenConfirm + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelOpenConfirm.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + object.proofAck = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.proofAck != null && message.hasOwnProperty("proofAck")) + object.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofAck, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgChannelOpenConfirm to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm + * @instance + * @returns {Object.} JSON object + */ + MsgChannelOpenConfirm.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelOpenConfirm; + })(); + + v1.MsgChannelCloseInit = (function() { + + /** + * Properties of a MsgChannelCloseInit. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IMsgChannelCloseInit + * @property {string|null} [portId] MsgChannelCloseInit portId + * @property {string|null} [channelId] MsgChannelCloseInit channelId + * @property {Uint8Array|null} [signer] MsgChannelCloseInit signer + */ + + /** + * Constructs a new MsgChannelCloseInit. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a MsgChannelCloseInit. + * @implements IMsgChannelCloseInit + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit=} [properties] Properties to set + */ + function MsgChannelCloseInit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelCloseInit portId. + * @member {string} portId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @instance + */ + MsgChannelCloseInit.prototype.portId = ""; + + /** + * MsgChannelCloseInit channelId. + * @member {string} channelId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @instance + */ + MsgChannelCloseInit.prototype.channelId = ""; + + /** + * MsgChannelCloseInit signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @instance + */ + MsgChannelCloseInit.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgChannelCloseInit instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit instance + */ + MsgChannelCloseInit.create = function create(properties) { + return new MsgChannelCloseInit(properties); + }; + + /** + * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit} message MsgChannelCloseInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseInit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit} message MsgChannelCloseInit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseInit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelCloseInit message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseInit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelCloseInit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseInit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelCloseInit message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelCloseInit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgChannelCloseInit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit + */ + MsgChannelCloseInit.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgChannelCloseInit message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} message MsgChannelCloseInit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelCloseInit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgChannelCloseInit to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit + * @instance + * @returns {Object.} JSON object + */ + MsgChannelCloseInit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelCloseInit; + })(); + + v1.MsgChannelCloseConfirm = (function() { + + /** + * Properties of a MsgChannelCloseConfirm. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IMsgChannelCloseConfirm + * @property {string|null} [portId] MsgChannelCloseConfirm portId + * @property {string|null} [channelId] MsgChannelCloseConfirm channelId + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofInit] MsgChannelCloseConfirm proofInit + * @property {number|Long|null} [proofHeight] MsgChannelCloseConfirm proofHeight + * @property {Uint8Array|null} [signer] MsgChannelCloseConfirm signer + */ + + /** + * Constructs a new MsgChannelCloseConfirm. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a MsgChannelCloseConfirm. + * @implements IMsgChannelCloseConfirm + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm=} [properties] Properties to set + */ + function MsgChannelCloseConfirm(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgChannelCloseConfirm portId. + * @member {string} portId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.portId = ""; + + /** + * MsgChannelCloseConfirm channelId. + * @member {string} channelId + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.channelId = ""; + + /** + * MsgChannelCloseConfirm proofInit. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofInit + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.proofInit = null; + + /** + * MsgChannelCloseConfirm proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgChannelCloseConfirm signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @instance + */ + MsgChannelCloseConfirm.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgChannelCloseConfirm instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm instance + */ + MsgChannelCloseConfirm.create = function create(properties) { + return new MsgChannelCloseConfirm(properties); + }; + + /** + * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm} message MsgChannelCloseConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseConfirm.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + if (message.proofInit != null && Object.hasOwnProperty.call(message, "proofInit")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofInit, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.proofHeight); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm} message MsgChannelCloseConfirm message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgChannelCloseConfirm.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseConfirm.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + case 3: + message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 4: + message.proofHeight = reader.uint64(); + break; + case 5: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgChannelCloseConfirm.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgChannelCloseConfirm message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgChannelCloseConfirm.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + if (message.proofInit != null && message.hasOwnProperty("proofInit")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofInit); + if (error) + return "proofInit." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgChannelCloseConfirm message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm + */ + MsgChannelCloseConfirm.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + if (object.proofInit != null) { + if (typeof object.proofInit !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.proofInit: object expected"); + message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofInit); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgChannelCloseConfirm message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} message MsgChannelCloseConfirm + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgChannelCloseConfirm.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + object.proofInit = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + if (message.proofInit != null && message.hasOwnProperty("proofInit")) + object.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofInit, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgChannelCloseConfirm to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm + * @instance + * @returns {Object.} JSON object + */ + MsgChannelCloseConfirm.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgChannelCloseConfirm; + })(); + + v1.MsgPacket = (function() { + + /** + * Properties of a MsgPacket. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IMsgPacket + * @property {cosmos_sdk.x.ibc.channel.v1.IPacket|null} [packet] MsgPacket packet + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proof] MsgPacket proof + * @property {number|Long|null} [proofHeight] MsgPacket proofHeight + * @property {Uint8Array|null} [signer] MsgPacket signer + */ + + /** + * Constructs a new MsgPacket. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a MsgPacket. + * @implements IMsgPacket + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket=} [properties] Properties to set + */ + function MsgPacket(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgPacket packet. + * @member {cosmos_sdk.x.ibc.channel.v1.IPacket|null|undefined} packet + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @instance + */ + MsgPacket.prototype.packet = null; + + /** + * MsgPacket proof. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proof + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @instance + */ + MsgPacket.prototype.proof = null; + + /** + * MsgPacket proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @instance + */ + MsgPacket.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgPacket signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @instance + */ + MsgPacket.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgPacket instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgPacket} MsgPacket instance + */ + MsgPacket.create = function create(properties) { + return new MsgPacket(properties); + }; + + /** + * Encodes the specified MsgPacket message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket} message MsgPacket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgPacket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) + $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.proofHeight); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgPacket message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket} message MsgPacket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgPacket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgPacket message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgPacket} MsgPacket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgPacket.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgPacket(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(reader, reader.uint32()); + break; + case 2: + message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 3: + message.proofHeight = reader.uint64(); + break; + case 4: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgPacket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgPacket} MsgPacket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgPacket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgPacket message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgPacket.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packet != null && message.hasOwnProperty("packet")) { + var error = $root.cosmos_sdk.x.ibc.channel.v1.Packet.verify(message.packet); + if (error) + return "packet." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proof); + if (error) + return "proof." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgPacket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgPacket} MsgPacket + */ + MsgPacket.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgPacket) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgPacket(); + if (object.packet != null) { + if (typeof object.packet !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgPacket.packet: object expected"); + message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.fromObject(object.packet); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgPacket.proof: object expected"); + message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proof); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgPacket message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.MsgPacket} message MsgPacket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgPacket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.packet = null; + object.proof = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.packet != null && message.hasOwnProperty("packet")) + object.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.toObject(message.packet, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proof, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgPacket to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket + * @instance + * @returns {Object.} JSON object + */ + MsgPacket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgPacket; + })(); + + v1.MsgTimeout = (function() { + + /** + * Properties of a MsgTimeout. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IMsgTimeout + * @property {cosmos_sdk.x.ibc.channel.v1.IPacket|null} [packet] MsgTimeout packet + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proof] MsgTimeout proof + * @property {number|Long|null} [proofHeight] MsgTimeout proofHeight + * @property {number|Long|null} [nextSequenceRecv] MsgTimeout nextSequenceRecv + * @property {Uint8Array|null} [signer] MsgTimeout signer + */ + + /** + * Constructs a new MsgTimeout. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a MsgTimeout. + * @implements IMsgTimeout + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout=} [properties] Properties to set + */ + function MsgTimeout(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgTimeout packet. + * @member {cosmos_sdk.x.ibc.channel.v1.IPacket|null|undefined} packet + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.packet = null; + + /** + * MsgTimeout proof. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proof + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.proof = null; + + /** + * MsgTimeout proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgTimeout nextSequenceRecv. + * @member {number|Long} nextSequenceRecv + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.nextSequenceRecv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgTimeout signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @instance + */ + MsgTimeout.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgTimeout instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} MsgTimeout instance + */ + MsgTimeout.create = function create(properties) { + return new MsgTimeout(properties); + }; + + /** + * Encodes the specified MsgTimeout message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout} message MsgTimeout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeout.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) + $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.proofHeight); + if (message.nextSequenceRecv != null && Object.hasOwnProperty.call(message, "nextSequenceRecv")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.nextSequenceRecv); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout} message MsgTimeout message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgTimeout.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgTimeout message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} MsgTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeout.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgTimeout(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(reader, reader.uint32()); + break; + case 2: + message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 3: + message.proofHeight = reader.uint64(); + break; + case 4: + message.nextSequenceRecv = reader.uint64(); + break; + case 5: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgTimeout message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} MsgTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgTimeout.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgTimeout message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgTimeout.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packet != null && message.hasOwnProperty("packet")) { + var error = $root.cosmos_sdk.x.ibc.channel.v1.Packet.verify(message.packet); + if (error) + return "packet." + error; + } + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proof); + if (error) + return "proof." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.nextSequenceRecv != null && message.hasOwnProperty("nextSequenceRecv")) + if (!$util.isInteger(message.nextSequenceRecv) && !(message.nextSequenceRecv && $util.isInteger(message.nextSequenceRecv.low) && $util.isInteger(message.nextSequenceRecv.high))) + return "nextSequenceRecv: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgTimeout message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} MsgTimeout + */ + MsgTimeout.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgTimeout) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgTimeout(); + if (object.packet != null) { + if (typeof object.packet !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgTimeout.packet: object expected"); + message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.fromObject(object.packet); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgTimeout.proof: object expected"); + message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proof); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.nextSequenceRecv != null) + if ($util.Long) + (message.nextSequenceRecv = $util.Long.fromValue(object.nextSequenceRecv)).unsigned = true; + else if (typeof object.nextSequenceRecv === "string") + message.nextSequenceRecv = parseInt(object.nextSequenceRecv, 10); + else if (typeof object.nextSequenceRecv === "number") + message.nextSequenceRecv = object.nextSequenceRecv; + else if (typeof object.nextSequenceRecv === "object") + message.nextSequenceRecv = new $util.LongBits(object.nextSequenceRecv.low >>> 0, object.nextSequenceRecv.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgTimeout message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} message MsgTimeout + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgTimeout.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.packet = null; + object.proof = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.nextSequenceRecv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.nextSequenceRecv = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.packet != null && message.hasOwnProperty("packet")) + object.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.toObject(message.packet, options); + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proof, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.nextSequenceRecv != null && message.hasOwnProperty("nextSequenceRecv")) + if (typeof message.nextSequenceRecv === "number") + object.nextSequenceRecv = options.longs === String ? String(message.nextSequenceRecv) : message.nextSequenceRecv; + else + object.nextSequenceRecv = options.longs === String ? $util.Long.prototype.toString.call(message.nextSequenceRecv) : options.longs === Number ? new $util.LongBits(message.nextSequenceRecv.low >>> 0, message.nextSequenceRecv.high >>> 0).toNumber(true) : message.nextSequenceRecv; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgTimeout to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout + * @instance + * @returns {Object.} JSON object + */ + MsgTimeout.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgTimeout; + })(); + + v1.MsgAcknowledgement = (function() { + + /** + * Properties of a MsgAcknowledgement. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IMsgAcknowledgement + * @property {cosmos_sdk.x.ibc.channel.v1.IPacket|null} [packet] MsgAcknowledgement packet + * @property {Uint8Array|null} [acknowledgement] MsgAcknowledgement acknowledgement + * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proof] MsgAcknowledgement proof + * @property {number|Long|null} [proofHeight] MsgAcknowledgement proofHeight + * @property {Uint8Array|null} [signer] MsgAcknowledgement signer + */ + + /** + * Constructs a new MsgAcknowledgement. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a MsgAcknowledgement. + * @implements IMsgAcknowledgement + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement=} [properties] Properties to set + */ + function MsgAcknowledgement(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgAcknowledgement packet. + * @member {cosmos_sdk.x.ibc.channel.v1.IPacket|null|undefined} packet + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.packet = null; + + /** + * MsgAcknowledgement acknowledgement. + * @member {Uint8Array} acknowledgement + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.acknowledgement = $util.newBuffer([]); + + /** + * MsgAcknowledgement proof. + * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proof + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.proof = null; + + /** + * MsgAcknowledgement proofHeight. + * @member {number|Long} proofHeight + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * MsgAcknowledgement signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @instance + */ + MsgAcknowledgement.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgAcknowledgement instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} MsgAcknowledgement instance + */ + MsgAcknowledgement.create = function create(properties) { + return new MsgAcknowledgement(properties); + }; + + /** + * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement} message MsgAcknowledgement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgAcknowledgement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) + $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.acknowledgement); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.proofHeight); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement} message MsgAcknowledgement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgAcknowledgement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgAcknowledgement message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} MsgAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgAcknowledgement.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(reader, reader.uint32()); + break; + case 2: + message.acknowledgement = reader.bytes(); + break; + case 3: + message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + break; + case 4: + message.proofHeight = reader.uint64(); + break; + case 5: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgAcknowledgement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} MsgAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgAcknowledgement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgAcknowledgement message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgAcknowledgement.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.packet != null && message.hasOwnProperty("packet")) { + var error = $root.cosmos_sdk.x.ibc.channel.v1.Packet.verify(message.packet); + if (error) + return "packet." + error; + } + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + if (!(message.acknowledgement && typeof message.acknowledgement.length === "number" || $util.isString(message.acknowledgement))) + return "acknowledgement: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proof); + if (error) + return "proof." + error; + } + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) + return "proofHeight: integer|Long expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgAcknowledgement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} MsgAcknowledgement + */ + MsgAcknowledgement.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement(); + if (object.packet != null) { + if (typeof object.packet !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.packet: object expected"); + message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.fromObject(object.packet); + } + if (object.acknowledgement != null) + if (typeof object.acknowledgement === "string") + $util.base64.decode(object.acknowledgement, message.acknowledgement = $util.newBuffer($util.base64.length(object.acknowledgement)), 0); + else if (object.acknowledgement.length) + message.acknowledgement = object.acknowledgement; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.proof: object expected"); + message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proof); + } + if (object.proofHeight != null) + if ($util.Long) + (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; + else if (typeof object.proofHeight === "string") + message.proofHeight = parseInt(object.proofHeight, 10); + else if (typeof object.proofHeight === "number") + message.proofHeight = object.proofHeight; + else if (typeof object.proofHeight === "object") + message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgAcknowledgement message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} message MsgAcknowledgement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgAcknowledgement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.packet = null; + if (options.bytes === String) + object.acknowledgement = ""; + else { + object.acknowledgement = []; + if (options.bytes !== Array) + object.acknowledgement = $util.newBuffer(object.acknowledgement); + } + object.proof = null; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.proofHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + } + if (message.packet != null && message.hasOwnProperty("packet")) + object.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.toObject(message.packet, options); + if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) + object.acknowledgement = options.bytes === String ? $util.base64.encode(message.acknowledgement, 0, message.acknowledgement.length) : options.bytes === Array ? Array.prototype.slice.call(message.acknowledgement) : message.acknowledgement; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proof, options); + if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) + if (typeof message.proofHeight === "number") + object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; + else + object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgAcknowledgement to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement + * @instance + * @returns {Object.} JSON object + */ + MsgAcknowledgement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgAcknowledgement; + })(); + + v1.Channel = (function() { + + /** + * Properties of a Channel. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IChannel + * @property {cosmos_sdk.x.ibc.channel.v1.State|null} [state] Channel state + * @property {cosmos_sdk.x.ibc.channel.v1.Order|null} [ordering] Channel ordering + * @property {cosmos_sdk.x.ibc.channel.v1.ICounterparty|null} [counterparty] Channel counterparty + * @property {Array.|null} [connectionHops] Channel connectionHops + * @property {string|null} [version] Channel version + */ + + /** + * Constructs a new Channel. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a Channel. + * @implements IChannel + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IChannel=} [properties] Properties to set + */ + function Channel(properties) { + this.connectionHops = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Channel state. + * @member {cosmos_sdk.x.ibc.channel.v1.State} state + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @instance + */ + Channel.prototype.state = 0; + + /** + * Channel ordering. + * @member {cosmos_sdk.x.ibc.channel.v1.Order} ordering + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @instance + */ + Channel.prototype.ordering = 0; + + /** + * Channel counterparty. + * @member {cosmos_sdk.x.ibc.channel.v1.ICounterparty|null|undefined} counterparty + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @instance + */ + Channel.prototype.counterparty = null; + + /** + * Channel connectionHops. + * @member {Array.} connectionHops + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @instance + */ + Channel.prototype.connectionHops = $util.emptyArray; + + /** + * Channel version. + * @member {string} version + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @instance + */ + Channel.prototype.version = ""; + + /** + * Creates a new Channel instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IChannel=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.Channel} Channel instance + */ + Channel.create = function create(properties) { + return new Channel(properties); + }; + + /** + * Encodes the specified Channel message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IChannel} message Channel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Channel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.ordering != null && Object.hasOwnProperty.call(message, "ordering")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ordering); + if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) + $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.connectionHops != null && message.connectionHops.length) + for (var i = 0; i < message.connectionHops.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.connectionHops[i]); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); + return writer; + }; + + /** + * Encodes the specified Channel message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IChannel} message Channel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Channel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Channel message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.Channel} Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Channel.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.Channel(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.state = reader.int32(); + break; + case 2: + message.ordering = reader.int32(); + break; + case 3: + message.counterparty = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.connectionHops && message.connectionHops.length)) + message.connectionHops = []; + message.connectionHops.push(reader.string()); + break; + case 5: + message.version = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Channel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.Channel} Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Channel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Channel message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Channel.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.ordering != null && message.hasOwnProperty("ordering")) + switch (message.ordering) { + default: + return "ordering: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.counterparty != null && message.hasOwnProperty("counterparty")) { + var error = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.verify(message.counterparty); + if (error) + return "counterparty." + error; + } + if (message.connectionHops != null && message.hasOwnProperty("connectionHops")) { + if (!Array.isArray(message.connectionHops)) + return "connectionHops: array expected"; + for (var i = 0; i < message.connectionHops.length; ++i) + if (!$util.isString(message.connectionHops[i])) + return "connectionHops: string[] expected"; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a Channel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.Channel} Channel + */ + Channel.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.Channel) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.Channel(); + switch (object.state) { + case "STATE_UNINITIALIZED_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "STATE_INIT": + case 1: + message.state = 1; + break; + case "STATE_TRYOPEN": + case 2: + message.state = 2; + break; + case "STATE_OPEN": + case 3: + message.state = 3; + break; + case "STATE_CLOSED": + case 4: + message.state = 4; + break; + } + switch (object.ordering) { + case "ORDER_NONE_UNSPECIFIED": + case 0: + message.ordering = 0; + break; + case "ORDER_UNORDERED": + case 1: + message.ordering = 1; + break; + case "ORDER_ORDERED": + case 2: + message.ordering = 2; + break; + } + if (object.counterparty != null) { + if (typeof object.counterparty !== "object") + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.Channel.counterparty: object expected"); + message.counterparty = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.fromObject(object.counterparty); + } + if (object.connectionHops) { + if (!Array.isArray(object.connectionHops)) + throw TypeError(".cosmos_sdk.x.ibc.channel.v1.Channel.connectionHops: array expected"); + message.connectionHops = []; + for (var i = 0; i < object.connectionHops.length; ++i) + message.connectionHops[i] = String(object.connectionHops[i]); + } + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a Channel message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.Channel} message Channel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Channel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connectionHops = []; + if (options.defaults) { + object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; + object.ordering = options.enums === String ? "ORDER_NONE_UNSPECIFIED" : 0; + object.counterparty = null; + object.version = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.cosmos_sdk.x.ibc.channel.v1.State[message.state] : message.state; + if (message.ordering != null && message.hasOwnProperty("ordering")) + object.ordering = options.enums === String ? $root.cosmos_sdk.x.ibc.channel.v1.Order[message.ordering] : message.ordering; + if (message.counterparty != null && message.hasOwnProperty("counterparty")) + object.counterparty = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.toObject(message.counterparty, options); + if (message.connectionHops && message.connectionHops.length) { + object.connectionHops = []; + for (var j = 0; j < message.connectionHops.length; ++j) + object.connectionHops[j] = message.connectionHops[j]; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this Channel to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.Channel + * @instance + * @returns {Object.} JSON object + */ + Channel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Channel; + })(); + + /** + * State enum. + * @name cosmos_sdk.x.ibc.channel.v1.State + * @enum {number} + * @property {number} STATE_UNINITIALIZED_UNSPECIFIED=0 STATE_UNINITIALIZED_UNSPECIFIED value + * @property {number} STATE_INIT=1 STATE_INIT value + * @property {number} STATE_TRYOPEN=2 STATE_TRYOPEN value + * @property {number} STATE_OPEN=3 STATE_OPEN value + * @property {number} STATE_CLOSED=4 STATE_CLOSED value + */ + v1.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNINITIALIZED_UNSPECIFIED"] = 0; + values[valuesById[1] = "STATE_INIT"] = 1; + values[valuesById[2] = "STATE_TRYOPEN"] = 2; + values[valuesById[3] = "STATE_OPEN"] = 3; + values[valuesById[4] = "STATE_CLOSED"] = 4; + return values; + })(); + + /** + * Order enum. + * @name cosmos_sdk.x.ibc.channel.v1.Order + * @enum {number} + * @property {number} ORDER_NONE_UNSPECIFIED=0 ORDER_NONE_UNSPECIFIED value + * @property {number} ORDER_UNORDERED=1 ORDER_UNORDERED value + * @property {number} ORDER_ORDERED=2 ORDER_ORDERED value + */ + v1.Order = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_NONE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORDER_UNORDERED"] = 1; + values[valuesById[2] = "ORDER_ORDERED"] = 2; + return values; + })(); + + v1.Counterparty = (function() { + + /** + * Properties of a Counterparty. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface ICounterparty + * @property {string|null} [portId] Counterparty portId + * @property {string|null} [channelId] Counterparty channelId + */ + + /** + * Constructs a new Counterparty. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a Counterparty. + * @implements ICounterparty + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty=} [properties] Properties to set + */ + function Counterparty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Counterparty portId. + * @member {string} portId + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @instance + */ + Counterparty.prototype.portId = ""; + + /** + * Counterparty channelId. + * @member {string} channelId + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @instance + */ + Counterparty.prototype.channelId = ""; + + /** + * Creates a new Counterparty instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.Counterparty} Counterparty instance + */ + Counterparty.create = function create(properties) { + return new Counterparty(properties); + }; + + /** + * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty} message Counterparty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Counterparty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); + if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); + return writer; + }; + + /** + * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty} message Counterparty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Counterparty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Counterparty message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.Counterparty} Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counterparty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.Counterparty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.portId = reader.string(); + break; + case 2: + message.channelId = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Counterparty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.Counterparty} Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Counterparty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Counterparty message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Counterparty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.portId != null && message.hasOwnProperty("portId")) + if (!$util.isString(message.portId)) + return "portId: string expected"; + if (message.channelId != null && message.hasOwnProperty("channelId")) + if (!$util.isString(message.channelId)) + return "channelId: string expected"; + return null; + }; + + /** + * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.Counterparty} Counterparty + */ + Counterparty.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.Counterparty) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.Counterparty(); + if (object.portId != null) + message.portId = String(object.portId); + if (object.channelId != null) + message.channelId = String(object.channelId); + return message; + }; + + /** + * Creates a plain object from a Counterparty message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.Counterparty} message Counterparty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Counterparty.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.portId = ""; + object.channelId = ""; + } + if (message.portId != null && message.hasOwnProperty("portId")) + object.portId = message.portId; + if (message.channelId != null && message.hasOwnProperty("channelId")) + object.channelId = message.channelId; + return object; + }; + + /** + * Converts this Counterparty to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty + * @instance + * @returns {Object.} JSON object + */ + Counterparty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Counterparty; + })(); + + v1.Packet = (function() { + + /** + * Properties of a Packet. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @interface IPacket + * @property {number|Long|null} [sequence] Packet sequence + * @property {string|null} [sourcePort] Packet sourcePort + * @property {string|null} [sourceChannel] Packet sourceChannel + * @property {string|null} [destinationPort] Packet destinationPort + * @property {string|null} [destinationChannel] Packet destinationChannel + * @property {Uint8Array|null} [data] Packet data + * @property {number|Long|null} [timeoutHeight] Packet timeoutHeight + * @property {number|Long|null} [timeoutTimestamp] Packet timeoutTimestamp + */ + + /** + * Constructs a new Packet. + * @memberof cosmos_sdk.x.ibc.channel.v1 + * @classdesc Represents a Packet. + * @implements IPacket + * @constructor + * @param {cosmos_sdk.x.ibc.channel.v1.IPacket=} [properties] Properties to set + */ + function Packet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Packet sequence. + * @member {number|Long} sequence + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @instance + */ + Packet.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Packet sourcePort. + * @member {string} sourcePort + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @instance + */ + Packet.prototype.sourcePort = ""; + + /** + * Packet sourceChannel. + * @member {string} sourceChannel + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @instance + */ + Packet.prototype.sourceChannel = ""; + + /** + * Packet destinationPort. + * @member {string} destinationPort + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @instance + */ + Packet.prototype.destinationPort = ""; + + /** + * Packet destinationChannel. + * @member {string} destinationChannel + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @instance + */ + Packet.prototype.destinationChannel = ""; + + /** + * Packet data. + * @member {Uint8Array} data + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @instance + */ + Packet.prototype.data = $util.newBuffer([]); + + /** + * Packet timeoutHeight. + * @member {number|Long} timeoutHeight + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @instance + */ + Packet.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Packet timeoutTimestamp. + * @member {number|Long} timeoutTimestamp + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @instance + */ + Packet.prototype.timeoutTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Packet instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IPacket=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.channel.v1.Packet} Packet instance + */ + Packet.create = function create(properties) { + return new Packet(properties); + }; + + /** + * Encodes the specified Packet message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IPacket} message Packet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Packet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.sequence); + if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourcePort); + if (message.sourceChannel != null && Object.hasOwnProperty.call(message, "sourceChannel")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceChannel); + if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationPort); + if (message.destinationChannel != null && Object.hasOwnProperty.call(message, "destinationChannel")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.destinationChannel); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.data); + if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) + writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeoutHeight); + if (message.timeoutTimestamp != null && Object.hasOwnProperty.call(message, "timeoutTimestamp")) + writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.timeoutTimestamp); + return writer; + }; + + /** + * Encodes the specified Packet message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.IPacket} message Packet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Packet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Packet message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.channel.v1.Packet} Packet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Packet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.Packet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.sequence = reader.uint64(); + break; + case 2: + message.sourcePort = reader.string(); + break; + case 3: + message.sourceChannel = reader.string(); + break; + case 4: + message.destinationPort = reader.string(); + break; + case 5: + message.destinationChannel = reader.string(); + break; + case 6: + message.data = reader.bytes(); + break; + case 7: + message.timeoutHeight = reader.uint64(); + break; + case 8: + message.timeoutTimestamp = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Packet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.channel.v1.Packet} Packet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Packet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Packet message. + * @function verify + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Packet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) + return "sequence: integer|Long expected"; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + if (!$util.isString(message.sourcePort)) + return "sourcePort: string expected"; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + if (!$util.isString(message.sourceChannel)) + return "sourceChannel: string expected"; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + if (!$util.isString(message.destinationPort)) + return "destinationPort: string expected"; + if (message.destinationChannel != null && message.hasOwnProperty("destinationChannel")) + if (!$util.isString(message.destinationChannel)) + return "destinationChannel: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (!$util.isInteger(message.timeoutHeight) && !(message.timeoutHeight && $util.isInteger(message.timeoutHeight.low) && $util.isInteger(message.timeoutHeight.high))) + return "timeoutHeight: integer|Long expected"; + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (!$util.isInteger(message.timeoutTimestamp) && !(message.timeoutTimestamp && $util.isInteger(message.timeoutTimestamp.low) && $util.isInteger(message.timeoutTimestamp.high))) + return "timeoutTimestamp: integer|Long expected"; + return null; + }; + + /** + * Creates a Packet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.channel.v1.Packet} Packet + */ + Packet.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.Packet) + return object; + var message = new $root.cosmos_sdk.x.ibc.channel.v1.Packet(); + if (object.sequence != null) + if ($util.Long) + (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; + else if (typeof object.sequence === "string") + message.sequence = parseInt(object.sequence, 10); + else if (typeof object.sequence === "number") + message.sequence = object.sequence; + else if (typeof object.sequence === "object") + message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); + if (object.sourcePort != null) + message.sourcePort = String(object.sourcePort); + if (object.sourceChannel != null) + message.sourceChannel = String(object.sourceChannel); + if (object.destinationPort != null) + message.destinationPort = String(object.destinationPort); + if (object.destinationChannel != null) + message.destinationChannel = String(object.destinationChannel); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.timeoutHeight != null) + if ($util.Long) + (message.timeoutHeight = $util.Long.fromValue(object.timeoutHeight)).unsigned = true; + else if (typeof object.timeoutHeight === "string") + message.timeoutHeight = parseInt(object.timeoutHeight, 10); + else if (typeof object.timeoutHeight === "number") + message.timeoutHeight = object.timeoutHeight; + else if (typeof object.timeoutHeight === "object") + message.timeoutHeight = new $util.LongBits(object.timeoutHeight.low >>> 0, object.timeoutHeight.high >>> 0).toNumber(true); + if (object.timeoutTimestamp != null) + if ($util.Long) + (message.timeoutTimestamp = $util.Long.fromValue(object.timeoutTimestamp)).unsigned = true; + else if (typeof object.timeoutTimestamp === "string") + message.timeoutTimestamp = parseInt(object.timeoutTimestamp, 10); + else if (typeof object.timeoutTimestamp === "number") + message.timeoutTimestamp = object.timeoutTimestamp; + else if (typeof object.timeoutTimestamp === "object") + message.timeoutTimestamp = new $util.LongBits(object.timeoutTimestamp.low >>> 0, object.timeoutTimestamp.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Packet message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @static + * @param {cosmos_sdk.x.ibc.channel.v1.Packet} message Packet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Packet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sequence = options.longs === String ? "0" : 0; + object.sourcePort = ""; + object.sourceChannel = ""; + object.destinationPort = ""; + object.destinationChannel = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeoutHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.timeoutTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.timeoutTimestamp = options.longs === String ? "0" : 0; + } + if (message.sequence != null && message.hasOwnProperty("sequence")) + if (typeof message.sequence === "number") + object.sequence = options.longs === String ? String(message.sequence) : message.sequence; + else + object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; + if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) + object.sourcePort = message.sourcePort; + if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) + object.sourceChannel = message.sourceChannel; + if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) + object.destinationPort = message.destinationPort; + if (message.destinationChannel != null && message.hasOwnProperty("destinationChannel")) + object.destinationChannel = message.destinationChannel; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) + if (typeof message.timeoutHeight === "number") + object.timeoutHeight = options.longs === String ? String(message.timeoutHeight) : message.timeoutHeight; + else + object.timeoutHeight = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutHeight) : options.longs === Number ? new $util.LongBits(message.timeoutHeight.low >>> 0, message.timeoutHeight.high >>> 0).toNumber(true) : message.timeoutHeight; + if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) + if (typeof message.timeoutTimestamp === "number") + object.timeoutTimestamp = options.longs === String ? String(message.timeoutTimestamp) : message.timeoutTimestamp; + else + object.timeoutTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutTimestamp) : options.longs === Number ? new $util.LongBits(message.timeoutTimestamp.low >>> 0, message.timeoutTimestamp.high >>> 0).toNumber(true) : message.timeoutTimestamp; + return object; + }; + + /** + * Converts this Packet to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.channel.v1.Packet + * @instance + * @returns {Object.} JSON object + */ + Packet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Packet; + })(); + + return v1; + })(); + + return channel; + })(); + + ibc.commitment = (function() { + + /** + * Namespace commitment. + * @memberof cosmos_sdk.x.ibc + * @namespace + */ + var commitment = {}; + + commitment.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.ibc.commitment + * @namespace + */ + var v1 = {}; + + v1.MerkleRoot = (function() { + + /** + * Properties of a MerkleRoot. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @interface IMerkleRoot + * @property {Uint8Array|null} [hash] MerkleRoot hash + */ + + /** + * Constructs a new MerkleRoot. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @classdesc Represents a MerkleRoot. + * @implements IMerkleRoot + * @constructor + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot=} [properties] Properties to set + */ + function MerkleRoot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerkleRoot hash. + * @member {Uint8Array} hash + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @instance + */ + MerkleRoot.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new MerkleRoot instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} MerkleRoot instance + */ + MerkleRoot.create = function create(properties) { + return new MerkleRoot(properties); + }; + + /** + * Encodes the specified MerkleRoot message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot} message MerkleRoot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerkleRoot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified MerkleRoot message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot} message MerkleRoot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerkleRoot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerkleRoot message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} MerkleRoot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerkleRoot.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerkleRoot(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MerkleRoot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} MerkleRoot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerkleRoot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerkleRoot message. + * @function verify + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerkleRoot.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a MerkleRoot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} MerkleRoot + */ + MerkleRoot.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.MerkleRoot) + return object; + var message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerkleRoot(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a MerkleRoot message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} message MerkleRoot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerkleRoot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this MerkleRoot to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot + * @instance + * @returns {Object.} JSON object + */ + MerkleRoot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MerkleRoot; + })(); + + v1.MerklePrefix = (function() { + + /** + * Properties of a MerklePrefix. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @interface IMerklePrefix + * @property {Uint8Array|null} [keyPrefix] MerklePrefix keyPrefix + */ + + /** + * Constructs a new MerklePrefix. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @classdesc Represents a MerklePrefix. + * @implements IMerklePrefix + * @constructor + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix=} [properties] Properties to set + */ + function MerklePrefix(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerklePrefix keyPrefix. + * @member {Uint8Array} keyPrefix + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @instance + */ + MerklePrefix.prototype.keyPrefix = $util.newBuffer([]); + + /** + * Creates a new MerklePrefix instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} MerklePrefix instance + */ + MerklePrefix.create = function create(properties) { + return new MerklePrefix(properties); + }; + + /** + * Encodes the specified MerklePrefix message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix} message MerklePrefix message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerklePrefix.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyPrefix != null && Object.hasOwnProperty.call(message, "keyPrefix")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyPrefix); + return writer; + }; + + /** + * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix} message MerklePrefix message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerklePrefix.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerklePrefix message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} MerklePrefix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerklePrefix.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyPrefix = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MerklePrefix message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} MerklePrefix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerklePrefix.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerklePrefix message. + * @function verify + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerklePrefix.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyPrefix != null && message.hasOwnProperty("keyPrefix")) + if (!(message.keyPrefix && typeof message.keyPrefix.length === "number" || $util.isString(message.keyPrefix))) + return "keyPrefix: buffer expected"; + return null; + }; + + /** + * Creates a MerklePrefix message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} MerklePrefix + */ + MerklePrefix.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix) + return object; + var message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix(); + if (object.keyPrefix != null) + if (typeof object.keyPrefix === "string") + $util.base64.decode(object.keyPrefix, message.keyPrefix = $util.newBuffer($util.base64.length(object.keyPrefix)), 0); + else if (object.keyPrefix.length) + message.keyPrefix = object.keyPrefix; + return message; + }; + + /** + * Creates a plain object from a MerklePrefix message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} message MerklePrefix + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerklePrefix.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.keyPrefix = ""; + else { + object.keyPrefix = []; + if (options.bytes !== Array) + object.keyPrefix = $util.newBuffer(object.keyPrefix); + } + if (message.keyPrefix != null && message.hasOwnProperty("keyPrefix")) + object.keyPrefix = options.bytes === String ? $util.base64.encode(message.keyPrefix, 0, message.keyPrefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyPrefix) : message.keyPrefix; + return object; + }; + + /** + * Converts this MerklePrefix to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix + * @instance + * @returns {Object.} JSON object + */ + MerklePrefix.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MerklePrefix; + })(); + + v1.MerklePath = (function() { + + /** + * Properties of a MerklePath. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @interface IMerklePath + * @property {cosmos_sdk.x.ibc.commitment.v1.IKeyPath|null} [keyPath] MerklePath keyPath + */ + + /** + * Constructs a new MerklePath. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @classdesc Represents a MerklePath. + * @implements IMerklePath + * @constructor + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath=} [properties] Properties to set + */ + function MerklePath(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerklePath keyPath. + * @member {cosmos_sdk.x.ibc.commitment.v1.IKeyPath|null|undefined} keyPath + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @instance + */ + MerklePath.prototype.keyPath = null; + + /** + * Creates a new MerklePath instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePath} MerklePath instance + */ + MerklePath.create = function create(properties) { + return new MerklePath(properties); + }; + + /** + * Encodes the specified MerklePath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath} message MerklePath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerklePath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyPath != null && Object.hasOwnProperty.call(message, "keyPath")) + $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.encode(message.keyPath, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath} message MerklePath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerklePath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerklePath message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePath} MerklePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerklePath.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerklePath(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.keyPath = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MerklePath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePath} MerklePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerklePath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerklePath message. + * @function verify + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerklePath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keyPath != null && message.hasOwnProperty("keyPath")) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify(message.keyPath); + if (error) + return "keyPath." + error; + } + return null; + }; + + /** + * Creates a MerklePath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePath} MerklePath + */ + MerklePath.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.MerklePath) + return object; + var message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerklePath(); + if (object.keyPath != null) { + if (typeof object.keyPath !== "object") + throw TypeError(".cosmos_sdk.x.ibc.commitment.v1.MerklePath.keyPath: object expected"); + message.keyPath = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.fromObject(object.keyPath); + } + return message; + }; + + /** + * Creates a plain object from a MerklePath message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.MerklePath} message MerklePath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerklePath.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.keyPath = null; + if (message.keyPath != null && message.hasOwnProperty("keyPath")) + object.keyPath = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.toObject(message.keyPath, options); + return object; + }; + + /** + * Converts this MerklePath to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath + * @instance + * @returns {Object.} JSON object + */ + MerklePath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MerklePath; + })(); + + v1.MerkleProof = (function() { + + /** + * Properties of a MerkleProof. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @interface IMerkleProof + * @property {tendermint.crypto.merkle.IProof|null} [proof] MerkleProof proof + */ + + /** + * Constructs a new MerkleProof. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @classdesc Represents a MerkleProof. + * @implements IMerkleProof + * @constructor + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof=} [properties] Properties to set + */ + function MerkleProof(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MerkleProof proof. + * @member {tendermint.crypto.merkle.IProof|null|undefined} proof + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @instance + */ + MerkleProof.prototype.proof = null; + + /** + * Creates a new MerkleProof instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} MerkleProof instance + */ + MerkleProof.create = function create(properties) { + return new MerkleProof(properties); + }; + + /** + * Encodes the specified MerkleProof message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof} message MerkleProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerkleProof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.merkle.Proof.encode(message.proof, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof} message MerkleProof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MerkleProof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MerkleProof message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} MerkleProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerkleProof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.proof = $root.tendermint.crypto.merkle.Proof.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MerkleProof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} MerkleProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MerkleProof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MerkleProof message. + * @function verify + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MerkleProof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.tendermint.crypto.merkle.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + return null; + }; + + /** + * Creates a MerkleProof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} MerkleProof + */ + MerkleProof.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof) + return object; + var message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof(); + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".cosmos_sdk.x.ibc.commitment.v1.MerkleProof.proof: object expected"); + message.proof = $root.tendermint.crypto.merkle.Proof.fromObject(object.proof); + } + return message; + }; + + /** + * Creates a plain object from a MerkleProof message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} message MerkleProof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MerkleProof.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.proof = null; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.merkle.Proof.toObject(message.proof, options); + return object; + }; + + /** + * Converts this MerkleProof to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof + * @instance + * @returns {Object.} JSON object + */ + MerkleProof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MerkleProof; + })(); + + v1.KeyPath = (function() { + + /** + * Properties of a KeyPath. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @interface IKeyPath + * @property {Array.|null} [keys] KeyPath keys + */ + + /** + * Constructs a new KeyPath. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @classdesc Represents a KeyPath. + * @implements IKeyPath + * @constructor + * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath=} [properties] Properties to set + */ + function KeyPath(properties) { + this.keys = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyPath keys. + * @member {Array.} keys + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @instance + */ + KeyPath.prototype.keys = $util.emptyArray; + + /** + * Creates a new KeyPath instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.commitment.v1.KeyPath} KeyPath instance + */ + KeyPath.create = function create(properties) { + return new KeyPath(properties); + }; + + /** + * Encodes the specified KeyPath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath} message KeyPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyPath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keys != null && message.keys.length) + for (var i = 0; i < message.keys.length; ++i) + $root.cosmos_sdk.x.ibc.commitment.v1.Key.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KeyPath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath} message KeyPath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyPath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyPath message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.commitment.v1.KeyPath} KeyPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyPath.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.cosmos_sdk.x.ibc.commitment.v1.Key.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KeyPath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.commitment.v1.KeyPath} KeyPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyPath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyPath message. + * @function verify + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyPath.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.keys != null && message.hasOwnProperty("keys")) { + if (!Array.isArray(message.keys)) + return "keys: array expected"; + for (var i = 0; i < message.keys.length; ++i) { + var error = $root.cosmos_sdk.x.ibc.commitment.v1.Key.verify(message.keys[i]); + if (error) + return "keys." + error; + } + } + return null; + }; + + /** + * Creates a KeyPath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.commitment.v1.KeyPath} KeyPath + */ + KeyPath.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath) + return object; + var message = new $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath(); + if (object.keys) { + if (!Array.isArray(object.keys)) + throw TypeError(".cosmos_sdk.x.ibc.commitment.v1.KeyPath.keys: array expected"); + message.keys = []; + for (var i = 0; i < object.keys.length; ++i) { + if (typeof object.keys[i] !== "object") + throw TypeError(".cosmos_sdk.x.ibc.commitment.v1.KeyPath.keys: object expected"); + message.keys[i] = $root.cosmos_sdk.x.ibc.commitment.v1.Key.fromObject(object.keys[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a KeyPath message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.KeyPath} message KeyPath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyPath.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.keys = []; + if (message.keys && message.keys.length) { + object.keys = []; + for (var j = 0; j < message.keys.length; ++j) + object.keys[j] = $root.cosmos_sdk.x.ibc.commitment.v1.Key.toObject(message.keys[j], options); + } + return object; + }; + + /** + * Converts this KeyPath to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath + * @instance + * @returns {Object.} JSON object + */ + KeyPath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KeyPath; + })(); + + v1.Key = (function() { + + /** + * Properties of a Key. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @interface IKey + * @property {Uint8Array|null} [name] Key name + * @property {cosmos_sdk.x.ibc.commitment.v1.KeyEncoding|null} [enc] Key enc + */ + + /** + * Constructs a new Key. + * @memberof cosmos_sdk.x.ibc.commitment.v1 + * @classdesc Represents a Key. + * @implements IKey + * @constructor + * @param {cosmos_sdk.x.ibc.commitment.v1.IKey=} [properties] Properties to set + */ + function Key(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Key name. + * @member {Uint8Array} name + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @instance + */ + Key.prototype.name = $util.newBuffer([]); + + /** + * Key enc. + * @member {cosmos_sdk.x.ibc.commitment.v1.KeyEncoding} enc + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @instance + */ + Key.prototype.enc = 0; + + /** + * Creates a new Key instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IKey=} [properties] Properties to set + * @returns {cosmos_sdk.x.ibc.commitment.v1.Key} Key instance + */ + Key.create = function create(properties) { + return new Key(properties); + }; + + /** + * Encodes the specified Key message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IKey} message Key message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Key.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.name); + if (message.enc != null && Object.hasOwnProperty.call(message, "enc")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enc); + return writer; + }; + + /** + * Encodes the specified Key message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.IKey} message Key message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Key.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Key message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.ibc.commitment.v1.Key} Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Key.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.Key(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.bytes(); + break; + case 2: + message.enc = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Key message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.ibc.commitment.v1.Key} Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Key.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Key message. + * @function verify + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Key.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!(message.name && typeof message.name.length === "number" || $util.isString(message.name))) + return "name: buffer expected"; + if (message.enc != null && message.hasOwnProperty("enc")) + switch (message.enc) { + default: + return "enc: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a Key message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.ibc.commitment.v1.Key} Key + */ + Key.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.Key) + return object; + var message = new $root.cosmos_sdk.x.ibc.commitment.v1.Key(); + if (object.name != null) + if (typeof object.name === "string") + $util.base64.decode(object.name, message.name = $util.newBuffer($util.base64.length(object.name)), 0); + else if (object.name.length) + message.name = object.name; + switch (object.enc) { + case "KEY_ENCODING_URL_UNSPECIFIED": + case 0: + message.enc = 0; + break; + case "KEY_ENCODING_HEX": + case 1: + message.enc = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a Key message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @static + * @param {cosmos_sdk.x.ibc.commitment.v1.Key} message Key + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Key.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.name = ""; + else { + object.name = []; + if (options.bytes !== Array) + object.name = $util.newBuffer(object.name); + } + object.enc = options.enums === String ? "KEY_ENCODING_URL_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = options.bytes === String ? $util.base64.encode(message.name, 0, message.name.length) : options.bytes === Array ? Array.prototype.slice.call(message.name) : message.name; + if (message.enc != null && message.hasOwnProperty("enc")) + object.enc = options.enums === String ? $root.cosmos_sdk.x.ibc.commitment.v1.KeyEncoding[message.enc] : message.enc; + return object; + }; + + /** + * Converts this Key to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.ibc.commitment.v1.Key + * @instance + * @returns {Object.} JSON object + */ + Key.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Key; + })(); + + /** + * KeyEncoding enum. + * @name cosmos_sdk.x.ibc.commitment.v1.KeyEncoding + * @enum {number} + * @property {number} KEY_ENCODING_URL_UNSPECIFIED=0 KEY_ENCODING_URL_UNSPECIFIED value + * @property {number} KEY_ENCODING_HEX=1 KEY_ENCODING_HEX value + */ + v1.KeyEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KEY_ENCODING_URL_UNSPECIFIED"] = 0; + values[valuesById[1] = "KEY_ENCODING_HEX"] = 1; + return values; + })(); + + return v1; + })(); + + return commitment; + })(); + + return ibc; + })(); + + x.mint = (function() { + + /** + * Namespace mint. + * @memberof cosmos_sdk.x + * @namespace + */ + var mint = {}; + + mint.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.mint + * @namespace + */ + var v1 = {}; + + v1.Minter = (function() { + + /** + * Properties of a Minter. + * @memberof cosmos_sdk.x.mint.v1 + * @interface IMinter + * @property {string|null} [inflation] Minter inflation + * @property {string|null} [annualProvisions] Minter annualProvisions + */ + + /** + * Constructs a new Minter. + * @memberof cosmos_sdk.x.mint.v1 + * @classdesc Represents a Minter. + * @implements IMinter + * @constructor + * @param {cosmos_sdk.x.mint.v1.IMinter=} [properties] Properties to set + */ + function Minter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Minter inflation. + * @member {string} inflation + * @memberof cosmos_sdk.x.mint.v1.Minter + * @instance + */ + Minter.prototype.inflation = ""; + + /** + * Minter annualProvisions. + * @member {string} annualProvisions + * @memberof cosmos_sdk.x.mint.v1.Minter + * @instance + */ + Minter.prototype.annualProvisions = ""; + + /** + * Creates a new Minter instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.mint.v1.Minter + * @static + * @param {cosmos_sdk.x.mint.v1.IMinter=} [properties] Properties to set + * @returns {cosmos_sdk.x.mint.v1.Minter} Minter instance + */ + Minter.create = function create(properties) { + return new Minter(properties); + }; + + /** + * Encodes the specified Minter message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.mint.v1.Minter + * @static + * @param {cosmos_sdk.x.mint.v1.IMinter} message Minter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Minter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inflation != null && Object.hasOwnProperty.call(message, "inflation")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inflation); + if (message.annualProvisions != null && Object.hasOwnProperty.call(message, "annualProvisions")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.annualProvisions); + return writer; + }; + + /** + * Encodes the specified Minter message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.mint.v1.Minter + * @static + * @param {cosmos_sdk.x.mint.v1.IMinter} message Minter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Minter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Minter message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.mint.v1.Minter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.mint.v1.Minter} Minter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Minter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.mint.v1.Minter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.inflation = reader.string(); + break; + case 2: + message.annualProvisions = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Minter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.mint.v1.Minter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.mint.v1.Minter} Minter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Minter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Minter message. + * @function verify + * @memberof cosmos_sdk.x.mint.v1.Minter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Minter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inflation != null && message.hasOwnProperty("inflation")) + if (!$util.isString(message.inflation)) + return "inflation: string expected"; + if (message.annualProvisions != null && message.hasOwnProperty("annualProvisions")) + if (!$util.isString(message.annualProvisions)) + return "annualProvisions: string expected"; + return null; + }; + + /** + * Creates a Minter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.mint.v1.Minter + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.mint.v1.Minter} Minter + */ + Minter.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.mint.v1.Minter) + return object; + var message = new $root.cosmos_sdk.x.mint.v1.Minter(); + if (object.inflation != null) + message.inflation = String(object.inflation); + if (object.annualProvisions != null) + message.annualProvisions = String(object.annualProvisions); + return message; + }; + + /** + * Creates a plain object from a Minter message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.mint.v1.Minter + * @static + * @param {cosmos_sdk.x.mint.v1.Minter} message Minter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Minter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inflation = ""; + object.annualProvisions = ""; + } + if (message.inflation != null && message.hasOwnProperty("inflation")) + object.inflation = message.inflation; + if (message.annualProvisions != null && message.hasOwnProperty("annualProvisions")) + object.annualProvisions = message.annualProvisions; + return object; + }; + + /** + * Converts this Minter to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.mint.v1.Minter + * @instance + * @returns {Object.} JSON object + */ + Minter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Minter; + })(); + + v1.Params = (function() { + + /** + * Properties of a Params. + * @memberof cosmos_sdk.x.mint.v1 + * @interface IParams + * @property {string|null} [mintDenom] Params mintDenom + * @property {string|null} [inflationRateChange] Params inflationRateChange + * @property {string|null} [inflationMax] Params inflationMax + * @property {string|null} [inflationMin] Params inflationMin + * @property {string|null} [goalBonded] Params goalBonded + * @property {number|Long|null} [blocksPerYear] Params blocksPerYear + */ + + /** + * Constructs a new Params. + * @memberof cosmos_sdk.x.mint.v1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos_sdk.x.mint.v1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params mintDenom. + * @member {string} mintDenom + * @memberof cosmos_sdk.x.mint.v1.Params + * @instance + */ + Params.prototype.mintDenom = ""; + + /** + * Params inflationRateChange. + * @member {string} inflationRateChange + * @memberof cosmos_sdk.x.mint.v1.Params + * @instance + */ + Params.prototype.inflationRateChange = ""; + + /** + * Params inflationMax. + * @member {string} inflationMax + * @memberof cosmos_sdk.x.mint.v1.Params + * @instance + */ + Params.prototype.inflationMax = ""; + + /** + * Params inflationMin. + * @member {string} inflationMin + * @memberof cosmos_sdk.x.mint.v1.Params + * @instance + */ + Params.prototype.inflationMin = ""; + + /** + * Params goalBonded. + * @member {string} goalBonded + * @memberof cosmos_sdk.x.mint.v1.Params + * @instance + */ + Params.prototype.goalBonded = ""; + + /** + * Params blocksPerYear. + * @member {number|Long} blocksPerYear + * @memberof cosmos_sdk.x.mint.v1.Params + * @instance + */ + Params.prototype.blocksPerYear = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.mint.v1.Params + * @static + * @param {cosmos_sdk.x.mint.v1.IParams=} [properties] Properties to set + * @returns {cosmos_sdk.x.mint.v1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.mint.v1.Params + * @static + * @param {cosmos_sdk.x.mint.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mintDenom != null && Object.hasOwnProperty.call(message, "mintDenom")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.mintDenom); + if (message.inflationRateChange != null && Object.hasOwnProperty.call(message, "inflationRateChange")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inflationRateChange); + if (message.inflationMax != null && Object.hasOwnProperty.call(message, "inflationMax")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.inflationMax); + if (message.inflationMin != null && Object.hasOwnProperty.call(message, "inflationMin")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.inflationMin); + if (message.goalBonded != null && Object.hasOwnProperty.call(message, "goalBonded")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.goalBonded); + if (message.blocksPerYear != null && Object.hasOwnProperty.call(message, "blocksPerYear")) + writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.blocksPerYear); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.mint.v1.Params + * @static + * @param {cosmos_sdk.x.mint.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.mint.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.mint.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.mint.v1.Params(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.mintDenom = reader.string(); + break; + case 2: + message.inflationRateChange = reader.string(); + break; + case 3: + message.inflationMax = reader.string(); + break; + case 4: + message.inflationMin = reader.string(); + break; + case 5: + message.goalBonded = reader.string(); + break; + case 6: + message.blocksPerYear = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.mint.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.mint.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos_sdk.x.mint.v1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.mintDenom != null && message.hasOwnProperty("mintDenom")) + if (!$util.isString(message.mintDenom)) + return "mintDenom: string expected"; + if (message.inflationRateChange != null && message.hasOwnProperty("inflationRateChange")) + if (!$util.isString(message.inflationRateChange)) + return "inflationRateChange: string expected"; + if (message.inflationMax != null && message.hasOwnProperty("inflationMax")) + if (!$util.isString(message.inflationMax)) + return "inflationMax: string expected"; + if (message.inflationMin != null && message.hasOwnProperty("inflationMin")) + if (!$util.isString(message.inflationMin)) + return "inflationMin: string expected"; + if (message.goalBonded != null && message.hasOwnProperty("goalBonded")) + if (!$util.isString(message.goalBonded)) + return "goalBonded: string expected"; + if (message.blocksPerYear != null && message.hasOwnProperty("blocksPerYear")) + if (!$util.isInteger(message.blocksPerYear) && !(message.blocksPerYear && $util.isInteger(message.blocksPerYear.low) && $util.isInteger(message.blocksPerYear.high))) + return "blocksPerYear: integer|Long expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.mint.v1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.mint.v1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.mint.v1.Params) + return object; + var message = new $root.cosmos_sdk.x.mint.v1.Params(); + if (object.mintDenom != null) + message.mintDenom = String(object.mintDenom); + if (object.inflationRateChange != null) + message.inflationRateChange = String(object.inflationRateChange); + if (object.inflationMax != null) + message.inflationMax = String(object.inflationMax); + if (object.inflationMin != null) + message.inflationMin = String(object.inflationMin); + if (object.goalBonded != null) + message.goalBonded = String(object.goalBonded); + if (object.blocksPerYear != null) + if ($util.Long) + (message.blocksPerYear = $util.Long.fromValue(object.blocksPerYear)).unsigned = true; + else if (typeof object.blocksPerYear === "string") + message.blocksPerYear = parseInt(object.blocksPerYear, 10); + else if (typeof object.blocksPerYear === "number") + message.blocksPerYear = object.blocksPerYear; + else if (typeof object.blocksPerYear === "object") + message.blocksPerYear = new $util.LongBits(object.blocksPerYear.low >>> 0, object.blocksPerYear.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.mint.v1.Params + * @static + * @param {cosmos_sdk.x.mint.v1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.mintDenom = ""; + object.inflationRateChange = ""; + object.inflationMax = ""; + object.inflationMin = ""; + object.goalBonded = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.blocksPerYear = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blocksPerYear = options.longs === String ? "0" : 0; + } + if (message.mintDenom != null && message.hasOwnProperty("mintDenom")) + object.mintDenom = message.mintDenom; + if (message.inflationRateChange != null && message.hasOwnProperty("inflationRateChange")) + object.inflationRateChange = message.inflationRateChange; + if (message.inflationMax != null && message.hasOwnProperty("inflationMax")) + object.inflationMax = message.inflationMax; + if (message.inflationMin != null && message.hasOwnProperty("inflationMin")) + object.inflationMin = message.inflationMin; + if (message.goalBonded != null && message.hasOwnProperty("goalBonded")) + object.goalBonded = message.goalBonded; + if (message.blocksPerYear != null && message.hasOwnProperty("blocksPerYear")) + if (typeof message.blocksPerYear === "number") + object.blocksPerYear = options.longs === String ? String(message.blocksPerYear) : message.blocksPerYear; + else + object.blocksPerYear = options.longs === String ? $util.Long.prototype.toString.call(message.blocksPerYear) : options.longs === Number ? new $util.LongBits(message.blocksPerYear.low >>> 0, message.blocksPerYear.high >>> 0).toNumber(true) : message.blocksPerYear; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.mint.v1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(); + + return v1; + })(); + + return mint; + })(); + + x.params = (function() { + + /** + * Namespace params. + * @memberof cosmos_sdk.x + * @namespace + */ + var params = {}; + + params.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.params + * @namespace + */ + var v1 = {}; + + v1.ParameterChangeProposal = (function() { + + /** + * Properties of a ParameterChangeProposal. + * @memberof cosmos_sdk.x.params.v1 + * @interface IParameterChangeProposal + * @property {string|null} [title] ParameterChangeProposal title + * @property {string|null} [description] ParameterChangeProposal description + * @property {Array.|null} [changes] ParameterChangeProposal changes + */ + + /** + * Constructs a new ParameterChangeProposal. + * @memberof cosmos_sdk.x.params.v1 + * @classdesc Represents a ParameterChangeProposal. + * @implements IParameterChangeProposal + * @constructor + * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal=} [properties] Properties to set + */ + function ParameterChangeProposal(properties) { + this.changes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParameterChangeProposal title. + * @member {string} title + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @instance + */ + ParameterChangeProposal.prototype.title = ""; + + /** + * ParameterChangeProposal description. + * @member {string} description + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @instance + */ + ParameterChangeProposal.prototype.description = ""; + + /** + * ParameterChangeProposal changes. + * @member {Array.} changes + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @instance + */ + ParameterChangeProposal.prototype.changes = $util.emptyArray; + + /** + * Creates a new ParameterChangeProposal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @static + * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal=} [properties] Properties to set + * @returns {cosmos_sdk.x.params.v1.ParameterChangeProposal} ParameterChangeProposal instance + */ + ParameterChangeProposal.create = function create(properties) { + return new ParameterChangeProposal(properties); + }; + + /** + * Encodes the specified ParameterChangeProposal message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @static + * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal} message ParameterChangeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterChangeProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.cosmos_sdk.x.params.v1.ParamChange.encode(message.changes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ParameterChangeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @static + * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal} message ParameterChangeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParameterChangeProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParameterChangeProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.params.v1.ParameterChangeProposal} ParameterChangeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterChangeProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.params.v1.ParameterChangeProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.cosmos_sdk.x.params.v1.ParamChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParameterChangeProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.params.v1.ParameterChangeProposal} ParameterChangeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParameterChangeProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParameterChangeProposal message. + * @function verify + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParameterChangeProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.changes != null && message.hasOwnProperty("changes")) { + if (!Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.cosmos_sdk.x.params.v1.ParamChange.verify(message.changes[i]); + if (error) + return "changes." + error; + } + } + return null; + }; + + /** + * Creates a ParameterChangeProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.params.v1.ParameterChangeProposal} ParameterChangeProposal + */ + ParameterChangeProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.params.v1.ParameterChangeProposal) + return object; + var message = new $root.cosmos_sdk.x.params.v1.ParameterChangeProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.changes) { + if (!Array.isArray(object.changes)) + throw TypeError(".cosmos_sdk.x.params.v1.ParameterChangeProposal.changes: array expected"); + message.changes = []; + for (var i = 0; i < object.changes.length; ++i) { + if (typeof object.changes[i] !== "object") + throw TypeError(".cosmos_sdk.x.params.v1.ParameterChangeProposal.changes: object expected"); + message.changes[i] = $root.cosmos_sdk.x.params.v1.ParamChange.fromObject(object.changes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ParameterChangeProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @static + * @param {cosmos_sdk.x.params.v1.ParameterChangeProposal} message ParameterChangeProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParameterChangeProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.defaults) { + object.title = ""; + object.description = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.changes && message.changes.length) { + object.changes = []; + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.cosmos_sdk.x.params.v1.ParamChange.toObject(message.changes[j], options); + } + return object; + }; + + /** + * Converts this ParameterChangeProposal to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal + * @instance + * @returns {Object.} JSON object + */ + ParameterChangeProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ParameterChangeProposal; + })(); + + v1.ParamChange = (function() { + + /** + * Properties of a ParamChange. + * @memberof cosmos_sdk.x.params.v1 + * @interface IParamChange + * @property {string|null} [subspace] ParamChange subspace + * @property {string|null} [key] ParamChange key + * @property {string|null} [value] ParamChange value + */ + + /** + * Constructs a new ParamChange. + * @memberof cosmos_sdk.x.params.v1 + * @classdesc Represents a ParamChange. + * @implements IParamChange + * @constructor + * @param {cosmos_sdk.x.params.v1.IParamChange=} [properties] Properties to set + */ + function ParamChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParamChange subspace. + * @member {string} subspace + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @instance + */ + ParamChange.prototype.subspace = ""; + + /** + * ParamChange key. + * @member {string} key + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @instance + */ + ParamChange.prototype.key = ""; + + /** + * ParamChange value. + * @member {string} value + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @instance + */ + ParamChange.prototype.value = ""; + + /** + * Creates a new ParamChange instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @static + * @param {cosmos_sdk.x.params.v1.IParamChange=} [properties] Properties to set + * @returns {cosmos_sdk.x.params.v1.ParamChange} ParamChange instance + */ + ParamChange.create = function create(properties) { + return new ParamChange(properties); + }; + + /** + * Encodes the specified ParamChange message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @static + * @param {cosmos_sdk.x.params.v1.IParamChange} message ParamChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParamChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subspace != null && Object.hasOwnProperty.call(message, "subspace")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subspace); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.value); + return writer; + }; + + /** + * Encodes the specified ParamChange message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @static + * @param {cosmos_sdk.x.params.v1.IParamChange} message ParamChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParamChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParamChange message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.params.v1.ParamChange} ParamChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParamChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.params.v1.ParamChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.subspace = reader.string(); + break; + case 2: + message.key = reader.string(); + break; + case 3: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParamChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.params.v1.ParamChange} ParamChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParamChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParamChange message. + * @function verify + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParamChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.subspace != null && message.hasOwnProperty("subspace")) + if (!$util.isString(message.subspace)) + return "subspace: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a ParamChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.params.v1.ParamChange} ParamChange + */ + ParamChange.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.params.v1.ParamChange) + return object; + var message = new $root.cosmos_sdk.x.params.v1.ParamChange(); + if (object.subspace != null) + message.subspace = String(object.subspace); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a ParamChange message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @static + * @param {cosmos_sdk.x.params.v1.ParamChange} message ParamChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParamChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.subspace = ""; + object.key = ""; + object.value = ""; + } + if (message.subspace != null && message.hasOwnProperty("subspace")) + object.subspace = message.subspace; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this ParamChange to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.params.v1.ParamChange + * @instance + * @returns {Object.} JSON object + */ + ParamChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ParamChange; + })(); + + return v1; + })(); + + return params; + })(); + + x.slashing = (function() { + + /** + * Namespace slashing. + * @memberof cosmos_sdk.x + * @namespace + */ + var slashing = {}; + + slashing.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.slashing + * @namespace + */ + var v1 = {}; + + v1.MsgUnjail = (function() { + + /** + * Properties of a MsgUnjail. + * @memberof cosmos_sdk.x.slashing.v1 + * @interface IMsgUnjail + * @property {Uint8Array|null} [validatorAddr] MsgUnjail validatorAddr + */ + + /** + * Constructs a new MsgUnjail. + * @memberof cosmos_sdk.x.slashing.v1 + * @classdesc Represents a MsgUnjail. + * @implements IMsgUnjail + * @constructor + * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail=} [properties] Properties to set + */ + function MsgUnjail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUnjail validatorAddr. + * @member {Uint8Array} validatorAddr + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @instance + */ + MsgUnjail.prototype.validatorAddr = $util.newBuffer([]); + + /** + * Creates a new MsgUnjail instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @static + * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail=} [properties] Properties to set + * @returns {cosmos_sdk.x.slashing.v1.MsgUnjail} MsgUnjail instance + */ + MsgUnjail.create = function create(properties) { + return new MsgUnjail(properties); + }; + + /** + * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @static + * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail} message MsgUnjail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.validatorAddr); + return writer; + }; + + /** + * Encodes the specified MsgUnjail message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @static + * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail} message MsgUnjail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUnjail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.slashing.v1.MsgUnjail} MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjail.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.slashing.v1.MsgUnjail(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validatorAddr = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.slashing.v1.MsgUnjail} MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUnjail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUnjail message. + * @function verify + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUnjail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + if (!(message.validatorAddr && typeof message.validatorAddr.length === "number" || $util.isString(message.validatorAddr))) + return "validatorAddr: buffer expected"; + return null; + }; + + /** + * Creates a MsgUnjail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.slashing.v1.MsgUnjail} MsgUnjail + */ + MsgUnjail.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.slashing.v1.MsgUnjail) + return object; + var message = new $root.cosmos_sdk.x.slashing.v1.MsgUnjail(); + if (object.validatorAddr != null) + if (typeof object.validatorAddr === "string") + $util.base64.decode(object.validatorAddr, message.validatorAddr = $util.newBuffer($util.base64.length(object.validatorAddr)), 0); + else if (object.validatorAddr.length) + message.validatorAddr = object.validatorAddr; + return message; + }; + + /** + * Creates a plain object from a MsgUnjail message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @static + * @param {cosmos_sdk.x.slashing.v1.MsgUnjail} message MsgUnjail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUnjail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.validatorAddr = ""; + else { + object.validatorAddr = []; + if (options.bytes !== Array) + object.validatorAddr = $util.newBuffer(object.validatorAddr); + } + if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) + object.validatorAddr = options.bytes === String ? $util.base64.encode(message.validatorAddr, 0, message.validatorAddr.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddr) : message.validatorAddr; + return object; + }; + + /** + * Converts this MsgUnjail to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail + * @instance + * @returns {Object.} JSON object + */ + MsgUnjail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUnjail; + })(); + + v1.ValidatorSigningInfo = (function() { + + /** + * Properties of a ValidatorSigningInfo. + * @memberof cosmos_sdk.x.slashing.v1 + * @interface IValidatorSigningInfo + * @property {Uint8Array|null} [address] ValidatorSigningInfo address + * @property {number|Long|null} [startHeight] ValidatorSigningInfo startHeight + * @property {number|Long|null} [indexOffset] ValidatorSigningInfo indexOffset + * @property {google.protobuf.ITimestamp|null} [jailedUntil] ValidatorSigningInfo jailedUntil + * @property {boolean|null} [tombstoned] ValidatorSigningInfo tombstoned + * @property {number|Long|null} [missedBlocksCounter] ValidatorSigningInfo missedBlocksCounter + */ + + /** + * Constructs a new ValidatorSigningInfo. + * @memberof cosmos_sdk.x.slashing.v1 + * @classdesc Represents a ValidatorSigningInfo. + * @implements IValidatorSigningInfo + * @constructor + * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo=} [properties] Properties to set + */ + function ValidatorSigningInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorSigningInfo address. + * @member {Uint8Array} address + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.address = $util.newBuffer([]); + + /** + * ValidatorSigningInfo startHeight. + * @member {number|Long} startHeight + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.startHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ValidatorSigningInfo indexOffset. + * @member {number|Long} indexOffset + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.indexOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ValidatorSigningInfo jailedUntil. + * @member {google.protobuf.ITimestamp|null|undefined} jailedUntil + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.jailedUntil = null; + + /** + * ValidatorSigningInfo tombstoned. + * @member {boolean} tombstoned + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.tombstoned = false; + + /** + * ValidatorSigningInfo missedBlocksCounter. + * @member {number|Long} missedBlocksCounter + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @instance + */ + ValidatorSigningInfo.prototype.missedBlocksCounter = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValidatorSigningInfo instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @static + * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo=} [properties] Properties to set + * @returns {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} ValidatorSigningInfo instance + */ + ValidatorSigningInfo.create = function create(properties) { + return new ValidatorSigningInfo(properties); + }; + + /** + * Encodes the specified ValidatorSigningInfo message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @static + * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo} message ValidatorSigningInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSigningInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.startHeight != null && Object.hasOwnProperty.call(message, "startHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.startHeight); + if (message.indexOffset != null && Object.hasOwnProperty.call(message, "indexOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.indexOffset); + if (message.jailedUntil != null && Object.hasOwnProperty.call(message, "jailedUntil")) + $root.google.protobuf.Timestamp.encode(message.jailedUntil, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.tombstoned != null && Object.hasOwnProperty.call(message, "tombstoned")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.tombstoned); + if (message.missedBlocksCounter != null && Object.hasOwnProperty.call(message, "missedBlocksCounter")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.missedBlocksCounter); + return writer; + }; + + /** + * Encodes the specified ValidatorSigningInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @static + * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo} message ValidatorSigningInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorSigningInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorSigningInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} ValidatorSigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSigningInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.slashing.v1.ValidatorSigningInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + message.startHeight = reader.int64(); + break; + case 3: + message.indexOffset = reader.int64(); + break; + case 4: + message.jailedUntil = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.tombstoned = reader.bool(); + break; + case 6: + message.missedBlocksCounter = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorSigningInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} ValidatorSigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorSigningInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorSigningInfo message. + * @function verify + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorSigningInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.startHeight != null && message.hasOwnProperty("startHeight")) + if (!$util.isInteger(message.startHeight) && !(message.startHeight && $util.isInteger(message.startHeight.low) && $util.isInteger(message.startHeight.high))) + return "startHeight: integer|Long expected"; + if (message.indexOffset != null && message.hasOwnProperty("indexOffset")) + if (!$util.isInteger(message.indexOffset) && !(message.indexOffset && $util.isInteger(message.indexOffset.low) && $util.isInteger(message.indexOffset.high))) + return "indexOffset: integer|Long expected"; + if (message.jailedUntil != null && message.hasOwnProperty("jailedUntil")) { + var error = $root.google.protobuf.Timestamp.verify(message.jailedUntil); + if (error) + return "jailedUntil." + error; + } + if (message.tombstoned != null && message.hasOwnProperty("tombstoned")) + if (typeof message.tombstoned !== "boolean") + return "tombstoned: boolean expected"; + if (message.missedBlocksCounter != null && message.hasOwnProperty("missedBlocksCounter")) + if (!$util.isInteger(message.missedBlocksCounter) && !(message.missedBlocksCounter && $util.isInteger(message.missedBlocksCounter.low) && $util.isInteger(message.missedBlocksCounter.high))) + return "missedBlocksCounter: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorSigningInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} ValidatorSigningInfo + */ + ValidatorSigningInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.slashing.v1.ValidatorSigningInfo) + return object; + var message = new $root.cosmos_sdk.x.slashing.v1.ValidatorSigningInfo(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.startHeight != null) + if ($util.Long) + (message.startHeight = $util.Long.fromValue(object.startHeight)).unsigned = false; + else if (typeof object.startHeight === "string") + message.startHeight = parseInt(object.startHeight, 10); + else if (typeof object.startHeight === "number") + message.startHeight = object.startHeight; + else if (typeof object.startHeight === "object") + message.startHeight = new $util.LongBits(object.startHeight.low >>> 0, object.startHeight.high >>> 0).toNumber(); + if (object.indexOffset != null) + if ($util.Long) + (message.indexOffset = $util.Long.fromValue(object.indexOffset)).unsigned = false; + else if (typeof object.indexOffset === "string") + message.indexOffset = parseInt(object.indexOffset, 10); + else if (typeof object.indexOffset === "number") + message.indexOffset = object.indexOffset; + else if (typeof object.indexOffset === "object") + message.indexOffset = new $util.LongBits(object.indexOffset.low >>> 0, object.indexOffset.high >>> 0).toNumber(); + if (object.jailedUntil != null) { + if (typeof object.jailedUntil !== "object") + throw TypeError(".cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.jailedUntil: object expected"); + message.jailedUntil = $root.google.protobuf.Timestamp.fromObject(object.jailedUntil); + } + if (object.tombstoned != null) + message.tombstoned = Boolean(object.tombstoned); + if (object.missedBlocksCounter != null) + if ($util.Long) + (message.missedBlocksCounter = $util.Long.fromValue(object.missedBlocksCounter)).unsigned = false; + else if (typeof object.missedBlocksCounter === "string") + message.missedBlocksCounter = parseInt(object.missedBlocksCounter, 10); + else if (typeof object.missedBlocksCounter === "number") + message.missedBlocksCounter = object.missedBlocksCounter; + else if (typeof object.missedBlocksCounter === "object") + message.missedBlocksCounter = new $util.LongBits(object.missedBlocksCounter.low >>> 0, object.missedBlocksCounter.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValidatorSigningInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @static + * @param {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} message ValidatorSigningInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorSigningInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.startHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.indexOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.indexOffset = options.longs === String ? "0" : 0; + object.jailedUntil = null; + object.tombstoned = false; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.missedBlocksCounter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.missedBlocksCounter = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.startHeight != null && message.hasOwnProperty("startHeight")) + if (typeof message.startHeight === "number") + object.startHeight = options.longs === String ? String(message.startHeight) : message.startHeight; + else + object.startHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startHeight) : options.longs === Number ? new $util.LongBits(message.startHeight.low >>> 0, message.startHeight.high >>> 0).toNumber() : message.startHeight; + if (message.indexOffset != null && message.hasOwnProperty("indexOffset")) + if (typeof message.indexOffset === "number") + object.indexOffset = options.longs === String ? String(message.indexOffset) : message.indexOffset; + else + object.indexOffset = options.longs === String ? $util.Long.prototype.toString.call(message.indexOffset) : options.longs === Number ? new $util.LongBits(message.indexOffset.low >>> 0, message.indexOffset.high >>> 0).toNumber() : message.indexOffset; + if (message.jailedUntil != null && message.hasOwnProperty("jailedUntil")) + object.jailedUntil = $root.google.protobuf.Timestamp.toObject(message.jailedUntil, options); + if (message.tombstoned != null && message.hasOwnProperty("tombstoned")) + object.tombstoned = message.tombstoned; + if (message.missedBlocksCounter != null && message.hasOwnProperty("missedBlocksCounter")) + if (typeof message.missedBlocksCounter === "number") + object.missedBlocksCounter = options.longs === String ? String(message.missedBlocksCounter) : message.missedBlocksCounter; + else + object.missedBlocksCounter = options.longs === String ? $util.Long.prototype.toString.call(message.missedBlocksCounter) : options.longs === Number ? new $util.LongBits(message.missedBlocksCounter.low >>> 0, message.missedBlocksCounter.high >>> 0).toNumber() : message.missedBlocksCounter; + return object; + }; + + /** + * Converts this ValidatorSigningInfo to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo + * @instance + * @returns {Object.} JSON object + */ + ValidatorSigningInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorSigningInfo; + })(); + + return v1; + })(); + + return slashing; + })(); + + x.staking = (function() { + + /** + * Namespace staking. + * @memberof cosmos_sdk.x + * @namespace + */ + var staking = {}; + + staking.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.staking + * @namespace + */ + var v1 = {}; + + v1.MsgCreateValidator = (function() { + + /** + * Properties of a MsgCreateValidator. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IMsgCreateValidator + * @property {cosmos_sdk.x.staking.v1.IDescription|null} [description] MsgCreateValidator description + * @property {cosmos_sdk.x.staking.v1.ICommissionRates|null} [commission] MsgCreateValidator commission + * @property {string|null} [minSelfDelegation] MsgCreateValidator minSelfDelegation + * @property {Uint8Array|null} [delegatorAddress] MsgCreateValidator delegatorAddress + * @property {Uint8Array|null} [validatorAddress] MsgCreateValidator validatorAddress + * @property {string|null} [pubkey] MsgCreateValidator pubkey + * @property {cosmos_sdk.v1.ICoin|null} [value] MsgCreateValidator value + */ + + /** + * Constructs a new MsgCreateValidator. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a MsgCreateValidator. + * @implements IMsgCreateValidator + * @constructor + * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator=} [properties] Properties to set + */ + function MsgCreateValidator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateValidator description. + * @member {cosmos_sdk.x.staking.v1.IDescription|null|undefined} description + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.description = null; + + /** + * MsgCreateValidator commission. + * @member {cosmos_sdk.x.staking.v1.ICommissionRates|null|undefined} commission + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.commission = null; + + /** + * MsgCreateValidator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.minSelfDelegation = ""; + + /** + * MsgCreateValidator delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * MsgCreateValidator validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.validatorAddress = $util.newBuffer([]); + + /** + * MsgCreateValidator pubkey. + * @member {string} pubkey + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.pubkey = ""; + + /** + * MsgCreateValidator value. + * @member {cosmos_sdk.v1.ICoin|null|undefined} value + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @instance + */ + MsgCreateValidator.prototype.value = null; + + /** + * Creates a new MsgCreateValidator instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.MsgCreateValidator} MsgCreateValidator instance + */ + MsgCreateValidator.create = function create(properties) { + return new MsgCreateValidator(properties); + }; + + /** + * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos_sdk.x.staking.v1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) + $root.cosmos_sdk.x.staking.v1.CommissionRates.encode(message.commission, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.minSelfDelegation); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.validatorAddress); + if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pubkey); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.cosmos_sdk.v1.Coin.encode(message.value, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgCreateValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.MsgCreateValidator} MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgCreateValidator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = $root.cosmos_sdk.x.staking.v1.Description.decode(reader, reader.uint32()); + break; + case 2: + message.commission = $root.cosmos_sdk.x.staking.v1.CommissionRates.decode(reader, reader.uint32()); + break; + case 3: + message.minSelfDelegation = reader.string(); + break; + case 4: + message.delegatorAddress = reader.bytes(); + break; + case 5: + message.validatorAddress = reader.bytes(); + break; + case 6: + message.pubkey = reader.string(); + break; + case 7: + message.value = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.MsgCreateValidator} MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateValidator message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.cosmos_sdk.x.staking.v1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.commission != null && message.hasOwnProperty("commission")) { + var error = $root.cosmos_sdk.x.staking.v1.CommissionRates.verify(message.commission); + if (error) + return "commission." + error; + } + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.pubkey != null && message.hasOwnProperty("pubkey")) + if (!$util.isString(message.pubkey)) + return "pubkey: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a MsgCreateValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.MsgCreateValidator} MsgCreateValidator + */ + MsgCreateValidator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgCreateValidator) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.MsgCreateValidator(); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.MsgCreateValidator.description: object expected"); + message.description = $root.cosmos_sdk.x.staking.v1.Description.fromObject(object.description); + } + if (object.commission != null) { + if (typeof object.commission !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.MsgCreateValidator.commission: object expected"); + message.commission = $root.cosmos_sdk.x.staking.v1.CommissionRates.fromObject(object.commission); + } + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.pubkey != null) + message.pubkey = String(object.pubkey); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.MsgCreateValidator.value: object expected"); + message.value = $root.cosmos_sdk.v1.Coin.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a MsgCreateValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @static + * @param {cosmos_sdk.x.staking.v1.MsgCreateValidator} message MsgCreateValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = null; + object.commission = null; + object.minSelfDelegation = ""; + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.pubkey = ""; + object.value = null; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos_sdk.x.staking.v1.Description.toObject(message.description, options); + if (message.commission != null && message.hasOwnProperty("commission")) + object.commission = $root.cosmos_sdk.x.staking.v1.CommissionRates.toObject(message.commission, options); + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.pubkey != null && message.hasOwnProperty("pubkey")) + object.pubkey = message.pubkey; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.cosmos_sdk.v1.Coin.toObject(message.value, options); + return object; + }; + + /** + * Converts this MsgCreateValidator to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator + * @instance + * @returns {Object.} JSON object + */ + MsgCreateValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateValidator; + })(); + + v1.MsgEditValidator = (function() { + + /** + * Properties of a MsgEditValidator. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IMsgEditValidator + * @property {cosmos_sdk.x.staking.v1.IDescription|null} [description] MsgEditValidator description + * @property {Uint8Array|null} [validatorAddress] MsgEditValidator validatorAddress + * @property {string|null} [commissionRate] MsgEditValidator commissionRate + * @property {string|null} [minSelfDelegation] MsgEditValidator minSelfDelegation + */ + + /** + * Constructs a new MsgEditValidator. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a MsgEditValidator. + * @implements IMsgEditValidator + * @constructor + * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator=} [properties] Properties to set + */ + function MsgEditValidator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgEditValidator description. + * @member {cosmos_sdk.x.staking.v1.IDescription|null|undefined} description + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.description = null; + + /** + * MsgEditValidator validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.validatorAddress = $util.newBuffer([]); + + /** + * MsgEditValidator commissionRate. + * @member {string} commissionRate + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.commissionRate = ""; + + /** + * MsgEditValidator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @instance + */ + MsgEditValidator.prototype.minSelfDelegation = ""; + + /** + * Creates a new MsgEditValidator instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.MsgEditValidator} MsgEditValidator instance + */ + MsgEditValidator.create = function create(properties) { + return new MsgEditValidator(properties); + }; + + /** + * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator} message MsgEditValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos_sdk.x.staking.v1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + if (message.commissionRate != null && Object.hasOwnProperty.call(message, "commissionRate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.commissionRate); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.minSelfDelegation); + return writer; + }; + + /** + * Encodes the specified MsgEditValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator} message MsgEditValidator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgEditValidator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.MsgEditValidator} MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgEditValidator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.description = $root.cosmos_sdk.x.staking.v1.Description.decode(reader, reader.uint32()); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.commissionRate = reader.string(); + break; + case 4: + message.minSelfDelegation = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.MsgEditValidator} MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgEditValidator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgEditValidator message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgEditValidator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.cosmos_sdk.x.staking.v1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) + if (!$util.isString(message.commissionRate)) + return "commissionRate: string expected"; + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + return null; + }; + + /** + * Creates a MsgEditValidator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.MsgEditValidator} MsgEditValidator + */ + MsgEditValidator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgEditValidator) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.MsgEditValidator(); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.MsgEditValidator.description: object expected"); + message.description = $root.cosmos_sdk.x.staking.v1.Description.fromObject(object.description); + } + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.commissionRate != null) + message.commissionRate = String(object.commissionRate); + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + return message; + }; + + /** + * Creates a plain object from a MsgEditValidator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @static + * @param {cosmos_sdk.x.staking.v1.MsgEditValidator} message MsgEditValidator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgEditValidator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = null; + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.commissionRate = ""; + object.minSelfDelegation = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos_sdk.x.staking.v1.Description.toObject(message.description, options); + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) + object.commissionRate = message.commissionRate; + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + return object; + }; + + /** + * Converts this MsgEditValidator to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator + * @instance + * @returns {Object.} JSON object + */ + MsgEditValidator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgEditValidator; + })(); + + v1.MsgDelegate = (function() { + + /** + * Properties of a MsgDelegate. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IMsgDelegate + * @property {Uint8Array|null} [delegatorAddress] MsgDelegate delegatorAddress + * @property {Uint8Array|null} [validatorAddress] MsgDelegate validatorAddress + * @property {cosmos_sdk.v1.ICoin|null} [amount] MsgDelegate amount + */ + + /** + * Constructs a new MsgDelegate. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a MsgDelegate. + * @implements IMsgDelegate + * @constructor + * @param {cosmos_sdk.x.staking.v1.IMsgDelegate=} [properties] Properties to set + */ + function MsgDelegate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgDelegate delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * MsgDelegate validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.validatorAddress = $util.newBuffer([]); + + /** + * MsgDelegate amount. + * @member {cosmos_sdk.v1.ICoin|null|undefined} amount + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @instance + */ + MsgDelegate.prototype.amount = null; + + /** + * Creates a new MsgDelegate instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgDelegate=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.MsgDelegate} MsgDelegate instance + */ + MsgDelegate.create = function create(properties) { + return new MsgDelegate(properties); + }; + + /** + * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgDelegate} message MsgDelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos_sdk.v1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgDelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgDelegate} message MsgDelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgDelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.MsgDelegate} MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgDelegate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.amount = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.MsgDelegate} MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgDelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgDelegate message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgDelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgDelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.MsgDelegate} MsgDelegate + */ + MsgDelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgDelegate) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.MsgDelegate(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.MsgDelegate.amount: object expected"); + message.amount = $root.cosmos_sdk.v1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgDelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @static + * @param {cosmos_sdk.x.staking.v1.MsgDelegate} message MsgDelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgDelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos_sdk.v1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgDelegate to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.MsgDelegate + * @instance + * @returns {Object.} JSON object + */ + MsgDelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgDelegate; + })(); + + v1.MsgBeginRedelegate = (function() { + + /** + * Properties of a MsgBeginRedelegate. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IMsgBeginRedelegate + * @property {Uint8Array|null} [delegatorAddress] MsgBeginRedelegate delegatorAddress + * @property {Uint8Array|null} [validatorSrcAddress] MsgBeginRedelegate validatorSrcAddress + * @property {Uint8Array|null} [validatorDstAddress] MsgBeginRedelegate validatorDstAddress + * @property {cosmos_sdk.v1.ICoin|null} [amount] MsgBeginRedelegate amount + */ + + /** + * Constructs a new MsgBeginRedelegate. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a MsgBeginRedelegate. + * @implements IMsgBeginRedelegate + * @constructor + * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate=} [properties] Properties to set + */ + function MsgBeginRedelegate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgBeginRedelegate delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * MsgBeginRedelegate validatorSrcAddress. + * @member {Uint8Array} validatorSrcAddress + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.validatorSrcAddress = $util.newBuffer([]); + + /** + * MsgBeginRedelegate validatorDstAddress. + * @member {Uint8Array} validatorDstAddress + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.validatorDstAddress = $util.newBuffer([]); + + /** + * MsgBeginRedelegate amount. + * @member {cosmos_sdk.v1.ICoin|null|undefined} amount + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @instance + */ + MsgBeginRedelegate.prototype.amount = null; + + /** + * Creates a new MsgBeginRedelegate instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} MsgBeginRedelegate instance + */ + MsgBeginRedelegate.create = function create(properties) { + return new MsgBeginRedelegate(properties); + }; + + /** + * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.validatorDstAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos_sdk.v1.Coin.encode(message.amount, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgBeginRedelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgBeginRedelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgBeginRedelegate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.validatorSrcAddress = reader.bytes(); + break; + case 3: + message.validatorDstAddress = reader.bytes(); + break; + case 4: + message.amount = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgBeginRedelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgBeginRedelegate message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgBeginRedelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!(message.validatorSrcAddress && typeof message.validatorSrcAddress.length === "number" || $util.isString(message.validatorSrcAddress))) + return "validatorSrcAddress: buffer expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!(message.validatorDstAddress && typeof message.validatorDstAddress.length === "number" || $util.isString(message.validatorDstAddress))) + return "validatorDstAddress: buffer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgBeginRedelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} MsgBeginRedelegate + */ + MsgBeginRedelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgBeginRedelegate) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.MsgBeginRedelegate(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorSrcAddress != null) + if (typeof object.validatorSrcAddress === "string") + $util.base64.decode(object.validatorSrcAddress, message.validatorSrcAddress = $util.newBuffer($util.base64.length(object.validatorSrcAddress)), 0); + else if (object.validatorSrcAddress.length) + message.validatorSrcAddress = object.validatorSrcAddress; + if (object.validatorDstAddress != null) + if (typeof object.validatorDstAddress === "string") + $util.base64.decode(object.validatorDstAddress, message.validatorDstAddress = $util.newBuffer($util.base64.length(object.validatorDstAddress)), 0); + else if (object.validatorDstAddress.length) + message.validatorDstAddress = object.validatorDstAddress; + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.MsgBeginRedelegate.amount: object expected"); + message.amount = $root.cosmos_sdk.v1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgBeginRedelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @static + * @param {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} message MsgBeginRedelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgBeginRedelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorSrcAddress = ""; + else { + object.validatorSrcAddress = []; + if (options.bytes !== Array) + object.validatorSrcAddress = $util.newBuffer(object.validatorSrcAddress); + } + if (options.bytes === String) + object.validatorDstAddress = ""; + else { + object.validatorDstAddress = []; + if (options.bytes !== Array) + object.validatorDstAddress = $util.newBuffer(object.validatorDstAddress); + } + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = options.bytes === String ? $util.base64.encode(message.validatorSrcAddress, 0, message.validatorSrcAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorSrcAddress) : message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = options.bytes === String ? $util.base64.encode(message.validatorDstAddress, 0, message.validatorDstAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorDstAddress) : message.validatorDstAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos_sdk.v1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgBeginRedelegate to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate + * @instance + * @returns {Object.} JSON object + */ + MsgBeginRedelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgBeginRedelegate; + })(); + + v1.MsgUndelegate = (function() { + + /** + * Properties of a MsgUndelegate. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IMsgUndelegate + * @property {Uint8Array|null} [delegatorAddress] MsgUndelegate delegatorAddress + * @property {Uint8Array|null} [validatorAddress] MsgUndelegate validatorAddress + * @property {cosmos_sdk.v1.ICoin|null} [amount] MsgUndelegate amount + */ + + /** + * Constructs a new MsgUndelegate. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a MsgUndelegate. + * @implements IMsgUndelegate + * @constructor + * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate=} [properties] Properties to set + */ + function MsgUndelegate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgUndelegate delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * MsgUndelegate validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.validatorAddress = $util.newBuffer([]); + + /** + * MsgUndelegate amount. + * @member {cosmos_sdk.v1.ICoin|null|undefined} amount + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @instance + */ + MsgUndelegate.prototype.amount = null; + + /** + * Creates a new MsgUndelegate instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.MsgUndelegate} MsgUndelegate instance + */ + MsgUndelegate.create = function create(properties) { + return new MsgUndelegate(properties); + }; + + /** + * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate} message MsgUndelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) + $root.cosmos_sdk.v1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MsgUndelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @static + * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate} message MsgUndelegate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgUndelegate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.MsgUndelegate} MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgUndelegate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.amount = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.MsgUndelegate} MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgUndelegate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgUndelegate message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgUndelegate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.amount != null && message.hasOwnProperty("amount")) { + var error = $root.cosmos_sdk.v1.Coin.verify(message.amount); + if (error) + return "amount." + error; + } + return null; + }; + + /** + * Creates a MsgUndelegate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.MsgUndelegate} MsgUndelegate + */ + MsgUndelegate.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgUndelegate) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.MsgUndelegate(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.amount != null) { + if (typeof object.amount !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.MsgUndelegate.amount: object expected"); + message.amount = $root.cosmos_sdk.v1.Coin.fromObject(object.amount); + } + return message; + }; + + /** + * Creates a plain object from a MsgUndelegate message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @static + * @param {cosmos_sdk.x.staking.v1.MsgUndelegate} message MsgUndelegate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgUndelegate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.amount = null; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.amount != null && message.hasOwnProperty("amount")) + object.amount = $root.cosmos_sdk.v1.Coin.toObject(message.amount, options); + return object; + }; + + /** + * Converts this MsgUndelegate to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate + * @instance + * @returns {Object.} JSON object + */ + MsgUndelegate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgUndelegate; + })(); + + v1.HistoricalInfo = (function() { + + /** + * Properties of a HistoricalInfo. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IHistoricalInfo + * @property {tendermint.abci.types.IHeader|null} [header] HistoricalInfo header + * @property {Array.|null} [valset] HistoricalInfo valset + */ + + /** + * Constructs a new HistoricalInfo. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a HistoricalInfo. + * @implements IHistoricalInfo + * @constructor + * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo=} [properties] Properties to set + */ + function HistoricalInfo(properties) { + this.valset = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HistoricalInfo header. + * @member {tendermint.abci.types.IHeader|null|undefined} header + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @instance + */ + HistoricalInfo.prototype.header = null; + + /** + * HistoricalInfo valset. + * @member {Array.} valset + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @instance + */ + HistoricalInfo.prototype.valset = $util.emptyArray; + + /** + * Creates a new HistoricalInfo instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @static + * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.HistoricalInfo} HistoricalInfo instance + */ + HistoricalInfo.create = function create(properties) { + return new HistoricalInfo(properties); + }; + + /** + * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @static + * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo} message HistoricalInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistoricalInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.abci.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.valset != null && message.valset.length) + for (var i = 0; i < message.valset.length; ++i) + $root.cosmos_sdk.x.staking.v1.Validator.encode(message.valset[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HistoricalInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @static + * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo} message HistoricalInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HistoricalInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.HistoricalInfo} HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistoricalInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.HistoricalInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.header = $root.tendermint.abci.types.Header.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.valset && message.valset.length)) + message.valset = []; + message.valset.push($root.cosmos_sdk.x.staking.v1.Validator.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.HistoricalInfo} HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HistoricalInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HistoricalInfo message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HistoricalInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.abci.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.valset != null && message.hasOwnProperty("valset")) { + if (!Array.isArray(message.valset)) + return "valset: array expected"; + for (var i = 0; i < message.valset.length; ++i) { + var error = $root.cosmos_sdk.x.staking.v1.Validator.verify(message.valset[i]); + if (error) + return "valset." + error; + } + } + return null; + }; + + /** + * Creates a HistoricalInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.HistoricalInfo} HistoricalInfo + */ + HistoricalInfo.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.HistoricalInfo) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.HistoricalInfo(); + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.HistoricalInfo.header: object expected"); + message.header = $root.tendermint.abci.types.Header.fromObject(object.header); + } + if (object.valset) { + if (!Array.isArray(object.valset)) + throw TypeError(".cosmos_sdk.x.staking.v1.HistoricalInfo.valset: array expected"); + message.valset = []; + for (var i = 0; i < object.valset.length; ++i) { + if (typeof object.valset[i] !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.HistoricalInfo.valset: object expected"); + message.valset[i] = $root.cosmos_sdk.x.staking.v1.Validator.fromObject(object.valset[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HistoricalInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @static + * @param {cosmos_sdk.x.staking.v1.HistoricalInfo} message HistoricalInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HistoricalInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.valset = []; + if (options.defaults) + object.header = null; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.abci.types.Header.toObject(message.header, options); + if (message.valset && message.valset.length) { + object.valset = []; + for (var j = 0; j < message.valset.length; ++j) + object.valset[j] = $root.cosmos_sdk.x.staking.v1.Validator.toObject(message.valset[j], options); + } + return object; + }; + + /** + * Converts this HistoricalInfo to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo + * @instance + * @returns {Object.} JSON object + */ + HistoricalInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return HistoricalInfo; + })(); + + v1.CommissionRates = (function() { + + /** + * Properties of a CommissionRates. + * @memberof cosmos_sdk.x.staking.v1 + * @interface ICommissionRates + * @property {string|null} [rate] CommissionRates rate + * @property {string|null} [maxRate] CommissionRates maxRate + * @property {string|null} [maxChangeRate] CommissionRates maxChangeRate + */ + + /** + * Constructs a new CommissionRates. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a CommissionRates. + * @implements ICommissionRates + * @constructor + * @param {cosmos_sdk.x.staking.v1.ICommissionRates=} [properties] Properties to set + */ + function CommissionRates(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommissionRates rate. + * @member {string} rate + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @instance + */ + CommissionRates.prototype.rate = ""; + + /** + * CommissionRates maxRate. + * @member {string} maxRate + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @instance + */ + CommissionRates.prototype.maxRate = ""; + + /** + * CommissionRates maxChangeRate. + * @member {string} maxChangeRate + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @instance + */ + CommissionRates.prototype.maxChangeRate = ""; + + /** + * Creates a new CommissionRates instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @static + * @param {cosmos_sdk.x.staking.v1.ICommissionRates=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.CommissionRates} CommissionRates instance + */ + CommissionRates.create = function create(properties) { + return new CommissionRates(properties); + }; + + /** + * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @static + * @param {cosmos_sdk.x.staking.v1.ICommissionRates} message CommissionRates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommissionRates.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.rate); + if (message.maxRate != null && Object.hasOwnProperty.call(message, "maxRate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.maxRate); + if (message.maxChangeRate != null && Object.hasOwnProperty.call(message, "maxChangeRate")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.maxChangeRate); + return writer; + }; + + /** + * Encodes the specified CommissionRates message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @static + * @param {cosmos_sdk.x.staking.v1.ICommissionRates} message CommissionRates message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommissionRates.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommissionRates message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.CommissionRates} CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommissionRates.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.CommissionRates(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.rate = reader.string(); + break; + case 2: + message.maxRate = reader.string(); + break; + case 3: + message.maxChangeRate = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommissionRates message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.CommissionRates} CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommissionRates.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommissionRates message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommissionRates.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rate != null && message.hasOwnProperty("rate")) + if (!$util.isString(message.rate)) + return "rate: string expected"; + if (message.maxRate != null && message.hasOwnProperty("maxRate")) + if (!$util.isString(message.maxRate)) + return "maxRate: string expected"; + if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) + if (!$util.isString(message.maxChangeRate)) + return "maxChangeRate: string expected"; + return null; + }; + + /** + * Creates a CommissionRates message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.CommissionRates} CommissionRates + */ + CommissionRates.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.CommissionRates) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.CommissionRates(); + if (object.rate != null) + message.rate = String(object.rate); + if (object.maxRate != null) + message.maxRate = String(object.maxRate); + if (object.maxChangeRate != null) + message.maxChangeRate = String(object.maxChangeRate); + return message; + }; + + /** + * Creates a plain object from a CommissionRates message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @static + * @param {cosmos_sdk.x.staking.v1.CommissionRates} message CommissionRates + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommissionRates.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rate = ""; + object.maxRate = ""; + object.maxChangeRate = ""; + } + if (message.rate != null && message.hasOwnProperty("rate")) + object.rate = message.rate; + if (message.maxRate != null && message.hasOwnProperty("maxRate")) + object.maxRate = message.maxRate; + if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) + object.maxChangeRate = message.maxChangeRate; + return object; + }; + + /** + * Converts this CommissionRates to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.CommissionRates + * @instance + * @returns {Object.} JSON object + */ + CommissionRates.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CommissionRates; + })(); + + v1.Commission = (function() { + + /** + * Properties of a Commission. + * @memberof cosmos_sdk.x.staking.v1 + * @interface ICommission + * @property {cosmos_sdk.x.staking.v1.ICommissionRates|null} [commissionRates] Commission commissionRates + * @property {google.protobuf.ITimestamp|null} [updateTime] Commission updateTime + */ + + /** + * Constructs a new Commission. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a Commission. + * @implements ICommission + * @constructor + * @param {cosmos_sdk.x.staking.v1.ICommission=} [properties] Properties to set + */ + function Commission(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Commission commissionRates. + * @member {cosmos_sdk.x.staking.v1.ICommissionRates|null|undefined} commissionRates + * @memberof cosmos_sdk.x.staking.v1.Commission + * @instance + */ + Commission.prototype.commissionRates = null; + + /** + * Commission updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof cosmos_sdk.x.staking.v1.Commission + * @instance + */ + Commission.prototype.updateTime = null; + + /** + * Creates a new Commission instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.Commission + * @static + * @param {cosmos_sdk.x.staking.v1.ICommission=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.Commission} Commission instance + */ + Commission.create = function create(properties) { + return new Commission(properties); + }; + + /** + * Encodes the specified Commission message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.Commission + * @static + * @param {cosmos_sdk.x.staking.v1.ICommission} message Commission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commission.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.commissionRates != null && Object.hasOwnProperty.call(message, "commissionRates")) + $root.cosmos_sdk.x.staking.v1.CommissionRates.encode(message.commissionRates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Commission message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Commission + * @static + * @param {cosmos_sdk.x.staking.v1.ICommission} message Commission message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Commission.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Commission message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.Commission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.Commission} Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commission.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Commission(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.commissionRates = $root.cosmos_sdk.x.staking.v1.CommissionRates.decode(reader, reader.uint32()); + break; + case 2: + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Commission message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Commission + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.Commission} Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Commission.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Commission message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.Commission + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Commission.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) { + var error = $root.cosmos_sdk.x.staking.v1.CommissionRates.verify(message.commissionRates); + if (error) + return "commissionRates." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a Commission message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.Commission + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.Commission} Commission + */ + Commission.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.Commission) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.Commission(); + if (object.commissionRates != null) { + if (typeof object.commissionRates !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.Commission.commissionRates: object expected"); + message.commissionRates = $root.cosmos_sdk.x.staking.v1.CommissionRates.fromObject(object.commissionRates); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.Commission.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a Commission message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.Commission + * @static + * @param {cosmos_sdk.x.staking.v1.Commission} message Commission + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Commission.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.commissionRates = null; + object.updateTime = null; + } + if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) + object.commissionRates = $root.cosmos_sdk.x.staking.v1.CommissionRates.toObject(message.commissionRates, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + return object; + }; + + /** + * Converts this Commission to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.Commission + * @instance + * @returns {Object.} JSON object + */ + Commission.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Commission; + })(); + + v1.Description = (function() { + + /** + * Properties of a Description. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IDescription + * @property {string|null} [moniker] Description moniker + * @property {string|null} [identity] Description identity + * @property {string|null} [website] Description website + * @property {string|null} [securityContact] Description securityContact + * @property {string|null} [details] Description details + */ + + /** + * Constructs a new Description. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a Description. + * @implements IDescription + * @constructor + * @param {cosmos_sdk.x.staking.v1.IDescription=} [properties] Properties to set + */ + function Description(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Description moniker. + * @member {string} moniker + * @memberof cosmos_sdk.x.staking.v1.Description + * @instance + */ + Description.prototype.moniker = ""; + + /** + * Description identity. + * @member {string} identity + * @memberof cosmos_sdk.x.staking.v1.Description + * @instance + */ + Description.prototype.identity = ""; + + /** + * Description website. + * @member {string} website + * @memberof cosmos_sdk.x.staking.v1.Description + * @instance + */ + Description.prototype.website = ""; + + /** + * Description securityContact. + * @member {string} securityContact + * @memberof cosmos_sdk.x.staking.v1.Description + * @instance + */ + Description.prototype.securityContact = ""; + + /** + * Description details. + * @member {string} details + * @memberof cosmos_sdk.x.staking.v1.Description + * @instance + */ + Description.prototype.details = ""; + + /** + * Creates a new Description instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.Description + * @static + * @param {cosmos_sdk.x.staking.v1.IDescription=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.Description} Description instance + */ + Description.create = function create(properties) { + return new Description(properties); + }; + + /** + * Encodes the specified Description message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.Description + * @static + * @param {cosmos_sdk.x.staking.v1.IDescription} message Description message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Description.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.moniker); + if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.identity); + if (message.website != null && Object.hasOwnProperty.call(message, "website")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.website); + if (message.securityContact != null && Object.hasOwnProperty.call(message, "securityContact")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.securityContact); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.details); + return writer; + }; + + /** + * Encodes the specified Description message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Description + * @static + * @param {cosmos_sdk.x.staking.v1.IDescription} message Description message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Description.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Description message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.Description + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.Description} Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Description.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Description(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.moniker = reader.string(); + break; + case 2: + message.identity = reader.string(); + break; + case 3: + message.website = reader.string(); + break; + case 4: + message.securityContact = reader.string(); + break; + case 5: + message.details = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Description message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Description + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.Description} Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Description.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Description message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.Description + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Description.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.moniker != null && message.hasOwnProperty("moniker")) + if (!$util.isString(message.moniker)) + return "moniker: string expected"; + if (message.identity != null && message.hasOwnProperty("identity")) + if (!$util.isString(message.identity)) + return "identity: string expected"; + if (message.website != null && message.hasOwnProperty("website")) + if (!$util.isString(message.website)) + return "website: string expected"; + if (message.securityContact != null && message.hasOwnProperty("securityContact")) + if (!$util.isString(message.securityContact)) + return "securityContact: string expected"; + if (message.details != null && message.hasOwnProperty("details")) + if (!$util.isString(message.details)) + return "details: string expected"; + return null; + }; + + /** + * Creates a Description message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.Description + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.Description} Description + */ + Description.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.Description) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.Description(); + if (object.moniker != null) + message.moniker = String(object.moniker); + if (object.identity != null) + message.identity = String(object.identity); + if (object.website != null) + message.website = String(object.website); + if (object.securityContact != null) + message.securityContact = String(object.securityContact); + if (object.details != null) + message.details = String(object.details); + return message; + }; + + /** + * Creates a plain object from a Description message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.Description + * @static + * @param {cosmos_sdk.x.staking.v1.Description} message Description + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Description.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.moniker = ""; + object.identity = ""; + object.website = ""; + object.securityContact = ""; + object.details = ""; + } + if (message.moniker != null && message.hasOwnProperty("moniker")) + object.moniker = message.moniker; + if (message.identity != null && message.hasOwnProperty("identity")) + object.identity = message.identity; + if (message.website != null && message.hasOwnProperty("website")) + object.website = message.website; + if (message.securityContact != null && message.hasOwnProperty("securityContact")) + object.securityContact = message.securityContact; + if (message.details != null && message.hasOwnProperty("details")) + object.details = message.details; + return object; + }; + + /** + * Converts this Description to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.Description + * @instance + * @returns {Object.} JSON object + */ + Description.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Description; + })(); + + v1.Validator = (function() { + + /** + * Properties of a Validator. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IValidator + * @property {Uint8Array|null} [operatorAddress] Validator operatorAddress + * @property {string|null} [consensusPubkey] Validator consensusPubkey + * @property {boolean|null} [jailed] Validator jailed + * @property {number|null} [status] Validator status + * @property {string|null} [tokens] Validator tokens + * @property {string|null} [delegatorShares] Validator delegatorShares + * @property {cosmos_sdk.x.staking.v1.IDescription|null} [description] Validator description + * @property {number|Long|null} [unbondingHeight] Validator unbondingHeight + * @property {google.protobuf.ITimestamp|null} [unbondingTime] Validator unbondingTime + * @property {cosmos_sdk.x.staking.v1.ICommission|null} [commission] Validator commission + * @property {string|null} [minSelfDelegation] Validator minSelfDelegation + */ + + /** + * Constructs a new Validator. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {cosmos_sdk.x.staking.v1.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator operatorAddress. + * @member {Uint8Array} operatorAddress + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.operatorAddress = $util.newBuffer([]); + + /** + * Validator consensusPubkey. + * @member {string} consensusPubkey + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.consensusPubkey = ""; + + /** + * Validator jailed. + * @member {boolean} jailed + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.jailed = false; + + /** + * Validator status. + * @member {number} status + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.status = 0; + + /** + * Validator tokens. + * @member {string} tokens + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.tokens = ""; + + /** + * Validator delegatorShares. + * @member {string} delegatorShares + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.delegatorShares = ""; + + /** + * Validator description. + * @member {cosmos_sdk.x.staking.v1.IDescription|null|undefined} description + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.description = null; + + /** + * Validator unbondingHeight. + * @member {number|Long} unbondingHeight + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.unbondingHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Validator unbondingTime. + * @member {google.protobuf.ITimestamp|null|undefined} unbondingTime + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.unbondingTime = null; + + /** + * Validator commission. + * @member {cosmos_sdk.x.staking.v1.ICommission|null|undefined} commission + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.commission = null; + + /** + * Validator minSelfDelegation. + * @member {string} minSelfDelegation + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + */ + Validator.prototype.minSelfDelegation = ""; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.Validator + * @static + * @param {cosmos_sdk.x.staking.v1.IValidator=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.Validator + * @static + * @param {cosmos_sdk.x.staking.v1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.operatorAddress != null && Object.hasOwnProperty.call(message, "operatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.operatorAddress); + if (message.consensusPubkey != null && Object.hasOwnProperty.call(message, "consensusPubkey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.consensusPubkey); + if (message.jailed != null && Object.hasOwnProperty.call(message, "jailed")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.jailed); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); + if (message.tokens != null && Object.hasOwnProperty.call(message, "tokens")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tokens); + if (message.delegatorShares != null && Object.hasOwnProperty.call(message, "delegatorShares")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.delegatorShares); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + $root.cosmos_sdk.x.staking.v1.Description.encode(message.description, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.unbondingHeight != null && Object.hasOwnProperty.call(message, "unbondingHeight")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.unbondingHeight); + if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) + $root.google.protobuf.Timestamp.encode(message.unbondingTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) + $root.cosmos_sdk.x.staking.v1.Commission.encode(message.commission, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.minSelfDelegation); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Validator + * @static + * @param {cosmos_sdk.x.staking.v1.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Validator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.operatorAddress = reader.bytes(); + break; + case 2: + message.consensusPubkey = reader.string(); + break; + case 3: + message.jailed = reader.bool(); + break; + case 4: + message.status = reader.int32(); + break; + case 5: + message.tokens = reader.string(); + break; + case 6: + message.delegatorShares = reader.string(); + break; + case 7: + message.description = $root.cosmos_sdk.x.staking.v1.Description.decode(reader, reader.uint32()); + break; + case 8: + message.unbondingHeight = reader.int64(); + break; + case 9: + message.unbondingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 10: + message.commission = $root.cosmos_sdk.x.staking.v1.Commission.decode(reader, reader.uint32()); + break; + case 11: + message.minSelfDelegation = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) + if (!(message.operatorAddress && typeof message.operatorAddress.length === "number" || $util.isString(message.operatorAddress))) + return "operatorAddress: buffer expected"; + if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) + if (!$util.isString(message.consensusPubkey)) + return "consensusPubkey: string expected"; + if (message.jailed != null && message.hasOwnProperty("jailed")) + if (typeof message.jailed !== "boolean") + return "jailed: boolean expected"; + if (message.status != null && message.hasOwnProperty("status")) + if (!$util.isInteger(message.status)) + return "status: integer expected"; + if (message.tokens != null && message.hasOwnProperty("tokens")) + if (!$util.isString(message.tokens)) + return "tokens: string expected"; + if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) + if (!$util.isString(message.delegatorShares)) + return "delegatorShares: string expected"; + if (message.description != null && message.hasOwnProperty("description")) { + var error = $root.cosmos_sdk.x.staking.v1.Description.verify(message.description); + if (error) + return "description." + error; + } + if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) + if (!$util.isInteger(message.unbondingHeight) && !(message.unbondingHeight && $util.isInteger(message.unbondingHeight.low) && $util.isInteger(message.unbondingHeight.high))) + return "unbondingHeight: integer|Long expected"; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.unbondingTime); + if (error) + return "unbondingTime." + error; + } + if (message.commission != null && message.hasOwnProperty("commission")) { + var error = $root.cosmos_sdk.x.staking.v1.Commission.verify(message.commission); + if (error) + return "commission." + error; + } + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + if (!$util.isString(message.minSelfDelegation)) + return "minSelfDelegation: string expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.Validator + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.Validator) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.Validator(); + if (object.operatorAddress != null) + if (typeof object.operatorAddress === "string") + $util.base64.decode(object.operatorAddress, message.operatorAddress = $util.newBuffer($util.base64.length(object.operatorAddress)), 0); + else if (object.operatorAddress.length) + message.operatorAddress = object.operatorAddress; + if (object.consensusPubkey != null) + message.consensusPubkey = String(object.consensusPubkey); + if (object.jailed != null) + message.jailed = Boolean(object.jailed); + if (object.status != null) + message.status = object.status | 0; + if (object.tokens != null) + message.tokens = String(object.tokens); + if (object.delegatorShares != null) + message.delegatorShares = String(object.delegatorShares); + if (object.description != null) { + if (typeof object.description !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.Validator.description: object expected"); + message.description = $root.cosmos_sdk.x.staking.v1.Description.fromObject(object.description); + } + if (object.unbondingHeight != null) + if ($util.Long) + (message.unbondingHeight = $util.Long.fromValue(object.unbondingHeight)).unsigned = false; + else if (typeof object.unbondingHeight === "string") + message.unbondingHeight = parseInt(object.unbondingHeight, 10); + else if (typeof object.unbondingHeight === "number") + message.unbondingHeight = object.unbondingHeight; + else if (typeof object.unbondingHeight === "object") + message.unbondingHeight = new $util.LongBits(object.unbondingHeight.low >>> 0, object.unbondingHeight.high >>> 0).toNumber(); + if (object.unbondingTime != null) { + if (typeof object.unbondingTime !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.Validator.unbondingTime: object expected"); + message.unbondingTime = $root.google.protobuf.Timestamp.fromObject(object.unbondingTime); + } + if (object.commission != null) { + if (typeof object.commission !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.Validator.commission: object expected"); + message.commission = $root.cosmos_sdk.x.staking.v1.Commission.fromObject(object.commission); + } + if (object.minSelfDelegation != null) + message.minSelfDelegation = String(object.minSelfDelegation); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.Validator + * @static + * @param {cosmos_sdk.x.staking.v1.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.operatorAddress = ""; + else { + object.operatorAddress = []; + if (options.bytes !== Array) + object.operatorAddress = $util.newBuffer(object.operatorAddress); + } + object.consensusPubkey = ""; + object.jailed = false; + object.status = 0; + object.tokens = ""; + object.delegatorShares = ""; + object.description = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.unbondingHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.unbondingHeight = options.longs === String ? "0" : 0; + object.unbondingTime = null; + object.commission = null; + object.minSelfDelegation = ""; + } + if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) + object.operatorAddress = options.bytes === String ? $util.base64.encode(message.operatorAddress, 0, message.operatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.operatorAddress) : message.operatorAddress; + if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) + object.consensusPubkey = message.consensusPubkey; + if (message.jailed != null && message.hasOwnProperty("jailed")) + object.jailed = message.jailed; + if (message.status != null && message.hasOwnProperty("status")) + object.status = message.status; + if (message.tokens != null && message.hasOwnProperty("tokens")) + object.tokens = message.tokens; + if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) + object.delegatorShares = message.delegatorShares; + if (message.description != null && message.hasOwnProperty("description")) + object.description = $root.cosmos_sdk.x.staking.v1.Description.toObject(message.description, options); + if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) + if (typeof message.unbondingHeight === "number") + object.unbondingHeight = options.longs === String ? String(message.unbondingHeight) : message.unbondingHeight; + else + object.unbondingHeight = options.longs === String ? $util.Long.prototype.toString.call(message.unbondingHeight) : options.longs === Number ? new $util.LongBits(message.unbondingHeight.low >>> 0, message.unbondingHeight.high >>> 0).toNumber() : message.unbondingHeight; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) + object.unbondingTime = $root.google.protobuf.Timestamp.toObject(message.unbondingTime, options); + if (message.commission != null && message.hasOwnProperty("commission")) + object.commission = $root.cosmos_sdk.x.staking.v1.Commission.toObject(message.commission, options); + if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) + object.minSelfDelegation = message.minSelfDelegation; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(); + + v1.DVPair = (function() { + + /** + * Properties of a DVPair. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IDVPair + * @property {Uint8Array|null} [delegatorAddress] DVPair delegatorAddress + * @property {Uint8Array|null} [validatorAddress] DVPair validatorAddress + */ + + /** + * Constructs a new DVPair. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a DVPair. + * @implements IDVPair + * @constructor + * @param {cosmos_sdk.x.staking.v1.IDVPair=} [properties] Properties to set + */ + function DVPair(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVPair delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @instance + */ + DVPair.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * DVPair validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @instance + */ + DVPair.prototype.validatorAddress = $util.newBuffer([]); + + /** + * Creates a new DVPair instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @static + * @param {cosmos_sdk.x.staking.v1.IDVPair=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.DVPair} DVPair instance + */ + DVPair.create = function create(properties) { + return new DVPair(properties); + }; + + /** + * Encodes the specified DVPair message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @static + * @param {cosmos_sdk.x.staking.v1.IDVPair} message DVPair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPair.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + return writer; + }; + + /** + * Encodes the specified DVPair message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @static + * @param {cosmos_sdk.x.staking.v1.IDVPair} message DVPair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPair.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVPair message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.DVPair} DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPair.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.DVPair(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVPair message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.DVPair} DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPair.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVPair message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVPair.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + return null; + }; + + /** + * Creates a DVPair message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.DVPair} DVPair + */ + DVPair.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.DVPair) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.DVPair(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + return message; + }; + + /** + * Creates a plain object from a DVPair message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @static + * @param {cosmos_sdk.x.staking.v1.DVPair} message DVPair + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVPair.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + return object; + }; + + /** + * Converts this DVPair to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.DVPair + * @instance + * @returns {Object.} JSON object + */ + DVPair.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVPair; + })(); + + v1.DVPairs = (function() { + + /** + * Properties of a DVPairs. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IDVPairs + * @property {Array.|null} [pairs] DVPairs pairs + */ + + /** + * Constructs a new DVPairs. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a DVPairs. + * @implements IDVPairs + * @constructor + * @param {cosmos_sdk.x.staking.v1.IDVPairs=} [properties] Properties to set + */ + function DVPairs(properties) { + this.pairs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVPairs pairs. + * @member {Array.} pairs + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @instance + */ + DVPairs.prototype.pairs = $util.emptyArray; + + /** + * Creates a new DVPairs instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @static + * @param {cosmos_sdk.x.staking.v1.IDVPairs=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.DVPairs} DVPairs instance + */ + DVPairs.create = function create(properties) { + return new DVPairs(properties); + }; + + /** + * Encodes the specified DVPairs message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @static + * @param {cosmos_sdk.x.staking.v1.IDVPairs} message DVPairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPairs.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pairs != null && message.pairs.length) + for (var i = 0; i < message.pairs.length; ++i) + $root.cosmos_sdk.x.staking.v1.DVPair.encode(message.pairs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DVPairs message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @static + * @param {cosmos_sdk.x.staking.v1.IDVPairs} message DVPairs message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVPairs.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVPairs message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.DVPairs} DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPairs.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.DVPairs(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pairs && message.pairs.length)) + message.pairs = []; + message.pairs.push($root.cosmos_sdk.x.staking.v1.DVPair.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVPairs message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.DVPairs} DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVPairs.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVPairs message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVPairs.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pairs != null && message.hasOwnProperty("pairs")) { + if (!Array.isArray(message.pairs)) + return "pairs: array expected"; + for (var i = 0; i < message.pairs.length; ++i) { + var error = $root.cosmos_sdk.x.staking.v1.DVPair.verify(message.pairs[i]); + if (error) + return "pairs." + error; + } + } + return null; + }; + + /** + * Creates a DVPairs message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.DVPairs} DVPairs + */ + DVPairs.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.DVPairs) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.DVPairs(); + if (object.pairs) { + if (!Array.isArray(object.pairs)) + throw TypeError(".cosmos_sdk.x.staking.v1.DVPairs.pairs: array expected"); + message.pairs = []; + for (var i = 0; i < object.pairs.length; ++i) { + if (typeof object.pairs[i] !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.DVPairs.pairs: object expected"); + message.pairs[i] = $root.cosmos_sdk.x.staking.v1.DVPair.fromObject(object.pairs[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DVPairs message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @static + * @param {cosmos_sdk.x.staking.v1.DVPairs} message DVPairs + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVPairs.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pairs = []; + if (message.pairs && message.pairs.length) { + object.pairs = []; + for (var j = 0; j < message.pairs.length; ++j) + object.pairs[j] = $root.cosmos_sdk.x.staking.v1.DVPair.toObject(message.pairs[j], options); + } + return object; + }; + + /** + * Converts this DVPairs to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.DVPairs + * @instance + * @returns {Object.} JSON object + */ + DVPairs.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVPairs; + })(); + + v1.DVVTriplet = (function() { + + /** + * Properties of a DVVTriplet. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IDVVTriplet + * @property {Uint8Array|null} [delegatorAddress] DVVTriplet delegatorAddress + * @property {Uint8Array|null} [validatorSrcAddress] DVVTriplet validatorSrcAddress + * @property {Uint8Array|null} [validatorDstAddress] DVVTriplet validatorDstAddress + */ + + /** + * Constructs a new DVVTriplet. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a DVVTriplet. + * @implements IDVVTriplet + * @constructor + * @param {cosmos_sdk.x.staking.v1.IDVVTriplet=} [properties] Properties to set + */ + function DVVTriplet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVVTriplet delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * DVVTriplet validatorSrcAddress. + * @member {Uint8Array} validatorSrcAddress + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.validatorSrcAddress = $util.newBuffer([]); + + /** + * DVVTriplet validatorDstAddress. + * @member {Uint8Array} validatorDstAddress + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @instance + */ + DVVTriplet.prototype.validatorDstAddress = $util.newBuffer([]); + + /** + * Creates a new DVVTriplet instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @static + * @param {cosmos_sdk.x.staking.v1.IDVVTriplet=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.DVVTriplet} DVVTriplet instance + */ + DVVTriplet.create = function create(properties) { + return new DVVTriplet(properties); + }; + + /** + * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @static + * @param {cosmos_sdk.x.staking.v1.IDVVTriplet} message DVVTriplet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.validatorDstAddress); + return writer; + }; + + /** + * Encodes the specified DVVTriplet message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @static + * @param {cosmos_sdk.x.staking.v1.IDVVTriplet} message DVVTriplet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.DVVTriplet} DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.DVVTriplet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.validatorSrcAddress = reader.bytes(); + break; + case 3: + message.validatorDstAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.DVVTriplet} DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVVTriplet message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVVTriplet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!(message.validatorSrcAddress && typeof message.validatorSrcAddress.length === "number" || $util.isString(message.validatorSrcAddress))) + return "validatorSrcAddress: buffer expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!(message.validatorDstAddress && typeof message.validatorDstAddress.length === "number" || $util.isString(message.validatorDstAddress))) + return "validatorDstAddress: buffer expected"; + return null; + }; + + /** + * Creates a DVVTriplet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.DVVTriplet} DVVTriplet + */ + DVVTriplet.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.DVVTriplet) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.DVVTriplet(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorSrcAddress != null) + if (typeof object.validatorSrcAddress === "string") + $util.base64.decode(object.validatorSrcAddress, message.validatorSrcAddress = $util.newBuffer($util.base64.length(object.validatorSrcAddress)), 0); + else if (object.validatorSrcAddress.length) + message.validatorSrcAddress = object.validatorSrcAddress; + if (object.validatorDstAddress != null) + if (typeof object.validatorDstAddress === "string") + $util.base64.decode(object.validatorDstAddress, message.validatorDstAddress = $util.newBuffer($util.base64.length(object.validatorDstAddress)), 0); + else if (object.validatorDstAddress.length) + message.validatorDstAddress = object.validatorDstAddress; + return message; + }; + + /** + * Creates a plain object from a DVVTriplet message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @static + * @param {cosmos_sdk.x.staking.v1.DVVTriplet} message DVVTriplet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVVTriplet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorSrcAddress = ""; + else { + object.validatorSrcAddress = []; + if (options.bytes !== Array) + object.validatorSrcAddress = $util.newBuffer(object.validatorSrcAddress); + } + if (options.bytes === String) + object.validatorDstAddress = ""; + else { + object.validatorDstAddress = []; + if (options.bytes !== Array) + object.validatorDstAddress = $util.newBuffer(object.validatorDstAddress); + } + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = options.bytes === String ? $util.base64.encode(message.validatorSrcAddress, 0, message.validatorSrcAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorSrcAddress) : message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = options.bytes === String ? $util.base64.encode(message.validatorDstAddress, 0, message.validatorDstAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorDstAddress) : message.validatorDstAddress; + return object; + }; + + /** + * Converts this DVVTriplet to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.DVVTriplet + * @instance + * @returns {Object.} JSON object + */ + DVVTriplet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVVTriplet; + })(); + + v1.DVVTriplets = (function() { + + /** + * Properties of a DVVTriplets. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IDVVTriplets + * @property {Array.|null} [triplets] DVVTriplets triplets + */ + + /** + * Constructs a new DVVTriplets. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a DVVTriplets. + * @implements IDVVTriplets + * @constructor + * @param {cosmos_sdk.x.staking.v1.IDVVTriplets=} [properties] Properties to set + */ + function DVVTriplets(properties) { + this.triplets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DVVTriplets triplets. + * @member {Array.} triplets + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @instance + */ + DVVTriplets.prototype.triplets = $util.emptyArray; + + /** + * Creates a new DVVTriplets instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @static + * @param {cosmos_sdk.x.staking.v1.IDVVTriplets=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.DVVTriplets} DVVTriplets instance + */ + DVVTriplets.create = function create(properties) { + return new DVVTriplets(properties); + }; + + /** + * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @static + * @param {cosmos_sdk.x.staking.v1.IDVVTriplets} message DVVTriplets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.triplets != null && message.triplets.length) + for (var i = 0; i < message.triplets.length; ++i) + $root.cosmos_sdk.x.staking.v1.DVVTriplet.encode(message.triplets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DVVTriplets message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @static + * @param {cosmos_sdk.x.staking.v1.IDVVTriplets} message DVVTriplets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DVVTriplets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.DVVTriplets} DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplets.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.DVVTriplets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.triplets && message.triplets.length)) + message.triplets = []; + message.triplets.push($root.cosmos_sdk.x.staking.v1.DVVTriplet.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.DVVTriplets} DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DVVTriplets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DVVTriplets message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DVVTriplets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.triplets != null && message.hasOwnProperty("triplets")) { + if (!Array.isArray(message.triplets)) + return "triplets: array expected"; + for (var i = 0; i < message.triplets.length; ++i) { + var error = $root.cosmos_sdk.x.staking.v1.DVVTriplet.verify(message.triplets[i]); + if (error) + return "triplets." + error; + } + } + return null; + }; + + /** + * Creates a DVVTriplets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.DVVTriplets} DVVTriplets + */ + DVVTriplets.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.DVVTriplets) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.DVVTriplets(); + if (object.triplets) { + if (!Array.isArray(object.triplets)) + throw TypeError(".cosmos_sdk.x.staking.v1.DVVTriplets.triplets: array expected"); + message.triplets = []; + for (var i = 0; i < object.triplets.length; ++i) { + if (typeof object.triplets[i] !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.DVVTriplets.triplets: object expected"); + message.triplets[i] = $root.cosmos_sdk.x.staking.v1.DVVTriplet.fromObject(object.triplets[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DVVTriplets message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @static + * @param {cosmos_sdk.x.staking.v1.DVVTriplets} message DVVTriplets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DVVTriplets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.triplets = []; + if (message.triplets && message.triplets.length) { + object.triplets = []; + for (var j = 0; j < message.triplets.length; ++j) + object.triplets[j] = $root.cosmos_sdk.x.staking.v1.DVVTriplet.toObject(message.triplets[j], options); + } + return object; + }; + + /** + * Converts this DVVTriplets to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.DVVTriplets + * @instance + * @returns {Object.} JSON object + */ + DVVTriplets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return DVVTriplets; + })(); + + v1.Delegation = (function() { + + /** + * Properties of a Delegation. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IDelegation + * @property {Uint8Array|null} [delegatorAddress] Delegation delegatorAddress + * @property {Uint8Array|null} [validatorAddress] Delegation validatorAddress + * @property {string|null} [shares] Delegation shares + */ + + /** + * Constructs a new Delegation. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a Delegation. + * @implements IDelegation + * @constructor + * @param {cosmos_sdk.x.staking.v1.IDelegation=} [properties] Properties to set + */ + function Delegation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Delegation delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @instance + */ + Delegation.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * Delegation validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @instance + */ + Delegation.prototype.validatorAddress = $util.newBuffer([]); + + /** + * Delegation shares. + * @member {string} shares + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @instance + */ + Delegation.prototype.shares = ""; + + /** + * Creates a new Delegation instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @static + * @param {cosmos_sdk.x.staking.v1.IDelegation=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.Delegation} Delegation instance + */ + Delegation.create = function create(properties) { + return new Delegation(properties); + }; + + /** + * Encodes the specified Delegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @static + * @param {cosmos_sdk.x.staking.v1.IDelegation} message Delegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + if (message.shares != null && Object.hasOwnProperty.call(message, "shares")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.shares); + return writer; + }; + + /** + * Encodes the specified Delegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @static + * @param {cosmos_sdk.x.staking.v1.IDelegation} message Delegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Delegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.Delegation} Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Delegation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + message.shares = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Delegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.Delegation} Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Delegation message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Delegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.shares != null && message.hasOwnProperty("shares")) + if (!$util.isString(message.shares)) + return "shares: string expected"; + return null; + }; + + /** + * Creates a Delegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.Delegation} Delegation + */ + Delegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.Delegation) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.Delegation(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.shares != null) + message.shares = String(object.shares); + return message; + }; + + /** + * Creates a plain object from a Delegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @static + * @param {cosmos_sdk.x.staking.v1.Delegation} message Delegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Delegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + object.shares = ""; + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.shares != null && message.hasOwnProperty("shares")) + object.shares = message.shares; + return object; + }; + + /** + * Converts this Delegation to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.Delegation + * @instance + * @returns {Object.} JSON object + */ + Delegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Delegation; + })(); + + v1.UnbondingDelegation = (function() { + + /** + * Properties of an UnbondingDelegation. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IUnbondingDelegation + * @property {Uint8Array|null} [delegatorAddress] UnbondingDelegation delegatorAddress + * @property {Uint8Array|null} [validatorAddress] UnbondingDelegation validatorAddress + * @property {Array.|null} [entries] UnbondingDelegation entries + */ + + /** + * Constructs a new UnbondingDelegation. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents an UnbondingDelegation. + * @implements IUnbondingDelegation + * @constructor + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation=} [properties] Properties to set + */ + function UnbondingDelegation(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnbondingDelegation delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * UnbondingDelegation validatorAddress. + * @member {Uint8Array} validatorAddress + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.validatorAddress = $util.newBuffer([]); + + /** + * UnbondingDelegation entries. + * @member {Array.} entries + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @instance + */ + UnbondingDelegation.prototype.entries = $util.emptyArray; + + /** + * Creates a new UnbondingDelegation instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @static + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegation} UnbondingDelegation instance + */ + UnbondingDelegation.create = function create(properties) { + return new UnbondingDelegation(properties); + }; + + /** + * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @static + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.encode(message.entries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UnbondingDelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @static + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegation} UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.UnbondingDelegation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.validatorAddress = reader.bytes(); + break; + case 3: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegation} UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbondingDelegation message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbondingDelegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) + return "validatorAddress: buffer expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates an UnbondingDelegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegation} UnbondingDelegation + */ + UnbondingDelegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.UnbondingDelegation) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.UnbondingDelegation(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorAddress != null) + if (typeof object.validatorAddress === "string") + $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); + else if (object.validatorAddress.length) + message.validatorAddress = object.validatorAddress; + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos_sdk.x.staking.v1.UnbondingDelegation.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.UnbondingDelegation.entries: object expected"); + message.entries[i] = $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an UnbondingDelegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @static + * @param {cosmos_sdk.x.staking.v1.UnbondingDelegation} message UnbondingDelegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbondingDelegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorAddress = ""; + else { + object.validatorAddress = []; + if (options.bytes !== Array) + object.validatorAddress = $util.newBuffer(object.validatorAddress); + } + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) + object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this UnbondingDelegation to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation + * @instance + * @returns {Object.} JSON object + */ + UnbondingDelegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbondingDelegation; + })(); + + v1.UnbondingDelegationEntry = (function() { + + /** + * Properties of an UnbondingDelegationEntry. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IUnbondingDelegationEntry + * @property {number|Long|null} [creationHeight] UnbondingDelegationEntry creationHeight + * @property {google.protobuf.ITimestamp|null} [completionTime] UnbondingDelegationEntry completionTime + * @property {string|null} [initialBalance] UnbondingDelegationEntry initialBalance + * @property {string|null} [balance] UnbondingDelegationEntry balance + */ + + /** + * Constructs a new UnbondingDelegationEntry. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents an UnbondingDelegationEntry. + * @implements IUnbondingDelegationEntry + * @constructor + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry=} [properties] Properties to set + */ + function UnbondingDelegationEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnbondingDelegationEntry creationHeight. + * @member {number|Long} creationHeight + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UnbondingDelegationEntry completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.completionTime = null; + + /** + * UnbondingDelegationEntry initialBalance. + * @member {string} initialBalance + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.initialBalance = ""; + + /** + * UnbondingDelegationEntry balance. + * @member {string} balance + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @instance + */ + UnbondingDelegationEntry.prototype.balance = ""; + + /** + * Creates a new UnbondingDelegationEntry instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @static + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} UnbondingDelegationEntry instance + */ + UnbondingDelegationEntry.create = function create(properties) { + return new UnbondingDelegationEntry(properties); + }; + + /** + * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @static + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegationEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); + if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.balance); + return writer; + }; + + /** + * Encodes the specified UnbondingDelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @static + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnbondingDelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegationEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.balance = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnbondingDelegationEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnbondingDelegationEntry message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnbondingDelegationEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) + return "creationHeight: integer|Long expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + if (!$util.isString(message.initialBalance)) + return "initialBalance: string expected"; + if (message.balance != null && message.hasOwnProperty("balance")) + if (!$util.isString(message.balance)) + return "balance: string expected"; + return null; + }; + + /** + * Creates an UnbondingDelegationEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} UnbondingDelegationEntry + */ + UnbondingDelegationEntry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry(); + if (object.creationHeight != null) + if ($util.Long) + (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; + else if (typeof object.creationHeight === "string") + message.creationHeight = parseInt(object.creationHeight, 10); + else if (typeof object.creationHeight === "number") + message.creationHeight = object.creationHeight; + else if (typeof object.creationHeight === "object") + message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + if (object.initialBalance != null) + message.initialBalance = String(object.initialBalance); + if (object.balance != null) + message.balance = String(object.balance); + return message; + }; + + /** + * Creates a plain object from an UnbondingDelegationEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @static + * @param {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} message UnbondingDelegationEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnbondingDelegationEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.creationHeight = options.longs === String ? "0" : 0; + object.completionTime = null; + object.initialBalance = ""; + object.balance = ""; + } + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (typeof message.creationHeight === "number") + object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; + else + object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + object.initialBalance = message.initialBalance; + if (message.balance != null && message.hasOwnProperty("balance")) + object.balance = message.balance; + return object; + }; + + /** + * Converts this UnbondingDelegationEntry to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry + * @instance + * @returns {Object.} JSON object + */ + UnbondingDelegationEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return UnbondingDelegationEntry; + })(); + + v1.RedelegationEntry = (function() { + + /** + * Properties of a RedelegationEntry. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IRedelegationEntry + * @property {number|Long|null} [creationHeight] RedelegationEntry creationHeight + * @property {google.protobuf.ITimestamp|null} [completionTime] RedelegationEntry completionTime + * @property {string|null} [initialBalance] RedelegationEntry initialBalance + * @property {string|null} [sharesDst] RedelegationEntry sharesDst + */ + + /** + * Constructs a new RedelegationEntry. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a RedelegationEntry. + * @implements IRedelegationEntry + * @constructor + * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry=} [properties] Properties to set + */ + function RedelegationEntry(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedelegationEntry creationHeight. + * @member {number|Long} creationHeight + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RedelegationEntry completionTime. + * @member {google.protobuf.ITimestamp|null|undefined} completionTime + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.completionTime = null; + + /** + * RedelegationEntry initialBalance. + * @member {string} initialBalance + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.initialBalance = ""; + + /** + * RedelegationEntry sharesDst. + * @member {string} sharesDst + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @instance + */ + RedelegationEntry.prototype.sharesDst = ""; + + /** + * Creates a new RedelegationEntry instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @static + * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.RedelegationEntry} RedelegationEntry instance + */ + RedelegationEntry.create = function create(properties) { + return new RedelegationEntry(properties); + }; + + /** + * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @static + * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry} message RedelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntry.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); + if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) + $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); + if (message.sharesDst != null && Object.hasOwnProperty.call(message, "sharesDst")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.sharesDst); + return writer; + }; + + /** + * Encodes the specified RedelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @static + * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry} message RedelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.RedelegationEntry} RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntry.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.RedelegationEntry(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.creationHeight = reader.int64(); + break; + case 2: + message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.initialBalance = reader.string(); + break; + case 4: + message.sharesDst = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.RedelegationEntry} RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedelegationEntry.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedelegationEntry message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedelegationEntry.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) + return "creationHeight: integer|Long expected"; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.completionTime); + if (error) + return "completionTime." + error; + } + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + if (!$util.isString(message.initialBalance)) + return "initialBalance: string expected"; + if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) + if (!$util.isString(message.sharesDst)) + return "sharesDst: string expected"; + return null; + }; + + /** + * Creates a RedelegationEntry message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.RedelegationEntry} RedelegationEntry + */ + RedelegationEntry.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.RedelegationEntry) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.RedelegationEntry(); + if (object.creationHeight != null) + if ($util.Long) + (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; + else if (typeof object.creationHeight === "string") + message.creationHeight = parseInt(object.creationHeight, 10); + else if (typeof object.creationHeight === "number") + message.creationHeight = object.creationHeight; + else if (typeof object.creationHeight === "object") + message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); + if (object.completionTime != null) { + if (typeof object.completionTime !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.RedelegationEntry.completionTime: object expected"); + message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); + } + if (object.initialBalance != null) + message.initialBalance = String(object.initialBalance); + if (object.sharesDst != null) + message.sharesDst = String(object.sharesDst); + return message; + }; + + /** + * Creates a plain object from a RedelegationEntry message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @static + * @param {cosmos_sdk.x.staking.v1.RedelegationEntry} message RedelegationEntry + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedelegationEntry.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.creationHeight = options.longs === String ? "0" : 0; + object.completionTime = null; + object.initialBalance = ""; + object.sharesDst = ""; + } + if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) + if (typeof message.creationHeight === "number") + object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; + else + object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; + if (message.completionTime != null && message.hasOwnProperty("completionTime")) + object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); + if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) + object.initialBalance = message.initialBalance; + if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) + object.sharesDst = message.sharesDst; + return object; + }; + + /** + * Converts this RedelegationEntry to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry + * @instance + * @returns {Object.} JSON object + */ + RedelegationEntry.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RedelegationEntry; + })(); + + v1.Redelegation = (function() { + + /** + * Properties of a Redelegation. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IRedelegation + * @property {Uint8Array|null} [delegatorAddress] Redelegation delegatorAddress + * @property {Uint8Array|null} [validatorSrcAddress] Redelegation validatorSrcAddress + * @property {Uint8Array|null} [validatorDstAddress] Redelegation validatorDstAddress + * @property {Array.|null} [entries] Redelegation entries + */ + + /** + * Constructs a new Redelegation. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a Redelegation. + * @implements IRedelegation + * @constructor + * @param {cosmos_sdk.x.staking.v1.IRedelegation=} [properties] Properties to set + */ + function Redelegation(properties) { + this.entries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Redelegation delegatorAddress. + * @member {Uint8Array} delegatorAddress + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @instance + */ + Redelegation.prototype.delegatorAddress = $util.newBuffer([]); + + /** + * Redelegation validatorSrcAddress. + * @member {Uint8Array} validatorSrcAddress + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @instance + */ + Redelegation.prototype.validatorSrcAddress = $util.newBuffer([]); + + /** + * Redelegation validatorDstAddress. + * @member {Uint8Array} validatorDstAddress + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @instance + */ + Redelegation.prototype.validatorDstAddress = $util.newBuffer([]); + + /** + * Redelegation entries. + * @member {Array.} entries + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @instance + */ + Redelegation.prototype.entries = $util.emptyArray; + + /** + * Creates a new Redelegation instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @static + * @param {cosmos_sdk.x.staking.v1.IRedelegation=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.Redelegation} Redelegation instance + */ + Redelegation.create = function create(properties) { + return new Redelegation(properties); + }; + + /** + * Encodes the specified Redelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @static + * @param {cosmos_sdk.x.staking.v1.IRedelegation} message Redelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Redelegation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); + if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorSrcAddress); + if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.validatorDstAddress); + if (message.entries != null && message.entries.length) + for (var i = 0; i < message.entries.length; ++i) + $root.cosmos_sdk.x.staking.v1.RedelegationEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Redelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @static + * @param {cosmos_sdk.x.staking.v1.IRedelegation} message Redelegation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Redelegation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Redelegation message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.Redelegation} Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Redelegation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Redelegation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.delegatorAddress = reader.bytes(); + break; + case 2: + message.validatorSrcAddress = reader.bytes(); + break; + case 3: + message.validatorDstAddress = reader.bytes(); + break; + case 4: + if (!(message.entries && message.entries.length)) + message.entries = []; + message.entries.push($root.cosmos_sdk.x.staking.v1.RedelegationEntry.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Redelegation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.Redelegation} Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Redelegation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Redelegation message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Redelegation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) + return "delegatorAddress: buffer expected"; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + if (!(message.validatorSrcAddress && typeof message.validatorSrcAddress.length === "number" || $util.isString(message.validatorSrcAddress))) + return "validatorSrcAddress: buffer expected"; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + if (!(message.validatorDstAddress && typeof message.validatorDstAddress.length === "number" || $util.isString(message.validatorDstAddress))) + return "validatorDstAddress: buffer expected"; + if (message.entries != null && message.hasOwnProperty("entries")) { + if (!Array.isArray(message.entries)) + return "entries: array expected"; + for (var i = 0; i < message.entries.length; ++i) { + var error = $root.cosmos_sdk.x.staking.v1.RedelegationEntry.verify(message.entries[i]); + if (error) + return "entries." + error; + } + } + return null; + }; + + /** + * Creates a Redelegation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.Redelegation} Redelegation + */ + Redelegation.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.Redelegation) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.Redelegation(); + if (object.delegatorAddress != null) + if (typeof object.delegatorAddress === "string") + $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); + else if (object.delegatorAddress.length) + message.delegatorAddress = object.delegatorAddress; + if (object.validatorSrcAddress != null) + if (typeof object.validatorSrcAddress === "string") + $util.base64.decode(object.validatorSrcAddress, message.validatorSrcAddress = $util.newBuffer($util.base64.length(object.validatorSrcAddress)), 0); + else if (object.validatorSrcAddress.length) + message.validatorSrcAddress = object.validatorSrcAddress; + if (object.validatorDstAddress != null) + if (typeof object.validatorDstAddress === "string") + $util.base64.decode(object.validatorDstAddress, message.validatorDstAddress = $util.newBuffer($util.base64.length(object.validatorDstAddress)), 0); + else if (object.validatorDstAddress.length) + message.validatorDstAddress = object.validatorDstAddress; + if (object.entries) { + if (!Array.isArray(object.entries)) + throw TypeError(".cosmos_sdk.x.staking.v1.Redelegation.entries: array expected"); + message.entries = []; + for (var i = 0; i < object.entries.length; ++i) { + if (typeof object.entries[i] !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.Redelegation.entries: object expected"); + message.entries[i] = $root.cosmos_sdk.x.staking.v1.RedelegationEntry.fromObject(object.entries[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Redelegation message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @static + * @param {cosmos_sdk.x.staking.v1.Redelegation} message Redelegation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Redelegation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.entries = []; + if (options.defaults) { + if (options.bytes === String) + object.delegatorAddress = ""; + else { + object.delegatorAddress = []; + if (options.bytes !== Array) + object.delegatorAddress = $util.newBuffer(object.delegatorAddress); + } + if (options.bytes === String) + object.validatorSrcAddress = ""; + else { + object.validatorSrcAddress = []; + if (options.bytes !== Array) + object.validatorSrcAddress = $util.newBuffer(object.validatorSrcAddress); + } + if (options.bytes === String) + object.validatorDstAddress = ""; + else { + object.validatorDstAddress = []; + if (options.bytes !== Array) + object.validatorDstAddress = $util.newBuffer(object.validatorDstAddress); + } + } + if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) + object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; + if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) + object.validatorSrcAddress = options.bytes === String ? $util.base64.encode(message.validatorSrcAddress, 0, message.validatorSrcAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorSrcAddress) : message.validatorSrcAddress; + if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) + object.validatorDstAddress = options.bytes === String ? $util.base64.encode(message.validatorDstAddress, 0, message.validatorDstAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorDstAddress) : message.validatorDstAddress; + if (message.entries && message.entries.length) { + object.entries = []; + for (var j = 0; j < message.entries.length; ++j) + object.entries[j] = $root.cosmos_sdk.x.staking.v1.RedelegationEntry.toObject(message.entries[j], options); + } + return object; + }; + + /** + * Converts this Redelegation to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.Redelegation + * @instance + * @returns {Object.} JSON object + */ + Redelegation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Redelegation; + })(); + + v1.Params = (function() { + + /** + * Properties of a Params. + * @memberof cosmos_sdk.x.staking.v1 + * @interface IParams + * @property {google.protobuf.IDuration|null} [unbondingTime] Params unbondingTime + * @property {number|null} [maxValidators] Params maxValidators + * @property {number|null} [maxEntries] Params maxEntries + * @property {number|null} [historicalEntries] Params historicalEntries + * @property {string|null} [bondDenom] Params bondDenom + */ + + /** + * Constructs a new Params. + * @memberof cosmos_sdk.x.staking.v1 + * @classdesc Represents a Params. + * @implements IParams + * @constructor + * @param {cosmos_sdk.x.staking.v1.IParams=} [properties] Properties to set + */ + function Params(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Params unbondingTime. + * @member {google.protobuf.IDuration|null|undefined} unbondingTime + * @memberof cosmos_sdk.x.staking.v1.Params + * @instance + */ + Params.prototype.unbondingTime = null; + + /** + * Params maxValidators. + * @member {number} maxValidators + * @memberof cosmos_sdk.x.staking.v1.Params + * @instance + */ + Params.prototype.maxValidators = 0; + + /** + * Params maxEntries. + * @member {number} maxEntries + * @memberof cosmos_sdk.x.staking.v1.Params + * @instance + */ + Params.prototype.maxEntries = 0; + + /** + * Params historicalEntries. + * @member {number} historicalEntries + * @memberof cosmos_sdk.x.staking.v1.Params + * @instance + */ + Params.prototype.historicalEntries = 0; + + /** + * Params bondDenom. + * @member {string} bondDenom + * @memberof cosmos_sdk.x.staking.v1.Params + * @instance + */ + Params.prototype.bondDenom = ""; + + /** + * Creates a new Params instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.staking.v1.Params + * @static + * @param {cosmos_sdk.x.staking.v1.IParams=} [properties] Properties to set + * @returns {cosmos_sdk.x.staking.v1.Params} Params instance + */ + Params.create = function create(properties) { + return new Params(properties); + }; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.staking.v1.Params + * @static + * @param {cosmos_sdk.x.staking.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) + $root.google.protobuf.Duration.encode(message.unbondingTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxValidators != null && Object.hasOwnProperty.call(message, "maxValidators")) + writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maxValidators); + if (message.maxEntries != null && Object.hasOwnProperty.call(message, "maxEntries")) + writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.maxEntries); + if (message.historicalEntries != null && Object.hasOwnProperty.call(message, "historicalEntries")) + writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.historicalEntries); + if (message.bondDenom != null && Object.hasOwnProperty.call(message, "bondDenom")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.bondDenom); + return writer; + }; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Params + * @static + * @param {cosmos_sdk.x.staking.v1.IParams} message Params message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Params.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Params message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.staking.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.staking.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Params(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.unbondingTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + case 2: + message.maxValidators = reader.uint32(); + break; + case 3: + message.maxEntries = reader.uint32(); + break; + case 4: + message.historicalEntries = reader.uint32(); + break; + case 5: + message.bondDenom = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.staking.v1.Params + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.staking.v1.Params} Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Params.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Params message. + * @function verify + * @memberof cosmos_sdk.x.staking.v1.Params + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Params.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { + var error = $root.google.protobuf.Duration.verify(message.unbondingTime); + if (error) + return "unbondingTime." + error; + } + if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) + if (!$util.isInteger(message.maxValidators)) + return "maxValidators: integer expected"; + if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) + if (!$util.isInteger(message.maxEntries)) + return "maxEntries: integer expected"; + if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) + if (!$util.isInteger(message.historicalEntries)) + return "historicalEntries: integer expected"; + if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) + if (!$util.isString(message.bondDenom)) + return "bondDenom: string expected"; + return null; + }; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.staking.v1.Params + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.staking.v1.Params} Params + */ + Params.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.staking.v1.Params) + return object; + var message = new $root.cosmos_sdk.x.staking.v1.Params(); + if (object.unbondingTime != null) { + if (typeof object.unbondingTime !== "object") + throw TypeError(".cosmos_sdk.x.staking.v1.Params.unbondingTime: object expected"); + message.unbondingTime = $root.google.protobuf.Duration.fromObject(object.unbondingTime); + } + if (object.maxValidators != null) + message.maxValidators = object.maxValidators >>> 0; + if (object.maxEntries != null) + message.maxEntries = object.maxEntries >>> 0; + if (object.historicalEntries != null) + message.historicalEntries = object.historicalEntries >>> 0; + if (object.bondDenom != null) + message.bondDenom = String(object.bondDenom); + return message; + }; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.staking.v1.Params + * @static + * @param {cosmos_sdk.x.staking.v1.Params} message Params + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Params.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.unbondingTime = null; + object.maxValidators = 0; + object.maxEntries = 0; + object.historicalEntries = 0; + object.bondDenom = ""; + } + if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) + object.unbondingTime = $root.google.protobuf.Duration.toObject(message.unbondingTime, options); + if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) + object.maxValidators = message.maxValidators; + if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) + object.maxEntries = message.maxEntries; + if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) + object.historicalEntries = message.historicalEntries; + if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) + object.bondDenom = message.bondDenom; + return object; + }; + + /** + * Converts this Params to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.staking.v1.Params + * @instance + * @returns {Object.} JSON object + */ + Params.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Params; + })(); + + return v1; + })(); + + return staking; + })(); + + x.upgrade = (function() { + + /** + * Namespace upgrade. + * @memberof cosmos_sdk.x + * @namespace + */ + var upgrade = {}; + + upgrade.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.x.upgrade + * @namespace + */ + var v1 = {}; + + v1.Plan = (function() { + + /** + * Properties of a Plan. + * @memberof cosmos_sdk.x.upgrade.v1 + * @interface IPlan + * @property {string|null} [name] Plan name + * @property {google.protobuf.ITimestamp|null} [time] Plan time + * @property {number|Long|null} [height] Plan height + * @property {string|null} [info] Plan info + */ + + /** + * Constructs a new Plan. + * @memberof cosmos_sdk.x.upgrade.v1 + * @classdesc Represents a Plan. + * @implements IPlan + * @constructor + * @param {cosmos_sdk.x.upgrade.v1.IPlan=} [properties] Properties to set + */ + function Plan(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Plan name. + * @member {string} name + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @instance + */ + Plan.prototype.name = ""; + + /** + * Plan time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @instance + */ + Plan.prototype.time = null; + + /** + * Plan height. + * @member {number|Long} height + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @instance + */ + Plan.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Plan info. + * @member {string} info + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @instance + */ + Plan.prototype.info = ""; + + /** + * Creates a new Plan instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @static + * @param {cosmos_sdk.x.upgrade.v1.IPlan=} [properties] Properties to set + * @returns {cosmos_sdk.x.upgrade.v1.Plan} Plan instance + */ + Plan.create = function create(properties) { + return new Plan(properties); + }; + + /** + * Encodes the specified Plan message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @static + * @param {cosmos_sdk.x.upgrade.v1.IPlan} message Plan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Plan.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + return writer; + }; + + /** + * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @static + * @param {cosmos_sdk.x.upgrade.v1.IPlan} message Plan message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Plan.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Plan message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.upgrade.v1.Plan} Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Plan.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.upgrade.v1.Plan(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.info = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Plan message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.upgrade.v1.Plan} Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Plan.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Plan message. + * @function verify + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Plan.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + return null; + }; + + /** + * Creates a Plan message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.upgrade.v1.Plan} Plan + */ + Plan.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.upgrade.v1.Plan) + return object; + var message = new $root.cosmos_sdk.x.upgrade.v1.Plan(); + if (object.name != null) + message.name = String(object.name); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".cosmos_sdk.x.upgrade.v1.Plan.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.info != null) + message.info = String(object.info); + return message; + }; + + /** + * Creates a plain object from a Plan message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @static + * @param {cosmos_sdk.x.upgrade.v1.Plan} message Plan + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Plan.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.time = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.info = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + return object; + }; + + /** + * Converts this Plan to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.upgrade.v1.Plan + * @instance + * @returns {Object.} JSON object + */ + Plan.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Plan; + })(); + + v1.SoftwareUpgradeProposal = (function() { + + /** + * Properties of a SoftwareUpgradeProposal. + * @memberof cosmos_sdk.x.upgrade.v1 + * @interface ISoftwareUpgradeProposal + * @property {string|null} [title] SoftwareUpgradeProposal title + * @property {string|null} [description] SoftwareUpgradeProposal description + * @property {cosmos_sdk.x.upgrade.v1.IPlan|null} [plan] SoftwareUpgradeProposal plan + */ + + /** + * Constructs a new SoftwareUpgradeProposal. + * @memberof cosmos_sdk.x.upgrade.v1 + * @classdesc Represents a SoftwareUpgradeProposal. + * @implements ISoftwareUpgradeProposal + * @constructor + * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal=} [properties] Properties to set + */ + function SoftwareUpgradeProposal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoftwareUpgradeProposal title. + * @member {string} title + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @instance + */ + SoftwareUpgradeProposal.prototype.title = ""; + + /** + * SoftwareUpgradeProposal description. + * @member {string} description + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @instance + */ + SoftwareUpgradeProposal.prototype.description = ""; + + /** + * SoftwareUpgradeProposal plan. + * @member {cosmos_sdk.x.upgrade.v1.IPlan|null|undefined} plan + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @instance + */ + SoftwareUpgradeProposal.prototype.plan = null; + + /** + * Creates a new SoftwareUpgradeProposal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @static + * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal=} [properties] Properties to set + * @returns {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} SoftwareUpgradeProposal instance + */ + SoftwareUpgradeProposal.create = function create(properties) { + return new SoftwareUpgradeProposal(properties); + }; + + /** + * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @static + * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal} message SoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareUpgradeProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.plan != null && Object.hasOwnProperty.call(message, "plan")) + $root.cosmos_sdk.x.upgrade.v1.Plan.encode(message.plan, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @static + * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal} message SoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareUpgradeProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} SoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareUpgradeProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + case 3: + message.plan = $root.cosmos_sdk.x.upgrade.v1.Plan.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} SoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareUpgradeProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoftwareUpgradeProposal message. + * @function verify + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwareUpgradeProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.plan != null && message.hasOwnProperty("plan")) { + var error = $root.cosmos_sdk.x.upgrade.v1.Plan.verify(message.plan); + if (error) + return "plan." + error; + } + return null; + }; + + /** + * Creates a SoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} SoftwareUpgradeProposal + */ + SoftwareUpgradeProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal) + return object; + var message = new $root.cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + if (object.plan != null) { + if (typeof object.plan !== "object") + throw TypeError(".cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.plan: object expected"); + message.plan = $root.cosmos_sdk.x.upgrade.v1.Plan.fromObject(object.plan); + } + return message; + }; + + /** + * Creates a plain object from a SoftwareUpgradeProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @static + * @param {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} message SoftwareUpgradeProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwareUpgradeProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + object.plan = null; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.plan != null && message.hasOwnProperty("plan")) + object.plan = $root.cosmos_sdk.x.upgrade.v1.Plan.toObject(message.plan, options); + return object; + }; + + /** + * Converts this SoftwareUpgradeProposal to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal + * @instance + * @returns {Object.} JSON object + */ + SoftwareUpgradeProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return SoftwareUpgradeProposal; + })(); + + v1.CancelSoftwareUpgradeProposal = (function() { + + /** + * Properties of a CancelSoftwareUpgradeProposal. + * @memberof cosmos_sdk.x.upgrade.v1 + * @interface ICancelSoftwareUpgradeProposal + * @property {string|null} [title] CancelSoftwareUpgradeProposal title + * @property {string|null} [description] CancelSoftwareUpgradeProposal description + */ + + /** + * Constructs a new CancelSoftwareUpgradeProposal. + * @memberof cosmos_sdk.x.upgrade.v1 + * @classdesc Represents a CancelSoftwareUpgradeProposal. + * @implements ICancelSoftwareUpgradeProposal + * @constructor + * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal=} [properties] Properties to set + */ + function CancelSoftwareUpgradeProposal(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelSoftwareUpgradeProposal title. + * @member {string} title + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @instance + */ + CancelSoftwareUpgradeProposal.prototype.title = ""; + + /** + * CancelSoftwareUpgradeProposal description. + * @member {string} description + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @instance + */ + CancelSoftwareUpgradeProposal.prototype.description = ""; + + /** + * Creates a new CancelSoftwareUpgradeProposal instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @static + * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal=} [properties] Properties to set + * @returns {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal instance + */ + CancelSoftwareUpgradeProposal.create = function create(properties) { + return new CancelSoftwareUpgradeProposal(properties); + }; + + /** + * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @static + * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelSoftwareUpgradeProposal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.title != null && Object.hasOwnProperty.call(message, "title")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified CancelSoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @static + * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelSoftwareUpgradeProposal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelSoftwareUpgradeProposal.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.title = reader.string(); + break; + case 2: + message.description = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelSoftwareUpgradeProposal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelSoftwareUpgradeProposal message. + * @function verify + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelSoftwareUpgradeProposal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.title != null && message.hasOwnProperty("title")) + if (!$util.isString(message.title)) + return "title: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a CancelSoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal + */ + CancelSoftwareUpgradeProposal.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal) + return object; + var message = new $root.cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal(); + if (object.title != null) + message.title = String(object.title); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a CancelSoftwareUpgradeProposal message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @static + * @param {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelSoftwareUpgradeProposal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.title = ""; + object.description = ""; + } + if (message.title != null && message.hasOwnProperty("title")) + object.title = message.title; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this CancelSoftwareUpgradeProposal to JSON. + * @function toJSON + * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal + * @instance + * @returns {Object.} JSON object + */ + CancelSoftwareUpgradeProposal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CancelSoftwareUpgradeProposal; + })(); + + return v1; + })(); + + return upgrade; + })(); + + return x; + })(); + + cosmos_sdk.ibc = (function() { + + /** + * Namespace ibc. + * @memberof cosmos_sdk + * @namespace + */ + var ibc = {}; + + ibc.localhost = (function() { + + /** + * Namespace localhost. + * @memberof cosmos_sdk.ibc + * @namespace + */ + var localhost = {}; + + localhost.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.ibc.localhost + * @namespace + */ + var v1 = {}; + + v1.MsgCreateClient = (function() { + + /** + * Properties of a MsgCreateClient. + * @memberof cosmos_sdk.ibc.localhost.v1 + * @interface IMsgCreateClient + * @property {Uint8Array|null} [signer] MsgCreateClient signer + */ + + /** + * Constructs a new MsgCreateClient. + * @memberof cosmos_sdk.ibc.localhost.v1 + * @classdesc Represents a MsgCreateClient. + * @implements IMsgCreateClient + * @constructor + * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient=} [properties] Properties to set + */ + function MsgCreateClient(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MsgCreateClient signer. + * @member {Uint8Array} signer + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @instance + */ + MsgCreateClient.prototype.signer = $util.newBuffer([]); + + /** + * Creates a new MsgCreateClient instance using the specified properties. + * @function create + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @static + * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient=} [properties] Properties to set + * @returns {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} MsgCreateClient instance + */ + MsgCreateClient.create = function create(properties) { + return new MsgCreateClient(properties); + }; + + /** + * Encodes the specified MsgCreateClient message. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @static + * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClient.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signer); + return writer; + }; + + /** + * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. + * @function encodeDelimited + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @static + * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MsgCreateClient.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClient.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.ibc.localhost.v1.MsgCreateClient(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.signer = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgCreateClient.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MsgCreateClient message. + * @function verify + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MsgCreateClient.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.signer != null && message.hasOwnProperty("signer")) + if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) + return "signer: buffer expected"; + return null; + }; + + /** + * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @static + * @param {Object.} object Plain object + * @returns {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} MsgCreateClient + */ + MsgCreateClient.fromObject = function fromObject(object) { + if (object instanceof $root.cosmos_sdk.ibc.localhost.v1.MsgCreateClient) + return object; + var message = new $root.cosmos_sdk.ibc.localhost.v1.MsgCreateClient(); + if (object.signer != null) + if (typeof object.signer === "string") + $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); + else if (object.signer.length) + message.signer = object.signer; + return message; + }; + + /** + * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. + * @function toObject + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @static + * @param {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} message MsgCreateClient + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MsgCreateClient.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.signer = ""; + else { + object.signer = []; + if (options.bytes !== Array) + object.signer = $util.newBuffer(object.signer); + } + if (message.signer != null && message.hasOwnProperty("signer")) + object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; + return object; + }; + + /** + * Converts this MsgCreateClient to JSON. + * @function toJSON + * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient + * @instance + * @returns {Object.} JSON object + */ + MsgCreateClient.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MsgCreateClient; + })(); + + return v1; + })(); + + return localhost; + })(); + + return ibc; + })(); + + return cosmos_sdk; +})(); + +$root.cosmos_proto = (function() { + + /** + * Namespace cosmos_proto. + * @exports cosmos_proto + * @namespace + */ + var cosmos_proto = {}; + + return cosmos_proto; +})(); + +$root.gogoproto = (function() { + + /** + * Namespace gogoproto. + * @exports gogoproto + * @namespace + */ + var gogoproto = {}; + + return gogoproto; +})(); + +$root.tendermint = (function() { + + /** + * Namespace tendermint. + * @exports tendermint + * @namespace + */ + var tendermint = {}; + + tendermint.abci = (function() { + + /** + * Namespace abci. + * @memberof tendermint + * @namespace + */ + var abci = {}; + + abci.types = (function() { + + /** + * Namespace types. + * @memberof tendermint.abci + * @namespace + */ + var types = {}; + + types.Request = (function() { + + /** + * Properties of a Request. + * @memberof tendermint.abci.types + * @interface IRequest + * @property {tendermint.abci.types.IRequestEcho|null} [echo] Request echo + * @property {tendermint.abci.types.IRequestFlush|null} [flush] Request flush + * @property {tendermint.abci.types.IRequestInfo|null} [info] Request info + * @property {tendermint.abci.types.IRequestSetOption|null} [setOption] Request setOption + * @property {tendermint.abci.types.IRequestInitChain|null} [initChain] Request initChain + * @property {tendermint.abci.types.IRequestQuery|null} [query] Request query + * @property {tendermint.abci.types.IRequestBeginBlock|null} [beginBlock] Request beginBlock + * @property {tendermint.abci.types.IRequestCheckTx|null} [checkTx] Request checkTx + * @property {tendermint.abci.types.IRequestDeliverTx|null} [deliverTx] Request deliverTx + * @property {tendermint.abci.types.IRequestEndBlock|null} [endBlock] Request endBlock + * @property {tendermint.abci.types.IRequestCommit|null} [commit] Request commit + */ + + /** + * Constructs a new Request. + * @memberof tendermint.abci.types + * @classdesc Represents a Request. + * @implements IRequest + * @constructor + * @param {tendermint.abci.types.IRequest=} [properties] Properties to set + */ + function Request(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Request echo. + * @member {tendermint.abci.types.IRequestEcho|null|undefined} echo + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.echo = null; + + /** + * Request flush. + * @member {tendermint.abci.types.IRequestFlush|null|undefined} flush + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.flush = null; + + /** + * Request info. + * @member {tendermint.abci.types.IRequestInfo|null|undefined} info + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.info = null; + + /** + * Request setOption. + * @member {tendermint.abci.types.IRequestSetOption|null|undefined} setOption + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.setOption = null; + + /** + * Request initChain. + * @member {tendermint.abci.types.IRequestInitChain|null|undefined} initChain + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.initChain = null; + + /** + * Request query. + * @member {tendermint.abci.types.IRequestQuery|null|undefined} query + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.query = null; + + /** + * Request beginBlock. + * @member {tendermint.abci.types.IRequestBeginBlock|null|undefined} beginBlock + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.beginBlock = null; + + /** + * Request checkTx. + * @member {tendermint.abci.types.IRequestCheckTx|null|undefined} checkTx + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.checkTx = null; + + /** + * Request deliverTx. + * @member {tendermint.abci.types.IRequestDeliverTx|null|undefined} deliverTx + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.deliverTx = null; + + /** + * Request endBlock. + * @member {tendermint.abci.types.IRequestEndBlock|null|undefined} endBlock + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.endBlock = null; + + /** + * Request commit. + * @member {tendermint.abci.types.IRequestCommit|null|undefined} commit + * @memberof tendermint.abci.types.Request + * @instance + */ + Request.prototype.commit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Request value. + * @member {"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|undefined} value + * @memberof tendermint.abci.types.Request + * @instance + */ + Object.defineProperty(Request.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["echo", "flush", "info", "setOption", "initChain", "query", "beginBlock", "checkTx", "deliverTx", "endBlock", "commit"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Request instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.Request + * @static + * @param {tendermint.abci.types.IRequest=} [properties] Properties to set + * @returns {tendermint.abci.types.Request} Request instance + */ + Request.create = function create(properties) { + return new Request(properties); + }; + + /** + * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.Request + * @static + * @param {tendermint.abci.types.IRequest} message Request message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Request.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) + $root.tendermint.abci.types.RequestEcho.encode(message.echo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) + $root.tendermint.abci.types.RequestFlush.encode(message.flush, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.tendermint.abci.types.RequestInfo.encode(message.info, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) + $root.tendermint.abci.types.RequestSetOption.encode(message.setOption, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) + $root.tendermint.abci.types.RequestInitChain.encode(message.initChain, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.tendermint.abci.types.RequestQuery.encode(message.query, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) + $root.tendermint.abci.types.RequestBeginBlock.encode(message.beginBlock, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) + $root.tendermint.abci.types.RequestCheckTx.encode(message.checkTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) + $root.tendermint.abci.types.RequestEndBlock.encode(message.endBlock, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.abci.types.RequestCommit.encode(message.commit, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) + $root.tendermint.abci.types.RequestDeliverTx.encode(message.deliverTx, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.Request + * @static + * @param {tendermint.abci.types.IRequest} message Request message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Request.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Request message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.Request + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.Request} Request + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Request.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Request(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.echo = $root.tendermint.abci.types.RequestEcho.decode(reader, reader.uint32()); + break; + case 3: + message.flush = $root.tendermint.abci.types.RequestFlush.decode(reader, reader.uint32()); + break; + case 4: + message.info = $root.tendermint.abci.types.RequestInfo.decode(reader, reader.uint32()); + break; + case 5: + message.setOption = $root.tendermint.abci.types.RequestSetOption.decode(reader, reader.uint32()); + break; + case 6: + message.initChain = $root.tendermint.abci.types.RequestInitChain.decode(reader, reader.uint32()); + break; + case 7: + message.query = $root.tendermint.abci.types.RequestQuery.decode(reader, reader.uint32()); + break; + case 8: + message.beginBlock = $root.tendermint.abci.types.RequestBeginBlock.decode(reader, reader.uint32()); + break; + case 9: + message.checkTx = $root.tendermint.abci.types.RequestCheckTx.decode(reader, reader.uint32()); + break; + case 19: + message.deliverTx = $root.tendermint.abci.types.RequestDeliverTx.decode(reader, reader.uint32()); + break; + case 11: + message.endBlock = $root.tendermint.abci.types.RequestEndBlock.decode(reader, reader.uint32()); + break; + case 12: + message.commit = $root.tendermint.abci.types.RequestCommit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Request message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.Request + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.Request} Request + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Request.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Request message. + * @function verify + * @memberof tendermint.abci.types.Request + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Request.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.echo != null && message.hasOwnProperty("echo")) { + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestEcho.verify(message.echo); + if (error) + return "echo." + error; + } + } + if (message.flush != null && message.hasOwnProperty("flush")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestFlush.verify(message.flush); + if (error) + return "flush." + error; + } + } + if (message.info != null && message.hasOwnProperty("info")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestInfo.verify(message.info); + if (error) + return "info." + error; + } + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestSetOption.verify(message.setOption); + if (error) + return "setOption." + error; + } + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestInitChain.verify(message.initChain); + if (error) + return "initChain." + error; + } + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestBeginBlock.verify(message.beginBlock); + if (error) + return "beginBlock." + error; + } + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestCheckTx.verify(message.checkTx); + if (error) + return "checkTx." + error; + } + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestDeliverTx.verify(message.deliverTx); + if (error) + return "deliverTx." + error; + } + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestEndBlock.verify(message.endBlock); + if (error) + return "endBlock." + error; + } + } + if (message.commit != null && message.hasOwnProperty("commit")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.RequestCommit.verify(message.commit); + if (error) + return "commit." + error; + } + } + return null; + }; + + /** + * Creates a Request message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.Request + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.Request} Request + */ + Request.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.Request) + return object; + var message = new $root.tendermint.abci.types.Request(); + if (object.echo != null) { + if (typeof object.echo !== "object") + throw TypeError(".tendermint.abci.types.Request.echo: object expected"); + message.echo = $root.tendermint.abci.types.RequestEcho.fromObject(object.echo); + } + if (object.flush != null) { + if (typeof object.flush !== "object") + throw TypeError(".tendermint.abci.types.Request.flush: object expected"); + message.flush = $root.tendermint.abci.types.RequestFlush.fromObject(object.flush); + } + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".tendermint.abci.types.Request.info: object expected"); + message.info = $root.tendermint.abci.types.RequestInfo.fromObject(object.info); + } + if (object.setOption != null) { + if (typeof object.setOption !== "object") + throw TypeError(".tendermint.abci.types.Request.setOption: object expected"); + message.setOption = $root.tendermint.abci.types.RequestSetOption.fromObject(object.setOption); + } + if (object.initChain != null) { + if (typeof object.initChain !== "object") + throw TypeError(".tendermint.abci.types.Request.initChain: object expected"); + message.initChain = $root.tendermint.abci.types.RequestInitChain.fromObject(object.initChain); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".tendermint.abci.types.Request.query: object expected"); + message.query = $root.tendermint.abci.types.RequestQuery.fromObject(object.query); + } + if (object.beginBlock != null) { + if (typeof object.beginBlock !== "object") + throw TypeError(".tendermint.abci.types.Request.beginBlock: object expected"); + message.beginBlock = $root.tendermint.abci.types.RequestBeginBlock.fromObject(object.beginBlock); + } + if (object.checkTx != null) { + if (typeof object.checkTx !== "object") + throw TypeError(".tendermint.abci.types.Request.checkTx: object expected"); + message.checkTx = $root.tendermint.abci.types.RequestCheckTx.fromObject(object.checkTx); + } + if (object.deliverTx != null) { + if (typeof object.deliverTx !== "object") + throw TypeError(".tendermint.abci.types.Request.deliverTx: object expected"); + message.deliverTx = $root.tendermint.abci.types.RequestDeliverTx.fromObject(object.deliverTx); + } + if (object.endBlock != null) { + if (typeof object.endBlock !== "object") + throw TypeError(".tendermint.abci.types.Request.endBlock: object expected"); + message.endBlock = $root.tendermint.abci.types.RequestEndBlock.fromObject(object.endBlock); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.abci.types.Request.commit: object expected"); + message.commit = $root.tendermint.abci.types.RequestCommit.fromObject(object.commit); + } + return message; + }; + + /** + * Creates a plain object from a Request message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.Request + * @static + * @param {tendermint.abci.types.Request} message Request + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Request.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.echo != null && message.hasOwnProperty("echo")) { + object.echo = $root.tendermint.abci.types.RequestEcho.toObject(message.echo, options); + if (options.oneofs) + object.value = "echo"; + } + if (message.flush != null && message.hasOwnProperty("flush")) { + object.flush = $root.tendermint.abci.types.RequestFlush.toObject(message.flush, options); + if (options.oneofs) + object.value = "flush"; + } + if (message.info != null && message.hasOwnProperty("info")) { + object.info = $root.tendermint.abci.types.RequestInfo.toObject(message.info, options); + if (options.oneofs) + object.value = "info"; + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + object.setOption = $root.tendermint.abci.types.RequestSetOption.toObject(message.setOption, options); + if (options.oneofs) + object.value = "setOption"; + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + object.initChain = $root.tendermint.abci.types.RequestInitChain.toObject(message.initChain, options); + if (options.oneofs) + object.value = "initChain"; + } + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.tendermint.abci.types.RequestQuery.toObject(message.query, options); + if (options.oneofs) + object.value = "query"; + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + object.beginBlock = $root.tendermint.abci.types.RequestBeginBlock.toObject(message.beginBlock, options); + if (options.oneofs) + object.value = "beginBlock"; + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + object.checkTx = $root.tendermint.abci.types.RequestCheckTx.toObject(message.checkTx, options); + if (options.oneofs) + object.value = "checkTx"; + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + object.endBlock = $root.tendermint.abci.types.RequestEndBlock.toObject(message.endBlock, options); + if (options.oneofs) + object.value = "endBlock"; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + object.commit = $root.tendermint.abci.types.RequestCommit.toObject(message.commit, options); + if (options.oneofs) + object.value = "commit"; + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + object.deliverTx = $root.tendermint.abci.types.RequestDeliverTx.toObject(message.deliverTx, options); + if (options.oneofs) + object.value = "deliverTx"; + } + return object; + }; + + /** + * Converts this Request to JSON. + * @function toJSON + * @memberof tendermint.abci.types.Request + * @instance + * @returns {Object.} JSON object + */ + Request.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Request; + })(); + + types.RequestEcho = (function() { + + /** + * Properties of a RequestEcho. + * @memberof tendermint.abci.types + * @interface IRequestEcho + * @property {string|null} [message] RequestEcho message + */ + + /** + * Constructs a new RequestEcho. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestEcho. + * @implements IRequestEcho + * @constructor + * @param {tendermint.abci.types.IRequestEcho=} [properties] Properties to set + */ + function RequestEcho(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestEcho message. + * @member {string} message + * @memberof tendermint.abci.types.RequestEcho + * @instance + */ + RequestEcho.prototype.message = ""; + + /** + * Creates a new RequestEcho instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestEcho + * @static + * @param {tendermint.abci.types.IRequestEcho=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestEcho} RequestEcho instance + */ + RequestEcho.create = function create(properties) { + return new RequestEcho(properties); + }; + + /** + * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestEcho + * @static + * @param {tendermint.abci.types.IRequestEcho} message RequestEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEcho.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestEcho + * @static + * @param {tendermint.abci.types.IRequestEcho} message RequestEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEcho.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestEcho message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestEcho} RequestEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEcho.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestEcho(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestEcho message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestEcho} RequestEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEcho.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestEcho message. + * @function verify + * @memberof tendermint.abci.types.RequestEcho + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestEcho.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a RequestEcho message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestEcho + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestEcho} RequestEcho + */ + RequestEcho.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestEcho) + return object; + var message = new $root.tendermint.abci.types.RequestEcho(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a RequestEcho message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestEcho + * @static + * @param {tendermint.abci.types.RequestEcho} message RequestEcho + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestEcho.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this RequestEcho to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestEcho + * @instance + * @returns {Object.} JSON object + */ + RequestEcho.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestEcho; + })(); + + types.RequestFlush = (function() { + + /** + * Properties of a RequestFlush. + * @memberof tendermint.abci.types + * @interface IRequestFlush + */ + + /** + * Constructs a new RequestFlush. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestFlush. + * @implements IRequestFlush + * @constructor + * @param {tendermint.abci.types.IRequestFlush=} [properties] Properties to set + */ + function RequestFlush(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestFlush instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestFlush + * @static + * @param {tendermint.abci.types.IRequestFlush=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestFlush} RequestFlush instance + */ + RequestFlush.create = function create(properties) { + return new RequestFlush(properties); + }; + + /** + * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestFlush + * @static + * @param {tendermint.abci.types.IRequestFlush} message RequestFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestFlush.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestFlush + * @static + * @param {tendermint.abci.types.IRequestFlush} message RequestFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestFlush.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestFlush message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestFlush} RequestFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestFlush.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestFlush(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestFlush message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestFlush} RequestFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestFlush.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestFlush message. + * @function verify + * @memberof tendermint.abci.types.RequestFlush + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestFlush.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestFlush message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestFlush + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestFlush} RequestFlush + */ + RequestFlush.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestFlush) + return object; + return new $root.tendermint.abci.types.RequestFlush(); + }; + + /** + * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestFlush + * @static + * @param {tendermint.abci.types.RequestFlush} message RequestFlush + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestFlush.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestFlush to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestFlush + * @instance + * @returns {Object.} JSON object + */ + RequestFlush.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestFlush; + })(); + + types.RequestInfo = (function() { + + /** + * Properties of a RequestInfo. + * @memberof tendermint.abci.types + * @interface IRequestInfo + * @property {string|null} [version] RequestInfo version + * @property {number|Long|null} [blockVersion] RequestInfo blockVersion + * @property {number|Long|null} [p2pVersion] RequestInfo p2pVersion + */ + + /** + * Constructs a new RequestInfo. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestInfo. + * @implements IRequestInfo + * @constructor + * @param {tendermint.abci.types.IRequestInfo=} [properties] Properties to set + */ + function RequestInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestInfo version. + * @member {string} version + * @memberof tendermint.abci.types.RequestInfo + * @instance + */ + RequestInfo.prototype.version = ""; + + /** + * RequestInfo blockVersion. + * @member {number|Long} blockVersion + * @memberof tendermint.abci.types.RequestInfo + * @instance + */ + RequestInfo.prototype.blockVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * RequestInfo p2pVersion. + * @member {number|Long} p2pVersion + * @memberof tendermint.abci.types.RequestInfo + * @instance + */ + RequestInfo.prototype.p2pVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestInfo + * @static + * @param {tendermint.abci.types.IRequestInfo=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestInfo} RequestInfo instance + */ + RequestInfo.create = function create(properties) { + return new RequestInfo(properties); + }; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestInfo + * @static + * @param {tendermint.abci.types.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.blockVersion != null && Object.hasOwnProperty.call(message, "blockVersion")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.blockVersion); + if (message.p2pVersion != null && Object.hasOwnProperty.call(message, "p2pVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.p2pVersion); + return writer; + }; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestInfo + * @static + * @param {tendermint.abci.types.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = reader.string(); + break; + case 2: + message.blockVersion = reader.uint64(); + break; + case 3: + message.p2pVersion = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInfo message. + * @function verify + * @memberof tendermint.abci.types.RequestInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) + if (!$util.isInteger(message.blockVersion) && !(message.blockVersion && $util.isInteger(message.blockVersion.low) && $util.isInteger(message.blockVersion.high))) + return "blockVersion: integer|Long expected"; + if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) + if (!$util.isInteger(message.p2pVersion) && !(message.p2pVersion && $util.isInteger(message.p2pVersion.low) && $util.isInteger(message.p2pVersion.high))) + return "p2pVersion: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestInfo} RequestInfo + */ + RequestInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestInfo) + return object; + var message = new $root.tendermint.abci.types.RequestInfo(); + if (object.version != null) + message.version = String(object.version); + if (object.blockVersion != null) + if ($util.Long) + (message.blockVersion = $util.Long.fromValue(object.blockVersion)).unsigned = true; + else if (typeof object.blockVersion === "string") + message.blockVersion = parseInt(object.blockVersion, 10); + else if (typeof object.blockVersion === "number") + message.blockVersion = object.blockVersion; + else if (typeof object.blockVersion === "object") + message.blockVersion = new $util.LongBits(object.blockVersion.low >>> 0, object.blockVersion.high >>> 0).toNumber(true); + if (object.p2pVersion != null) + if ($util.Long) + (message.p2pVersion = $util.Long.fromValue(object.p2pVersion)).unsigned = true; + else if (typeof object.p2pVersion === "string") + message.p2pVersion = parseInt(object.p2pVersion, 10); + else if (typeof object.p2pVersion === "number") + message.p2pVersion = object.p2pVersion; + else if (typeof object.p2pVersion === "object") + message.p2pVersion = new $util.LongBits(object.p2pVersion.low >>> 0, object.p2pVersion.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestInfo + * @static + * @param {tendermint.abci.types.RequestInfo} message RequestInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.blockVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockVersion = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.p2pVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.p2pVersion = options.longs === String ? "0" : 0; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) + if (typeof message.blockVersion === "number") + object.blockVersion = options.longs === String ? String(message.blockVersion) : message.blockVersion; + else + object.blockVersion = options.longs === String ? $util.Long.prototype.toString.call(message.blockVersion) : options.longs === Number ? new $util.LongBits(message.blockVersion.low >>> 0, message.blockVersion.high >>> 0).toNumber(true) : message.blockVersion; + if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) + if (typeof message.p2pVersion === "number") + object.p2pVersion = options.longs === String ? String(message.p2pVersion) : message.p2pVersion; + else + object.p2pVersion = options.longs === String ? $util.Long.prototype.toString.call(message.p2pVersion) : options.longs === Number ? new $util.LongBits(message.p2pVersion.low >>> 0, message.p2pVersion.high >>> 0).toNumber(true) : message.p2pVersion; + return object; + }; + + /** + * Converts this RequestInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestInfo + * @instance + * @returns {Object.} JSON object + */ + RequestInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestInfo; + })(); + + types.RequestSetOption = (function() { + + /** + * Properties of a RequestSetOption. + * @memberof tendermint.abci.types + * @interface IRequestSetOption + * @property {string|null} [key] RequestSetOption key + * @property {string|null} [value] RequestSetOption value + */ + + /** + * Constructs a new RequestSetOption. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestSetOption. + * @implements IRequestSetOption + * @constructor + * @param {tendermint.abci.types.IRequestSetOption=} [properties] Properties to set + */ + function RequestSetOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestSetOption key. + * @member {string} key + * @memberof tendermint.abci.types.RequestSetOption + * @instance + */ + RequestSetOption.prototype.key = ""; + + /** + * RequestSetOption value. + * @member {string} value + * @memberof tendermint.abci.types.RequestSetOption + * @instance + */ + RequestSetOption.prototype.value = ""; + + /** + * Creates a new RequestSetOption instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestSetOption + * @static + * @param {tendermint.abci.types.IRequestSetOption=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestSetOption} RequestSetOption instance + */ + RequestSetOption.create = function create(properties) { + return new RequestSetOption(properties); + }; + + /** + * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestSetOption + * @static + * @param {tendermint.abci.types.IRequestSetOption} message RequestSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestSetOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestSetOption + * @static + * @param {tendermint.abci.types.IRequestSetOption} message RequestSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestSetOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestSetOption} RequestSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestSetOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestSetOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.string(); + break; + case 2: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestSetOption} RequestSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestSetOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestSetOption message. + * @function verify + * @memberof tendermint.abci.types.RequestSetOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestSetOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a RequestSetOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestSetOption + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestSetOption} RequestSetOption + */ + RequestSetOption.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestSetOption) + return object; + var message = new $root.tendermint.abci.types.RequestSetOption(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a RequestSetOption message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestSetOption + * @static + * @param {tendermint.abci.types.RequestSetOption} message RequestSetOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestSetOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.value = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this RequestSetOption to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestSetOption + * @instance + * @returns {Object.} JSON object + */ + RequestSetOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestSetOption; + })(); + + types.RequestInitChain = (function() { + + /** + * Properties of a RequestInitChain. + * @memberof tendermint.abci.types + * @interface IRequestInitChain + * @property {google.protobuf.ITimestamp|null} [time] RequestInitChain time + * @property {string|null} [chainId] RequestInitChain chainId + * @property {tendermint.abci.types.IConsensusParams|null} [consensusParams] RequestInitChain consensusParams + * @property {Array.|null} [validators] RequestInitChain validators + * @property {Uint8Array|null} [appStateBytes] RequestInitChain appStateBytes + */ + + /** + * Constructs a new RequestInitChain. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestInitChain. + * @implements IRequestInitChain + * @constructor + * @param {tendermint.abci.types.IRequestInitChain=} [properties] Properties to set + */ + function RequestInitChain(properties) { + this.validators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestInitChain time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.abci.types.RequestInitChain + * @instance + */ + RequestInitChain.prototype.time = null; + + /** + * RequestInitChain chainId. + * @member {string} chainId + * @memberof tendermint.abci.types.RequestInitChain + * @instance + */ + RequestInitChain.prototype.chainId = ""; + + /** + * RequestInitChain consensusParams. + * @member {tendermint.abci.types.IConsensusParams|null|undefined} consensusParams + * @memberof tendermint.abci.types.RequestInitChain + * @instance + */ + RequestInitChain.prototype.consensusParams = null; + + /** + * RequestInitChain validators. + * @member {Array.} validators + * @memberof tendermint.abci.types.RequestInitChain + * @instance + */ + RequestInitChain.prototype.validators = $util.emptyArray; + + /** + * RequestInitChain appStateBytes. + * @member {Uint8Array} appStateBytes + * @memberof tendermint.abci.types.RequestInitChain + * @instance + */ + RequestInitChain.prototype.appStateBytes = $util.newBuffer([]); + + /** + * Creates a new RequestInitChain instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestInitChain + * @static + * @param {tendermint.abci.types.IRequestInitChain=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestInitChain} RequestInitChain instance + */ + RequestInitChain.create = function create(properties) { + return new RequestInitChain(properties); + }; + + /** + * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestInitChain + * @static + * @param {tendermint.abci.types.IRequestInitChain} message RequestInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInitChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); + if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) + $root.tendermint.abci.types.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.validators != null && message.validators.length) + for (var i = 0; i < message.validators.length; ++i) + $root.tendermint.abci.types.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.appStateBytes != null && Object.hasOwnProperty.call(message, "appStateBytes")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.appStateBytes); + return writer; + }; + + /** + * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestInitChain + * @static + * @param {tendermint.abci.types.IRequestInitChain} message RequestInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInitChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestInitChain} RequestInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInitChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestInitChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.consensusParams = $root.tendermint.abci.types.ConsensusParams.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.abci.types.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 5: + message.appStateBytes = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestInitChain} RequestInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInitChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInitChain message. + * @function verify + * @memberof tendermint.abci.types.RequestInitChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInitChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { + var error = $root.tendermint.abci.types.ConsensusParams.verify(message.consensusParams); + if (error) + return "consensusParams." + error; + } + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (var i = 0; i < message.validators.length; ++i) { + var error = $root.tendermint.abci.types.ValidatorUpdate.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) + if (!(message.appStateBytes && typeof message.appStateBytes.length === "number" || $util.isString(message.appStateBytes))) + return "appStateBytes: buffer expected"; + return null; + }; + + /** + * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestInitChain + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestInitChain} RequestInitChain + */ + RequestInitChain.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestInitChain) + return object; + var message = new $root.tendermint.abci.types.RequestInitChain(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.abci.types.RequestInitChain.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.consensusParams != null) { + if (typeof object.consensusParams !== "object") + throw TypeError(".tendermint.abci.types.RequestInitChain.consensusParams: object expected"); + message.consensusParams = $root.tendermint.abci.types.ConsensusParams.fromObject(object.consensusParams); + } + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.abci.types.RequestInitChain.validators: array expected"); + message.validators = []; + for (var i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.abci.types.RequestInitChain.validators: object expected"); + message.validators[i] = $root.tendermint.abci.types.ValidatorUpdate.fromObject(object.validators[i]); + } + } + if (object.appStateBytes != null) + if (typeof object.appStateBytes === "string") + $util.base64.decode(object.appStateBytes, message.appStateBytes = $util.newBuffer($util.base64.length(object.appStateBytes)), 0); + else if (object.appStateBytes.length) + message.appStateBytes = object.appStateBytes; + return message; + }; + + /** + * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestInitChain + * @static + * @param {tendermint.abci.types.RequestInitChain} message RequestInitChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInitChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) { + object.time = null; + object.chainId = ""; + object.consensusParams = null; + if (options.bytes === String) + object.appStateBytes = ""; + else { + object.appStateBytes = []; + if (options.bytes !== Array) + object.appStateBytes = $util.newBuffer(object.appStateBytes); + } + } + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) + object.consensusParams = $root.tendermint.abci.types.ConsensusParams.toObject(message.consensusParams, options); + if (message.validators && message.validators.length) { + object.validators = []; + for (var j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.abci.types.ValidatorUpdate.toObject(message.validators[j], options); + } + if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) + object.appStateBytes = options.bytes === String ? $util.base64.encode(message.appStateBytes, 0, message.appStateBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.appStateBytes) : message.appStateBytes; + return object; + }; + + /** + * Converts this RequestInitChain to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestInitChain + * @instance + * @returns {Object.} JSON object + */ + RequestInitChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestInitChain; + })(); + + types.RequestQuery = (function() { + + /** + * Properties of a RequestQuery. + * @memberof tendermint.abci.types + * @interface IRequestQuery + * @property {Uint8Array|null} [data] RequestQuery data + * @property {string|null} [path] RequestQuery path + * @property {number|Long|null} [height] RequestQuery height + * @property {boolean|null} [prove] RequestQuery prove + */ + + /** + * Constructs a new RequestQuery. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestQuery. + * @implements IRequestQuery + * @constructor + * @param {tendermint.abci.types.IRequestQuery=} [properties] Properties to set + */ + function RequestQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestQuery data. + * @member {Uint8Array} data + * @memberof tendermint.abci.types.RequestQuery + * @instance + */ + RequestQuery.prototype.data = $util.newBuffer([]); + + /** + * RequestQuery path. + * @member {string} path + * @memberof tendermint.abci.types.RequestQuery + * @instance + */ + RequestQuery.prototype.path = ""; + + /** + * RequestQuery height. + * @member {number|Long} height + * @memberof tendermint.abci.types.RequestQuery + * @instance + */ + RequestQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * RequestQuery prove. + * @member {boolean} prove + * @memberof tendermint.abci.types.RequestQuery + * @instance + */ + RequestQuery.prototype.prove = false; + + /** + * Creates a new RequestQuery instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestQuery + * @static + * @param {tendermint.abci.types.IRequestQuery=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestQuery} RequestQuery instance + */ + RequestQuery.create = function create(properties) { + return new RequestQuery(properties); + }; + + /** + * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestQuery + * @static + * @param {tendermint.abci.types.IRequestQuery} message RequestQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestQuery + * @static + * @param {tendermint.abci.types.IRequestQuery} message RequestQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestQuery message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestQuery} RequestQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.bytes(); + break; + case 2: + message.path = reader.string(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestQuery} RequestQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestQuery message. + * @function verify + * @memberof tendermint.abci.types.RequestQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a RequestQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestQuery + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestQuery} RequestQuery + */ + RequestQuery.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestQuery) + return object; + var message = new $root.tendermint.abci.types.RequestQuery(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.path != null) + message.path = String(object.path); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a RequestQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestQuery + * @static + * @param {tendermint.abci.types.RequestQuery} message RequestQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.path = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.prove = false; + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this RequestQuery to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestQuery + * @instance + * @returns {Object.} JSON object + */ + RequestQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestQuery; + })(); + + types.RequestBeginBlock = (function() { + + /** + * Properties of a RequestBeginBlock. + * @memberof tendermint.abci.types + * @interface IRequestBeginBlock + * @property {Uint8Array|null} [hash] RequestBeginBlock hash + * @property {tendermint.abci.types.IHeader|null} [header] RequestBeginBlock header + * @property {tendermint.abci.types.ILastCommitInfo|null} [lastCommitInfo] RequestBeginBlock lastCommitInfo + * @property {Array.|null} [byzantineValidators] RequestBeginBlock byzantineValidators + */ + + /** + * Constructs a new RequestBeginBlock. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestBeginBlock. + * @implements IRequestBeginBlock + * @constructor + * @param {tendermint.abci.types.IRequestBeginBlock=} [properties] Properties to set + */ + function RequestBeginBlock(properties) { + this.byzantineValidators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestBeginBlock hash. + * @member {Uint8Array} hash + * @memberof tendermint.abci.types.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.hash = $util.newBuffer([]); + + /** + * RequestBeginBlock header. + * @member {tendermint.abci.types.IHeader|null|undefined} header + * @memberof tendermint.abci.types.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.header = null; + + /** + * RequestBeginBlock lastCommitInfo. + * @member {tendermint.abci.types.ILastCommitInfo|null|undefined} lastCommitInfo + * @memberof tendermint.abci.types.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.lastCommitInfo = null; + + /** + * RequestBeginBlock byzantineValidators. + * @member {Array.} byzantineValidators + * @memberof tendermint.abci.types.RequestBeginBlock + * @instance + */ + RequestBeginBlock.prototype.byzantineValidators = $util.emptyArray; + + /** + * Creates a new RequestBeginBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestBeginBlock + * @static + * @param {tendermint.abci.types.IRequestBeginBlock=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestBeginBlock} RequestBeginBlock instance + */ + RequestBeginBlock.create = function create(properties) { + return new RequestBeginBlock(properties); + }; + + /** + * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestBeginBlock + * @static + * @param {tendermint.abci.types.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBeginBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + if (message.header != null && Object.hasOwnProperty.call(message, "header")) + $root.tendermint.abci.types.Header.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.lastCommitInfo != null && Object.hasOwnProperty.call(message, "lastCommitInfo")) + $root.tendermint.abci.types.LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.byzantineValidators != null && message.byzantineValidators.length) + for (var i = 0; i < message.byzantineValidators.length; ++i) + $root.tendermint.abci.types.Evidence.encode(message.byzantineValidators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestBeginBlock + * @static + * @param {tendermint.abci.types.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestBeginBlock} RequestBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBeginBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestBeginBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.header = $root.tendermint.abci.types.Header.decode(reader, reader.uint32()); + break; + case 3: + message.lastCommitInfo = $root.tendermint.abci.types.LastCommitInfo.decode(reader, reader.uint32()); + break; + case 4: + if (!(message.byzantineValidators && message.byzantineValidators.length)) + message.byzantineValidators = []; + message.byzantineValidators.push($root.tendermint.abci.types.Evidence.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestBeginBlock} RequestBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestBeginBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestBeginBlock message. + * @function verify + * @memberof tendermint.abci.types.RequestBeginBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestBeginBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.header != null && message.hasOwnProperty("header")) { + var error = $root.tendermint.abci.types.Header.verify(message.header); + if (error) + return "header." + error; + } + if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) { + var error = $root.tendermint.abci.types.LastCommitInfo.verify(message.lastCommitInfo); + if (error) + return "lastCommitInfo." + error; + } + if (message.byzantineValidators != null && message.hasOwnProperty("byzantineValidators")) { + if (!Array.isArray(message.byzantineValidators)) + return "byzantineValidators: array expected"; + for (var i = 0; i < message.byzantineValidators.length; ++i) { + var error = $root.tendermint.abci.types.Evidence.verify(message.byzantineValidators[i]); + if (error) + return "byzantineValidators." + error; + } + } + return null; + }; + + /** + * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestBeginBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestBeginBlock} RequestBeginBlock + */ + RequestBeginBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestBeginBlock) + return object; + var message = new $root.tendermint.abci.types.RequestBeginBlock(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.header != null) { + if (typeof object.header !== "object") + throw TypeError(".tendermint.abci.types.RequestBeginBlock.header: object expected"); + message.header = $root.tendermint.abci.types.Header.fromObject(object.header); + } + if (object.lastCommitInfo != null) { + if (typeof object.lastCommitInfo !== "object") + throw TypeError(".tendermint.abci.types.RequestBeginBlock.lastCommitInfo: object expected"); + message.lastCommitInfo = $root.tendermint.abci.types.LastCommitInfo.fromObject(object.lastCommitInfo); + } + if (object.byzantineValidators) { + if (!Array.isArray(object.byzantineValidators)) + throw TypeError(".tendermint.abci.types.RequestBeginBlock.byzantineValidators: array expected"); + message.byzantineValidators = []; + for (var i = 0; i < object.byzantineValidators.length; ++i) { + if (typeof object.byzantineValidators[i] !== "object") + throw TypeError(".tendermint.abci.types.RequestBeginBlock.byzantineValidators: object expected"); + message.byzantineValidators[i] = $root.tendermint.abci.types.Evidence.fromObject(object.byzantineValidators[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestBeginBlock + * @static + * @param {tendermint.abci.types.RequestBeginBlock} message RequestBeginBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestBeginBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.byzantineValidators = []; + if (options.defaults) { + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.header = null; + object.lastCommitInfo = null; + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.header != null && message.hasOwnProperty("header")) + object.header = $root.tendermint.abci.types.Header.toObject(message.header, options); + if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) + object.lastCommitInfo = $root.tendermint.abci.types.LastCommitInfo.toObject(message.lastCommitInfo, options); + if (message.byzantineValidators && message.byzantineValidators.length) { + object.byzantineValidators = []; + for (var j = 0; j < message.byzantineValidators.length; ++j) + object.byzantineValidators[j] = $root.tendermint.abci.types.Evidence.toObject(message.byzantineValidators[j], options); + } + return object; + }; + + /** + * Converts this RequestBeginBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestBeginBlock + * @instance + * @returns {Object.} JSON object + */ + RequestBeginBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestBeginBlock; + })(); + + /** + * CheckTxType enum. + * @name tendermint.abci.types.CheckTxType + * @enum {number} + * @property {number} New=0 New value + * @property {number} Recheck=1 Recheck value + */ + types.CheckTxType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "New"] = 0; + values[valuesById[1] = "Recheck"] = 1; + return values; + })(); + + types.RequestCheckTx = (function() { + + /** + * Properties of a RequestCheckTx. + * @memberof tendermint.abci.types + * @interface IRequestCheckTx + * @property {Uint8Array|null} [tx] RequestCheckTx tx + * @property {tendermint.abci.types.CheckTxType|null} [type] RequestCheckTx type + */ + + /** + * Constructs a new RequestCheckTx. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestCheckTx. + * @implements IRequestCheckTx + * @constructor + * @param {tendermint.abci.types.IRequestCheckTx=} [properties] Properties to set + */ + function RequestCheckTx(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestCheckTx tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.types.RequestCheckTx + * @instance + */ + RequestCheckTx.prototype.tx = $util.newBuffer([]); + + /** + * RequestCheckTx type. + * @member {tendermint.abci.types.CheckTxType} type + * @memberof tendermint.abci.types.RequestCheckTx + * @instance + */ + RequestCheckTx.prototype.type = 0; + + /** + * Creates a new RequestCheckTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestCheckTx + * @static + * @param {tendermint.abci.types.IRequestCheckTx=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestCheckTx} RequestCheckTx instance + */ + RequestCheckTx.create = function create(properties) { + return new RequestCheckTx(properties); + }; + + /** + * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestCheckTx + * @static + * @param {tendermint.abci.types.IRequestCheckTx} message RequestCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCheckTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + return writer; + }; + + /** + * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestCheckTx + * @static + * @param {tendermint.abci.types.IRequestCheckTx} message RequestCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCheckTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestCheckTx} RequestCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCheckTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestCheckTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = reader.bytes(); + break; + case 2: + message.type = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestCheckTx} RequestCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCheckTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestCheckTx message. + * @function verify + * @memberof tendermint.abci.types.RequestCheckTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestCheckTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a RequestCheckTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestCheckTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestCheckTx} RequestCheckTx + */ + RequestCheckTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestCheckTx) + return object; + var message = new $root.tendermint.abci.types.RequestCheckTx(); + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + switch (object.type) { + case "New": + case 0: + message.type = 0; + break; + case "Recheck": + case 1: + message.type = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a RequestCheckTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestCheckTx + * @static + * @param {tendermint.abci.types.RequestCheckTx} message RequestCheckTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestCheckTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + object.type = options.enums === String ? "New" : 0; + } + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.tendermint.abci.types.CheckTxType[message.type] : message.type; + return object; + }; + + /** + * Converts this RequestCheckTx to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestCheckTx + * @instance + * @returns {Object.} JSON object + */ + RequestCheckTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestCheckTx; + })(); + + types.RequestDeliverTx = (function() { + + /** + * Properties of a RequestDeliverTx. + * @memberof tendermint.abci.types + * @interface IRequestDeliverTx + * @property {Uint8Array|null} [tx] RequestDeliverTx tx + */ + + /** + * Constructs a new RequestDeliverTx. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestDeliverTx. + * @implements IRequestDeliverTx + * @constructor + * @param {tendermint.abci.types.IRequestDeliverTx=} [properties] Properties to set + */ + function RequestDeliverTx(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestDeliverTx tx. + * @member {Uint8Array} tx + * @memberof tendermint.abci.types.RequestDeliverTx + * @instance + */ + RequestDeliverTx.prototype.tx = $util.newBuffer([]); + + /** + * Creates a new RequestDeliverTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestDeliverTx + * @static + * @param {tendermint.abci.types.IRequestDeliverTx=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestDeliverTx} RequestDeliverTx instance + */ + RequestDeliverTx.create = function create(properties) { + return new RequestDeliverTx(properties); + }; + + /** + * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestDeliverTx + * @static + * @param {tendermint.abci.types.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestDeliverTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); + return writer; + }; + + /** + * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestDeliverTx + * @static + * @param {tendermint.abci.types.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestDeliverTx} RequestDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestDeliverTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestDeliverTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.tx = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestDeliverTx} RequestDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestDeliverTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestDeliverTx message. + * @function verify + * @memberof tendermint.abci.types.RequestDeliverTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestDeliverTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tx != null && message.hasOwnProperty("tx")) + if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) + return "tx: buffer expected"; + return null; + }; + + /** + * Creates a RequestDeliverTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestDeliverTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestDeliverTx} RequestDeliverTx + */ + RequestDeliverTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestDeliverTx) + return object; + var message = new $root.tendermint.abci.types.RequestDeliverTx(); + if (object.tx != null) + if (typeof object.tx === "string") + $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); + else if (object.tx.length) + message.tx = object.tx; + return message; + }; + + /** + * Creates a plain object from a RequestDeliverTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestDeliverTx + * @static + * @param {tendermint.abci.types.RequestDeliverTx} message RequestDeliverTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestDeliverTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.tx = ""; + else { + object.tx = []; + if (options.bytes !== Array) + object.tx = $util.newBuffer(object.tx); + } + if (message.tx != null && message.hasOwnProperty("tx")) + object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; + return object; + }; + + /** + * Converts this RequestDeliverTx to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestDeliverTx + * @instance + * @returns {Object.} JSON object + */ + RequestDeliverTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestDeliverTx; + })(); + + types.RequestEndBlock = (function() { + + /** + * Properties of a RequestEndBlock. + * @memberof tendermint.abci.types + * @interface IRequestEndBlock + * @property {number|Long|null} [height] RequestEndBlock height + */ + + /** + * Constructs a new RequestEndBlock. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestEndBlock. + * @implements IRequestEndBlock + * @constructor + * @param {tendermint.abci.types.IRequestEndBlock=} [properties] Properties to set + */ + function RequestEndBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestEndBlock height. + * @member {number|Long} height + * @memberof tendermint.abci.types.RequestEndBlock + * @instance + */ + RequestEndBlock.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new RequestEndBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestEndBlock + * @static + * @param {tendermint.abci.types.IRequestEndBlock=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestEndBlock} RequestEndBlock instance + */ + RequestEndBlock.create = function create(properties) { + return new RequestEndBlock(properties); + }; + + /** + * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestEndBlock + * @static + * @param {tendermint.abci.types.IRequestEndBlock} message RequestEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEndBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); + return writer; + }; + + /** + * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestEndBlock + * @static + * @param {tendermint.abci.types.IRequestEndBlock} message RequestEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestEndBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestEndBlock} RequestEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEndBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestEndBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.height = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestEndBlock} RequestEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestEndBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestEndBlock message. + * @function verify + * @memberof tendermint.abci.types.RequestEndBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestEndBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + return null; + }; + + /** + * Creates a RequestEndBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestEndBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestEndBlock} RequestEndBlock + */ + RequestEndBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestEndBlock) + return object; + var message = new $root.tendermint.abci.types.RequestEndBlock(); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a RequestEndBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestEndBlock + * @static + * @param {tendermint.abci.types.RequestEndBlock} message RequestEndBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestEndBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + return object; + }; + + /** + * Converts this RequestEndBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestEndBlock + * @instance + * @returns {Object.} JSON object + */ + RequestEndBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestEndBlock; + })(); + + types.RequestCommit = (function() { + + /** + * Properties of a RequestCommit. + * @memberof tendermint.abci.types + * @interface IRequestCommit + */ + + /** + * Constructs a new RequestCommit. + * @memberof tendermint.abci.types + * @classdesc Represents a RequestCommit. + * @implements IRequestCommit + * @constructor + * @param {tendermint.abci.types.IRequestCommit=} [properties] Properties to set + */ + function RequestCommit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RequestCommit instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.RequestCommit + * @static + * @param {tendermint.abci.types.IRequestCommit=} [properties] Properties to set + * @returns {tendermint.abci.types.RequestCommit} RequestCommit instance + */ + RequestCommit.create = function create(properties) { + return new RequestCommit(properties); + }; + + /** + * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.RequestCommit + * @static + * @param {tendermint.abci.types.IRequestCommit} message RequestCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCommit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.RequestCommit + * @static + * @param {tendermint.abci.types.IRequestCommit} message RequestCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestCommit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestCommit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.RequestCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.RequestCommit} RequestCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCommit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestCommit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestCommit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.RequestCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.RequestCommit} RequestCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestCommit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestCommit message. + * @function verify + * @memberof tendermint.abci.types.RequestCommit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestCommit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a RequestCommit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.RequestCommit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.RequestCommit} RequestCommit + */ + RequestCommit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.RequestCommit) + return object; + return new $root.tendermint.abci.types.RequestCommit(); + }; + + /** + * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.RequestCommit + * @static + * @param {tendermint.abci.types.RequestCommit} message RequestCommit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestCommit.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RequestCommit to JSON. + * @function toJSON + * @memberof tendermint.abci.types.RequestCommit + * @instance + * @returns {Object.} JSON object + */ + RequestCommit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return RequestCommit; + })(); + + types.Response = (function() { + + /** + * Properties of a Response. + * @memberof tendermint.abci.types + * @interface IResponse + * @property {tendermint.abci.types.IResponseException|null} [exception] Response exception + * @property {tendermint.abci.types.IResponseEcho|null} [echo] Response echo + * @property {tendermint.abci.types.IResponseFlush|null} [flush] Response flush + * @property {tendermint.abci.types.IResponseInfo|null} [info] Response info + * @property {tendermint.abci.types.IResponseSetOption|null} [setOption] Response setOption + * @property {tendermint.abci.types.IResponseInitChain|null} [initChain] Response initChain + * @property {tendermint.abci.types.IResponseQuery|null} [query] Response query + * @property {tendermint.abci.types.IResponseBeginBlock|null} [beginBlock] Response beginBlock + * @property {tendermint.abci.types.IResponseCheckTx|null} [checkTx] Response checkTx + * @property {tendermint.abci.types.IResponseDeliverTx|null} [deliverTx] Response deliverTx + * @property {tendermint.abci.types.IResponseEndBlock|null} [endBlock] Response endBlock + * @property {tendermint.abci.types.IResponseCommit|null} [commit] Response commit + */ + + /** + * Constructs a new Response. + * @memberof tendermint.abci.types + * @classdesc Represents a Response. + * @implements IResponse + * @constructor + * @param {tendermint.abci.types.IResponse=} [properties] Properties to set + */ + function Response(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Response exception. + * @member {tendermint.abci.types.IResponseException|null|undefined} exception + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.exception = null; + + /** + * Response echo. + * @member {tendermint.abci.types.IResponseEcho|null|undefined} echo + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.echo = null; + + /** + * Response flush. + * @member {tendermint.abci.types.IResponseFlush|null|undefined} flush + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.flush = null; + + /** + * Response info. + * @member {tendermint.abci.types.IResponseInfo|null|undefined} info + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.info = null; + + /** + * Response setOption. + * @member {tendermint.abci.types.IResponseSetOption|null|undefined} setOption + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.setOption = null; + + /** + * Response initChain. + * @member {tendermint.abci.types.IResponseInitChain|null|undefined} initChain + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.initChain = null; + + /** + * Response query. + * @member {tendermint.abci.types.IResponseQuery|null|undefined} query + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.query = null; + + /** + * Response beginBlock. + * @member {tendermint.abci.types.IResponseBeginBlock|null|undefined} beginBlock + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.beginBlock = null; + + /** + * Response checkTx. + * @member {tendermint.abci.types.IResponseCheckTx|null|undefined} checkTx + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.checkTx = null; + + /** + * Response deliverTx. + * @member {tendermint.abci.types.IResponseDeliverTx|null|undefined} deliverTx + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.deliverTx = null; + + /** + * Response endBlock. + * @member {tendermint.abci.types.IResponseEndBlock|null|undefined} endBlock + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.endBlock = null; + + /** + * Response commit. + * @member {tendermint.abci.types.IResponseCommit|null|undefined} commit + * @memberof tendermint.abci.types.Response + * @instance + */ + Response.prototype.commit = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Response value. + * @member {"exception"|"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|undefined} value + * @memberof tendermint.abci.types.Response + * @instance + */ + 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) + }); + + /** + * Creates a new Response instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.Response + * @static + * @param {tendermint.abci.types.IResponse=} [properties] Properties to set + * @returns {tendermint.abci.types.Response} Response instance + */ + Response.create = function create(properties) { + return new Response(properties); + }; + + /** + * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.Response + * @static + * @param {tendermint.abci.types.IResponse} message Response message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Response.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exception != null && Object.hasOwnProperty.call(message, "exception")) + $root.tendermint.abci.types.ResponseException.encode(message.exception, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) + $root.tendermint.abci.types.ResponseEcho.encode(message.echo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) + $root.tendermint.abci.types.ResponseFlush.encode(message.flush, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + $root.tendermint.abci.types.ResponseInfo.encode(message.info, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) + $root.tendermint.abci.types.ResponseSetOption.encode(message.setOption, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) + $root.tendermint.abci.types.ResponseInitChain.encode(message.initChain, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + $root.tendermint.abci.types.ResponseQuery.encode(message.query, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) + $root.tendermint.abci.types.ResponseBeginBlock.encode(message.beginBlock, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) + $root.tendermint.abci.types.ResponseCheckTx.encode(message.checkTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) + $root.tendermint.abci.types.ResponseDeliverTx.encode(message.deliverTx, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) + $root.tendermint.abci.types.ResponseEndBlock.encode(message.endBlock, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) + $root.tendermint.abci.types.ResponseCommit.encode(message.commit, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.Response + * @static + * @param {tendermint.abci.types.IResponse} message Response message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Response.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Response message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.Response + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.Response} Response + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Response.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Response(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.exception = $root.tendermint.abci.types.ResponseException.decode(reader, reader.uint32()); + break; + case 2: + message.echo = $root.tendermint.abci.types.ResponseEcho.decode(reader, reader.uint32()); + break; + case 3: + message.flush = $root.tendermint.abci.types.ResponseFlush.decode(reader, reader.uint32()); + break; + case 4: + message.info = $root.tendermint.abci.types.ResponseInfo.decode(reader, reader.uint32()); + break; + case 5: + message.setOption = $root.tendermint.abci.types.ResponseSetOption.decode(reader, reader.uint32()); + break; + case 6: + message.initChain = $root.tendermint.abci.types.ResponseInitChain.decode(reader, reader.uint32()); + break; + case 7: + message.query = $root.tendermint.abci.types.ResponseQuery.decode(reader, reader.uint32()); + break; + case 8: + message.beginBlock = $root.tendermint.abci.types.ResponseBeginBlock.decode(reader, reader.uint32()); + break; + case 9: + message.checkTx = $root.tendermint.abci.types.ResponseCheckTx.decode(reader, reader.uint32()); + break; + case 10: + message.deliverTx = $root.tendermint.abci.types.ResponseDeliverTx.decode(reader, reader.uint32()); + break; + case 11: + message.endBlock = $root.tendermint.abci.types.ResponseEndBlock.decode(reader, reader.uint32()); + break; + case 12: + message.commit = $root.tendermint.abci.types.ResponseCommit.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Response message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.Response + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.Response} Response + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Response.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Response message. + * @function verify + * @memberof tendermint.abci.types.Response + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Response.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.exception != null && message.hasOwnProperty("exception")) { + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseException.verify(message.exception); + if (error) + return "exception." + error; + } + } + if (message.echo != null && message.hasOwnProperty("echo")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseEcho.verify(message.echo); + if (error) + return "echo." + error; + } + } + if (message.flush != null && message.hasOwnProperty("flush")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseFlush.verify(message.flush); + if (error) + return "flush." + error; + } + } + if (message.info != null && message.hasOwnProperty("info")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseInfo.verify(message.info); + if (error) + return "info." + error; + } + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseSetOption.verify(message.setOption); + if (error) + return "setOption." + error; + } + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseInitChain.verify(message.initChain); + if (error) + return "initChain." + error; + } + } + if (message.query != null && message.hasOwnProperty("query")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseQuery.verify(message.query); + if (error) + return "query." + error; + } + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseBeginBlock.verify(message.beginBlock); + if (error) + return "beginBlock." + error; + } + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseCheckTx.verify(message.checkTx); + if (error) + return "checkTx." + error; + } + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseDeliverTx.verify(message.deliverTx); + if (error) + return "deliverTx." + error; + } + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseEndBlock.verify(message.endBlock); + if (error) + return "endBlock." + error; + } + } + if (message.commit != null && message.hasOwnProperty("commit")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + { + var error = $root.tendermint.abci.types.ResponseCommit.verify(message.commit); + if (error) + return "commit." + error; + } + } + return null; + }; + + /** + * Creates a Response message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.Response + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.Response} Response + */ + Response.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.Response) + return object; + var message = new $root.tendermint.abci.types.Response(); + if (object.exception != null) { + if (typeof object.exception !== "object") + throw TypeError(".tendermint.abci.types.Response.exception: object expected"); + message.exception = $root.tendermint.abci.types.ResponseException.fromObject(object.exception); + } + if (object.echo != null) { + if (typeof object.echo !== "object") + throw TypeError(".tendermint.abci.types.Response.echo: object expected"); + message.echo = $root.tendermint.abci.types.ResponseEcho.fromObject(object.echo); + } + if (object.flush != null) { + if (typeof object.flush !== "object") + throw TypeError(".tendermint.abci.types.Response.flush: object expected"); + message.flush = $root.tendermint.abci.types.ResponseFlush.fromObject(object.flush); + } + if (object.info != null) { + if (typeof object.info !== "object") + throw TypeError(".tendermint.abci.types.Response.info: object expected"); + message.info = $root.tendermint.abci.types.ResponseInfo.fromObject(object.info); + } + if (object.setOption != null) { + if (typeof object.setOption !== "object") + throw TypeError(".tendermint.abci.types.Response.setOption: object expected"); + message.setOption = $root.tendermint.abci.types.ResponseSetOption.fromObject(object.setOption); + } + if (object.initChain != null) { + if (typeof object.initChain !== "object") + throw TypeError(".tendermint.abci.types.Response.initChain: object expected"); + message.initChain = $root.tendermint.abci.types.ResponseInitChain.fromObject(object.initChain); + } + if (object.query != null) { + if (typeof object.query !== "object") + throw TypeError(".tendermint.abci.types.Response.query: object expected"); + message.query = $root.tendermint.abci.types.ResponseQuery.fromObject(object.query); + } + if (object.beginBlock != null) { + if (typeof object.beginBlock !== "object") + throw TypeError(".tendermint.abci.types.Response.beginBlock: object expected"); + message.beginBlock = $root.tendermint.abci.types.ResponseBeginBlock.fromObject(object.beginBlock); + } + if (object.checkTx != null) { + if (typeof object.checkTx !== "object") + throw TypeError(".tendermint.abci.types.Response.checkTx: object expected"); + message.checkTx = $root.tendermint.abci.types.ResponseCheckTx.fromObject(object.checkTx); + } + if (object.deliverTx != null) { + if (typeof object.deliverTx !== "object") + throw TypeError(".tendermint.abci.types.Response.deliverTx: object expected"); + message.deliverTx = $root.tendermint.abci.types.ResponseDeliverTx.fromObject(object.deliverTx); + } + if (object.endBlock != null) { + if (typeof object.endBlock !== "object") + throw TypeError(".tendermint.abci.types.Response.endBlock: object expected"); + message.endBlock = $root.tendermint.abci.types.ResponseEndBlock.fromObject(object.endBlock); + } + if (object.commit != null) { + if (typeof object.commit !== "object") + throw TypeError(".tendermint.abci.types.Response.commit: object expected"); + message.commit = $root.tendermint.abci.types.ResponseCommit.fromObject(object.commit); + } + return message; + }; + + /** + * Creates a plain object from a Response message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.Response + * @static + * @param {tendermint.abci.types.Response} message Response + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Response.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.exception != null && message.hasOwnProperty("exception")) { + object.exception = $root.tendermint.abci.types.ResponseException.toObject(message.exception, options); + if (options.oneofs) + object.value = "exception"; + } + if (message.echo != null && message.hasOwnProperty("echo")) { + object.echo = $root.tendermint.abci.types.ResponseEcho.toObject(message.echo, options); + if (options.oneofs) + object.value = "echo"; + } + if (message.flush != null && message.hasOwnProperty("flush")) { + object.flush = $root.tendermint.abci.types.ResponseFlush.toObject(message.flush, options); + if (options.oneofs) + object.value = "flush"; + } + if (message.info != null && message.hasOwnProperty("info")) { + object.info = $root.tendermint.abci.types.ResponseInfo.toObject(message.info, options); + if (options.oneofs) + object.value = "info"; + } + if (message.setOption != null && message.hasOwnProperty("setOption")) { + object.setOption = $root.tendermint.abci.types.ResponseSetOption.toObject(message.setOption, options); + if (options.oneofs) + object.value = "setOption"; + } + if (message.initChain != null && message.hasOwnProperty("initChain")) { + object.initChain = $root.tendermint.abci.types.ResponseInitChain.toObject(message.initChain, options); + if (options.oneofs) + object.value = "initChain"; + } + if (message.query != null && message.hasOwnProperty("query")) { + object.query = $root.tendermint.abci.types.ResponseQuery.toObject(message.query, options); + if (options.oneofs) + object.value = "query"; + } + if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { + object.beginBlock = $root.tendermint.abci.types.ResponseBeginBlock.toObject(message.beginBlock, options); + if (options.oneofs) + object.value = "beginBlock"; + } + if (message.checkTx != null && message.hasOwnProperty("checkTx")) { + object.checkTx = $root.tendermint.abci.types.ResponseCheckTx.toObject(message.checkTx, options); + if (options.oneofs) + object.value = "checkTx"; + } + if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { + object.deliverTx = $root.tendermint.abci.types.ResponseDeliverTx.toObject(message.deliverTx, options); + if (options.oneofs) + object.value = "deliverTx"; + } + if (message.endBlock != null && message.hasOwnProperty("endBlock")) { + object.endBlock = $root.tendermint.abci.types.ResponseEndBlock.toObject(message.endBlock, options); + if (options.oneofs) + object.value = "endBlock"; + } + if (message.commit != null && message.hasOwnProperty("commit")) { + object.commit = $root.tendermint.abci.types.ResponseCommit.toObject(message.commit, options); + if (options.oneofs) + object.value = "commit"; + } + return object; + }; + + /** + * Converts this Response to JSON. + * @function toJSON + * @memberof tendermint.abci.types.Response + * @instance + * @returns {Object.} JSON object + */ + Response.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Response; + })(); + + types.ResponseException = (function() { + + /** + * Properties of a ResponseException. + * @memberof tendermint.abci.types + * @interface IResponseException + * @property {string|null} [error] ResponseException error + */ + + /** + * Constructs a new ResponseException. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseException. + * @implements IResponseException + * @constructor + * @param {tendermint.abci.types.IResponseException=} [properties] Properties to set + */ + function ResponseException(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseException error. + * @member {string} error + * @memberof tendermint.abci.types.ResponseException + * @instance + */ + ResponseException.prototype.error = ""; + + /** + * Creates a new ResponseException instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseException + * @static + * @param {tendermint.abci.types.IResponseException=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseException} ResponseException instance + */ + ResponseException.create = function create(properties) { + return new ResponseException(properties); + }; + + /** + * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseException + * @static + * @param {tendermint.abci.types.IResponseException} message ResponseException message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseException.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.error); + return writer; + }; + + /** + * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseException + * @static + * @param {tendermint.abci.types.IResponseException} message ResponseException message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseException.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseException message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseException + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseException} ResponseException + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseException.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseException(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.error = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseException message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseException + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseException} ResponseException + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseException.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseException message. + * @function verify + * @memberof tendermint.abci.types.ResponseException + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseException.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + return null; + }; + + /** + * Creates a ResponseException message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseException + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseException} ResponseException + */ + ResponseException.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseException) + return object; + var message = new $root.tendermint.abci.types.ResponseException(); + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from a ResponseException message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseException + * @static + * @param {tendermint.abci.types.ResponseException} message ResponseException + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseException.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.error = ""; + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + return object; + }; + + /** + * Converts this ResponseException to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseException + * @instance + * @returns {Object.} JSON object + */ + ResponseException.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseException; + })(); + + types.ResponseEcho = (function() { + + /** + * Properties of a ResponseEcho. + * @memberof tendermint.abci.types + * @interface IResponseEcho + * @property {string|null} [message] ResponseEcho message + */ + + /** + * Constructs a new ResponseEcho. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseEcho. + * @implements IResponseEcho + * @constructor + * @param {tendermint.abci.types.IResponseEcho=} [properties] Properties to set + */ + function ResponseEcho(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseEcho message. + * @member {string} message + * @memberof tendermint.abci.types.ResponseEcho + * @instance + */ + ResponseEcho.prototype.message = ""; + + /** + * Creates a new ResponseEcho instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseEcho + * @static + * @param {tendermint.abci.types.IResponseEcho=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseEcho} ResponseEcho instance + */ + ResponseEcho.create = function create(properties) { + return new ResponseEcho(properties); + }; + + /** + * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseEcho + * @static + * @param {tendermint.abci.types.IResponseEcho} message ResponseEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEcho.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); + return writer; + }; + + /** + * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseEcho + * @static + * @param {tendermint.abci.types.IResponseEcho} message ResponseEcho message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEcho.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseEcho} ResponseEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEcho.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseEcho(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.message = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseEcho + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseEcho} ResponseEcho + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEcho.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseEcho message. + * @function verify + * @memberof tendermint.abci.types.ResponseEcho + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseEcho.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a ResponseEcho message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseEcho + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseEcho} ResponseEcho + */ + ResponseEcho.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseEcho) + return object; + var message = new $root.tendermint.abci.types.ResponseEcho(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a ResponseEcho message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseEcho + * @static + * @param {tendermint.abci.types.ResponseEcho} message ResponseEcho + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseEcho.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.message = ""; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this ResponseEcho to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseEcho + * @instance + * @returns {Object.} JSON object + */ + ResponseEcho.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseEcho; + })(); + + types.ResponseFlush = (function() { + + /** + * Properties of a ResponseFlush. + * @memberof tendermint.abci.types + * @interface IResponseFlush + */ + + /** + * Constructs a new ResponseFlush. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseFlush. + * @implements IResponseFlush + * @constructor + * @param {tendermint.abci.types.IResponseFlush=} [properties] Properties to set + */ + function ResponseFlush(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ResponseFlush instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseFlush + * @static + * @param {tendermint.abci.types.IResponseFlush=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseFlush} ResponseFlush instance + */ + ResponseFlush.create = function create(properties) { + return new ResponseFlush(properties); + }; + + /** + * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseFlush + * @static + * @param {tendermint.abci.types.IResponseFlush} message ResponseFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseFlush.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseFlush + * @static + * @param {tendermint.abci.types.IResponseFlush} message ResponseFlush message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseFlush.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseFlush} ResponseFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseFlush.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseFlush(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseFlush + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseFlush} ResponseFlush + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseFlush.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseFlush message. + * @function verify + * @memberof tendermint.abci.types.ResponseFlush + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseFlush.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ResponseFlush message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseFlush + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseFlush} ResponseFlush + */ + ResponseFlush.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseFlush) + return object; + return new $root.tendermint.abci.types.ResponseFlush(); + }; + + /** + * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseFlush + * @static + * @param {tendermint.abci.types.ResponseFlush} message ResponseFlush + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseFlush.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ResponseFlush to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseFlush + * @instance + * @returns {Object.} JSON object + */ + ResponseFlush.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseFlush; + })(); + + types.ResponseInfo = (function() { + + /** + * Properties of a ResponseInfo. + * @memberof tendermint.abci.types + * @interface IResponseInfo + * @property {string|null} [data] ResponseInfo data + * @property {string|null} [version] ResponseInfo version + * @property {number|Long|null} [appVersion] ResponseInfo appVersion + * @property {number|Long|null} [lastBlockHeight] ResponseInfo lastBlockHeight + * @property {Uint8Array|null} [lastBlockAppHash] ResponseInfo lastBlockAppHash + */ + + /** + * Constructs a new ResponseInfo. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseInfo. + * @implements IResponseInfo + * @constructor + * @param {tendermint.abci.types.IResponseInfo=} [properties] Properties to set + */ + function ResponseInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseInfo data. + * @member {string} data + * @memberof tendermint.abci.types.ResponseInfo + * @instance + */ + ResponseInfo.prototype.data = ""; + + /** + * ResponseInfo version. + * @member {string} version + * @memberof tendermint.abci.types.ResponseInfo + * @instance + */ + ResponseInfo.prototype.version = ""; + + /** + * ResponseInfo appVersion. + * @member {number|Long} appVersion + * @memberof tendermint.abci.types.ResponseInfo + * @instance + */ + ResponseInfo.prototype.appVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * ResponseInfo lastBlockHeight. + * @member {number|Long} lastBlockHeight + * @memberof tendermint.abci.types.ResponseInfo + * @instance + */ + ResponseInfo.prototype.lastBlockHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseInfo lastBlockAppHash. + * @member {Uint8Array} lastBlockAppHash + * @memberof tendermint.abci.types.ResponseInfo + * @instance + */ + ResponseInfo.prototype.lastBlockAppHash = $util.newBuffer([]); + + /** + * Creates a new ResponseInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseInfo + * @static + * @param {tendermint.abci.types.IResponseInfo=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseInfo} ResponseInfo instance + */ + ResponseInfo.create = function create(properties) { + return new ResponseInfo(properties); + }; + + /** + * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseInfo + * @static + * @param {tendermint.abci.types.IResponseInfo} message ResponseInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.data); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.appVersion); + if (message.lastBlockHeight != null && Object.hasOwnProperty.call(message, "lastBlockHeight")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.lastBlockHeight); + if (message.lastBlockAppHash != null && Object.hasOwnProperty.call(message, "lastBlockAppHash")) + writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.lastBlockAppHash); + return writer; + }; + + /** + * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseInfo + * @static + * @param {tendermint.abci.types.IResponseInfo} message ResponseInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseInfo} ResponseInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.data = reader.string(); + break; + case 2: + message.version = reader.string(); + break; + case 3: + message.appVersion = reader.uint64(); + break; + case 4: + message.lastBlockHeight = reader.int64(); + break; + case 5: + message.lastBlockAppHash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseInfo} ResponseInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseInfo message. + * @function verify + * @memberof tendermint.abci.types.ResponseInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!$util.isString(message.data)) + return "data: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (!$util.isInteger(message.appVersion) && !(message.appVersion && $util.isInteger(message.appVersion.low) && $util.isInteger(message.appVersion.high))) + return "appVersion: integer|Long expected"; + if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) + if (!$util.isInteger(message.lastBlockHeight) && !(message.lastBlockHeight && $util.isInteger(message.lastBlockHeight.low) && $util.isInteger(message.lastBlockHeight.high))) + return "lastBlockHeight: integer|Long expected"; + if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) + if (!(message.lastBlockAppHash && typeof message.lastBlockAppHash.length === "number" || $util.isString(message.lastBlockAppHash))) + return "lastBlockAppHash: buffer expected"; + return null; + }; + + /** + * Creates a ResponseInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseInfo} ResponseInfo + */ + ResponseInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseInfo) + return object; + var message = new $root.tendermint.abci.types.ResponseInfo(); + if (object.data != null) + message.data = String(object.data); + if (object.version != null) + message.version = String(object.version); + if (object.appVersion != null) + if ($util.Long) + (message.appVersion = $util.Long.fromValue(object.appVersion)).unsigned = true; + else if (typeof object.appVersion === "string") + message.appVersion = parseInt(object.appVersion, 10); + else if (typeof object.appVersion === "number") + message.appVersion = object.appVersion; + else if (typeof object.appVersion === "object") + message.appVersion = new $util.LongBits(object.appVersion.low >>> 0, object.appVersion.high >>> 0).toNumber(true); + if (object.lastBlockHeight != null) + if ($util.Long) + (message.lastBlockHeight = $util.Long.fromValue(object.lastBlockHeight)).unsigned = false; + else if (typeof object.lastBlockHeight === "string") + message.lastBlockHeight = parseInt(object.lastBlockHeight, 10); + else if (typeof object.lastBlockHeight === "number") + message.lastBlockHeight = object.lastBlockHeight; + else if (typeof object.lastBlockHeight === "object") + message.lastBlockHeight = new $util.LongBits(object.lastBlockHeight.low >>> 0, object.lastBlockHeight.high >>> 0).toNumber(); + if (object.lastBlockAppHash != null) + if (typeof object.lastBlockAppHash === "string") + $util.base64.decode(object.lastBlockAppHash, message.lastBlockAppHash = $util.newBuffer($util.base64.length(object.lastBlockAppHash)), 0); + else if (object.lastBlockAppHash.length) + message.lastBlockAppHash = object.lastBlockAppHash; + return message; + }; + + /** + * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseInfo + * @static + * @param {tendermint.abci.types.ResponseInfo} message ResponseInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.data = ""; + object.version = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.appVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.appVersion = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.lastBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.lastBlockHeight = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.lastBlockAppHash = ""; + else { + object.lastBlockAppHash = []; + if (options.bytes !== Array) + object.lastBlockAppHash = $util.newBuffer(object.lastBlockAppHash); + } + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = message.data; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.appVersion != null && message.hasOwnProperty("appVersion")) + if (typeof message.appVersion === "number") + object.appVersion = options.longs === String ? String(message.appVersion) : message.appVersion; + else + object.appVersion = options.longs === String ? $util.Long.prototype.toString.call(message.appVersion) : options.longs === Number ? new $util.LongBits(message.appVersion.low >>> 0, message.appVersion.high >>> 0).toNumber(true) : message.appVersion; + if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) + if (typeof message.lastBlockHeight === "number") + object.lastBlockHeight = options.longs === String ? String(message.lastBlockHeight) : message.lastBlockHeight; + else + object.lastBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.lastBlockHeight) : options.longs === Number ? new $util.LongBits(message.lastBlockHeight.low >>> 0, message.lastBlockHeight.high >>> 0).toNumber() : message.lastBlockHeight; + if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) + object.lastBlockAppHash = options.bytes === String ? $util.base64.encode(message.lastBlockAppHash, 0, message.lastBlockAppHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastBlockAppHash) : message.lastBlockAppHash; + return object; + }; + + /** + * Converts this ResponseInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseInfo + * @instance + * @returns {Object.} JSON object + */ + ResponseInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseInfo; + })(); + + types.ResponseSetOption = (function() { + + /** + * Properties of a ResponseSetOption. + * @memberof tendermint.abci.types + * @interface IResponseSetOption + * @property {number|null} [code] ResponseSetOption code + * @property {string|null} [log] ResponseSetOption log + * @property {string|null} [info] ResponseSetOption info + */ + + /** + * Constructs a new ResponseSetOption. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseSetOption. + * @implements IResponseSetOption + * @constructor + * @param {tendermint.abci.types.IResponseSetOption=} [properties] Properties to set + */ + function ResponseSetOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseSetOption code. + * @member {number} code + * @memberof tendermint.abci.types.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.code = 0; + + /** + * ResponseSetOption log. + * @member {string} log + * @memberof tendermint.abci.types.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.log = ""; + + /** + * ResponseSetOption info. + * @member {string} info + * @memberof tendermint.abci.types.ResponseSetOption + * @instance + */ + ResponseSetOption.prototype.info = ""; + + /** + * Creates a new ResponseSetOption instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseSetOption + * @static + * @param {tendermint.abci.types.IResponseSetOption=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseSetOption} ResponseSetOption instance + */ + ResponseSetOption.create = function create(properties) { + return new ResponseSetOption(properties); + }; + + /** + * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseSetOption + * @static + * @param {tendermint.abci.types.IResponseSetOption} message ResponseSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseSetOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + return writer; + }; + + /** + * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseSetOption + * @static + * @param {tendermint.abci.types.IResponseSetOption} message ResponseSetOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseSetOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseSetOption} ResponseSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseSetOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseSetOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseSetOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseSetOption} ResponseSetOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseSetOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseSetOption message. + * @function verify + * @memberof tendermint.abci.types.ResponseSetOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseSetOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + return null; + }; + + /** + * Creates a ResponseSetOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseSetOption + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseSetOption} ResponseSetOption + */ + ResponseSetOption.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseSetOption) + return object; + var message = new $root.tendermint.abci.types.ResponseSetOption(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + return message; + }; + + /** + * Creates a plain object from a ResponseSetOption message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseSetOption + * @static + * @param {tendermint.abci.types.ResponseSetOption} message ResponseSetOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseSetOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = 0; + object.log = ""; + object.info = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + return object; + }; + + /** + * Converts this ResponseSetOption to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseSetOption + * @instance + * @returns {Object.} JSON object + */ + ResponseSetOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseSetOption; + })(); + + types.ResponseInitChain = (function() { + + /** + * Properties of a ResponseInitChain. + * @memberof tendermint.abci.types + * @interface IResponseInitChain + * @property {tendermint.abci.types.IConsensusParams|null} [consensusParams] ResponseInitChain consensusParams + * @property {Array.|null} [validators] ResponseInitChain validators + */ + + /** + * Constructs a new ResponseInitChain. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseInitChain. + * @implements IResponseInitChain + * @constructor + * @param {tendermint.abci.types.IResponseInitChain=} [properties] Properties to set + */ + function ResponseInitChain(properties) { + this.validators = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseInitChain consensusParams. + * @member {tendermint.abci.types.IConsensusParams|null|undefined} consensusParams + * @memberof tendermint.abci.types.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.consensusParams = null; + + /** + * ResponseInitChain validators. + * @member {Array.} validators + * @memberof tendermint.abci.types.ResponseInitChain + * @instance + */ + ResponseInitChain.prototype.validators = $util.emptyArray; + + /** + * Creates a new ResponseInitChain instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseInitChain + * @static + * @param {tendermint.abci.types.IResponseInitChain=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseInitChain} ResponseInitChain instance + */ + ResponseInitChain.create = function create(properties) { + return new ResponseInitChain(properties); + }; + + /** + * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseInitChain + * @static + * @param {tendermint.abci.types.IResponseInitChain} message ResponseInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInitChain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) + $root.tendermint.abci.types.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.validators != null && message.validators.length) + for (var i = 0; i < message.validators.length; ++i) + $root.tendermint.abci.types.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseInitChain + * @static + * @param {tendermint.abci.types.IResponseInitChain} message ResponseInitChain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseInitChain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseInitChain} ResponseInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInitChain.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseInitChain(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.consensusParams = $root.tendermint.abci.types.ConsensusParams.decode(reader, reader.uint32()); + break; + case 2: + if (!(message.validators && message.validators.length)) + message.validators = []; + message.validators.push($root.tendermint.abci.types.ValidatorUpdate.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseInitChain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseInitChain} ResponseInitChain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseInitChain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseInitChain message. + * @function verify + * @memberof tendermint.abci.types.ResponseInitChain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseInitChain.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { + var error = $root.tendermint.abci.types.ConsensusParams.verify(message.consensusParams); + if (error) + return "consensusParams." + error; + } + if (message.validators != null && message.hasOwnProperty("validators")) { + if (!Array.isArray(message.validators)) + return "validators: array expected"; + for (var i = 0; i < message.validators.length; ++i) { + var error = $root.tendermint.abci.types.ValidatorUpdate.verify(message.validators[i]); + if (error) + return "validators." + error; + } + } + return null; + }; + + /** + * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseInitChain + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseInitChain} ResponseInitChain + */ + ResponseInitChain.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseInitChain) + return object; + var message = new $root.tendermint.abci.types.ResponseInitChain(); + if (object.consensusParams != null) { + if (typeof object.consensusParams !== "object") + throw TypeError(".tendermint.abci.types.ResponseInitChain.consensusParams: object expected"); + message.consensusParams = $root.tendermint.abci.types.ConsensusParams.fromObject(object.consensusParams); + } + if (object.validators) { + if (!Array.isArray(object.validators)) + throw TypeError(".tendermint.abci.types.ResponseInitChain.validators: array expected"); + message.validators = []; + for (var i = 0; i < object.validators.length; ++i) { + if (typeof object.validators[i] !== "object") + throw TypeError(".tendermint.abci.types.ResponseInitChain.validators: object expected"); + message.validators[i] = $root.tendermint.abci.types.ValidatorUpdate.fromObject(object.validators[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseInitChain + * @static + * @param {tendermint.abci.types.ResponseInitChain} message ResponseInitChain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseInitChain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.validators = []; + if (options.defaults) + object.consensusParams = null; + if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) + object.consensusParams = $root.tendermint.abci.types.ConsensusParams.toObject(message.consensusParams, options); + if (message.validators && message.validators.length) { + object.validators = []; + for (var j = 0; j < message.validators.length; ++j) + object.validators[j] = $root.tendermint.abci.types.ValidatorUpdate.toObject(message.validators[j], options); + } + return object; + }; + + /** + * Converts this ResponseInitChain to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseInitChain + * @instance + * @returns {Object.} JSON object + */ + ResponseInitChain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseInitChain; + })(); + + types.ResponseQuery = (function() { + + /** + * Properties of a ResponseQuery. + * @memberof tendermint.abci.types + * @interface IResponseQuery + * @property {number|null} [code] ResponseQuery code + * @property {string|null} [log] ResponseQuery log + * @property {string|null} [info] ResponseQuery info + * @property {number|Long|null} [index] ResponseQuery index + * @property {Uint8Array|null} [key] ResponseQuery key + * @property {Uint8Array|null} [value] ResponseQuery value + * @property {tendermint.crypto.merkle.IProof|null} [proof] ResponseQuery proof + * @property {number|Long|null} [height] ResponseQuery height + * @property {string|null} [codespace] ResponseQuery codespace + */ + + /** + * Constructs a new ResponseQuery. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseQuery. + * @implements IResponseQuery + * @constructor + * @param {tendermint.abci.types.IResponseQuery=} [properties] Properties to set + */ + function ResponseQuery(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseQuery code. + * @member {number} code + * @memberof tendermint.abci.types.ResponseQuery + * @instance + */ + ResponseQuery.prototype.code = 0; + + /** + * ResponseQuery log. + * @member {string} log + * @memberof tendermint.abci.types.ResponseQuery + * @instance + */ + ResponseQuery.prototype.log = ""; + + /** + * ResponseQuery info. + * @member {string} info + * @memberof tendermint.abci.types.ResponseQuery + * @instance + */ + ResponseQuery.prototype.info = ""; + + /** + * ResponseQuery index. + * @member {number|Long} index + * @memberof tendermint.abci.types.ResponseQuery + * @instance + */ + ResponseQuery.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseQuery key. + * @member {Uint8Array} key + * @memberof tendermint.abci.types.ResponseQuery + * @instance + */ + ResponseQuery.prototype.key = $util.newBuffer([]); + + /** + * ResponseQuery value. + * @member {Uint8Array} value + * @memberof tendermint.abci.types.ResponseQuery + * @instance + */ + ResponseQuery.prototype.value = $util.newBuffer([]); + + /** + * ResponseQuery proof. + * @member {tendermint.crypto.merkle.IProof|null|undefined} proof + * @memberof tendermint.abci.types.ResponseQuery + * @instance + */ + ResponseQuery.prototype.proof = null; + + /** + * ResponseQuery height. + * @member {number|Long} height + * @memberof tendermint.abci.types.ResponseQuery + * @instance + */ + ResponseQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseQuery codespace. + * @member {string} codespace + * @memberof tendermint.abci.types.ResponseQuery + * @instance + */ + ResponseQuery.prototype.codespace = ""; + + /** + * Creates a new ResponseQuery instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseQuery + * @static + * @param {tendermint.abci.types.IResponseQuery=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseQuery} ResponseQuery instance + */ + ResponseQuery.create = function create(properties) { + return new ResponseQuery(properties); + }; + + /** + * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseQuery + * @static + * @param {tendermint.abci.types.IResponseQuery} message ResponseQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseQuery.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.index); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.value); + if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) + $root.tendermint.crypto.merkle.Proof.encode(message.proof, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.height); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseQuery + * @static + * @param {tendermint.abci.types.IResponseQuery} message ResponseQuery message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseQuery.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseQuery} ResponseQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseQuery.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseQuery(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.index = reader.int64(); + break; + case 6: + message.key = reader.bytes(); + break; + case 7: + message.value = reader.bytes(); + break; + case 8: + message.proof = $root.tendermint.crypto.merkle.Proof.decode(reader, reader.uint32()); + break; + case 9: + message.height = reader.int64(); + break; + case 10: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseQuery + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseQuery} ResponseQuery + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseQuery.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseQuery message. + * @function verify + * @memberof tendermint.abci.types.ResponseQuery + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseQuery.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) + return "index: integer|Long expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + if (message.proof != null && message.hasOwnProperty("proof")) { + var error = $root.tendermint.crypto.merkle.Proof.verify(message.proof); + if (error) + return "proof." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseQuery + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseQuery} ResponseQuery + */ + ResponseQuery.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseQuery) + return object; + var message = new $root.tendermint.abci.types.ResponseQuery(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.index != null) + if ($util.Long) + (message.index = $util.Long.fromValue(object.index)).unsigned = false; + else if (typeof object.index === "string") + message.index = parseInt(object.index, 10); + else if (typeof object.index === "number") + message.index = object.index; + else if (typeof object.index === "object") + message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".tendermint.abci.types.ResponseQuery.proof: object expected"); + message.proof = $root.tendermint.crypto.merkle.Proof.fromObject(object.proof); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseQuery + * @static + * @param {tendermint.abci.types.ResponseQuery} message ResponseQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.code = 0; + object.log = ""; + object.info = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.index = options.longs === String ? "0" : 0; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + object.proof = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.index != null && message.hasOwnProperty("index")) + if (typeof message.index === "number") + object.index = options.longs === String ? String(message.index) : message.index; + else + object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (message.proof != null && message.hasOwnProperty("proof")) + object.proof = $root.tendermint.crypto.merkle.Proof.toObject(message.proof, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseQuery to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseQuery + * @instance + * @returns {Object.} JSON object + */ + ResponseQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseQuery; + })(); + + types.ResponseBeginBlock = (function() { + + /** + * Properties of a ResponseBeginBlock. + * @memberof tendermint.abci.types + * @interface IResponseBeginBlock + * @property {Array.|null} [events] ResponseBeginBlock events + */ + + /** + * Constructs a new ResponseBeginBlock. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseBeginBlock. + * @implements IResponseBeginBlock + * @constructor + * @param {tendermint.abci.types.IResponseBeginBlock=} [properties] Properties to set + */ + function ResponseBeginBlock(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseBeginBlock events. + * @member {Array.} events + * @memberof tendermint.abci.types.ResponseBeginBlock + * @instance + */ + ResponseBeginBlock.prototype.events = $util.emptyArray; + + /** + * Creates a new ResponseBeginBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseBeginBlock + * @static + * @param {tendermint.abci.types.IResponseBeginBlock=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseBeginBlock} ResponseBeginBlock instance + */ + ResponseBeginBlock.create = function create(properties) { + return new ResponseBeginBlock(properties); + }; + + /** + * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseBeginBlock + * @static + * @param {tendermint.abci.types.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseBeginBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseBeginBlock + * @static + * @param {tendermint.abci.types.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseBeginBlock} ResponseBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseBeginBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseBeginBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseBeginBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseBeginBlock} ResponseBeginBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseBeginBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseBeginBlock message. + * @function verify + * @memberof tendermint.abci.types.ResponseBeginBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseBeginBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.types.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ResponseBeginBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseBeginBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseBeginBlock} ResponseBeginBlock + */ + ResponseBeginBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseBeginBlock) + return object; + var message = new $root.tendermint.abci.types.ResponseBeginBlock(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.types.ResponseBeginBlock.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.types.ResponseBeginBlock.events: object expected"); + message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseBeginBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseBeginBlock + * @static + * @param {tendermint.abci.types.ResponseBeginBlock} message ResponseBeginBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseBeginBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ResponseBeginBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseBeginBlock + * @instance + * @returns {Object.} JSON object + */ + ResponseBeginBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseBeginBlock; + })(); + + types.ResponseCheckTx = (function() { + + /** + * Properties of a ResponseCheckTx. + * @memberof tendermint.abci.types + * @interface IResponseCheckTx + * @property {number|null} [code] ResponseCheckTx code + * @property {Uint8Array|null} [data] ResponseCheckTx data + * @property {string|null} [log] ResponseCheckTx log + * @property {string|null} [info] ResponseCheckTx info + * @property {number|Long|null} [gasWanted] ResponseCheckTx gasWanted + * @property {number|Long|null} [gasUsed] ResponseCheckTx gasUsed + * @property {Array.|null} [events] ResponseCheckTx events + * @property {string|null} [codespace] ResponseCheckTx codespace + */ + + /** + * Constructs a new ResponseCheckTx. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseCheckTx. + * @implements IResponseCheckTx + * @constructor + * @param {tendermint.abci.types.IResponseCheckTx=} [properties] Properties to set + */ + function ResponseCheckTx(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseCheckTx code. + * @member {number} code + * @memberof tendermint.abci.types.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.code = 0; + + /** + * ResponseCheckTx data. + * @member {Uint8Array} data + * @memberof tendermint.abci.types.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.data = $util.newBuffer([]); + + /** + * ResponseCheckTx log. + * @member {string} log + * @memberof tendermint.abci.types.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.log = ""; + + /** + * ResponseCheckTx info. + * @member {string} info + * @memberof tendermint.abci.types.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.info = ""; + + /** + * ResponseCheckTx gasWanted. + * @member {number|Long} gasWanted + * @memberof tendermint.abci.types.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseCheckTx gasUsed. + * @member {number|Long} gasUsed + * @memberof tendermint.abci.types.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseCheckTx events. + * @member {Array.} events + * @memberof tendermint.abci.types.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.events = $util.emptyArray; + + /** + * ResponseCheckTx codespace. + * @member {string} codespace + * @memberof tendermint.abci.types.ResponseCheckTx + * @instance + */ + ResponseCheckTx.prototype.codespace = ""; + + /** + * Creates a new ResponseCheckTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseCheckTx + * @static + * @param {tendermint.abci.types.IResponseCheckTx=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseCheckTx} ResponseCheckTx instance + */ + ResponseCheckTx.create = function create(properties) { + return new ResponseCheckTx(properties); + }; + + /** + * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseCheckTx + * @static + * @param {tendermint.abci.types.IResponseCheckTx} message ResponseCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCheckTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseCheckTx + * @static + * @param {tendermint.abci.types.IResponseCheckTx} message ResponseCheckTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCheckTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseCheckTx} ResponseCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCheckTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseCheckTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseCheckTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseCheckTx} ResponseCheckTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCheckTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseCheckTx message. + * @function verify + * @memberof tendermint.abci.types.ResponseCheckTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseCheckTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.types.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseCheckTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseCheckTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseCheckTx} ResponseCheckTx + */ + ResponseCheckTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseCheckTx) + return object; + var message = new $root.tendermint.abci.types.ResponseCheckTx(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.types.ResponseCheckTx.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.types.ResponseCheckTx.events: object expected"); + message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); + } + } + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseCheckTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseCheckTx + * @static + * @param {tendermint.abci.types.ResponseCheckTx} message ResponseCheckTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseCheckTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.code = 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + object.info = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseCheckTx to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseCheckTx + * @instance + * @returns {Object.} JSON object + */ + ResponseCheckTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseCheckTx; + })(); + + types.ResponseDeliverTx = (function() { + + /** + * Properties of a ResponseDeliverTx. + * @memberof tendermint.abci.types + * @interface IResponseDeliverTx + * @property {number|null} [code] ResponseDeliverTx code + * @property {Uint8Array|null} [data] ResponseDeliverTx data + * @property {string|null} [log] ResponseDeliverTx log + * @property {string|null} [info] ResponseDeliverTx info + * @property {number|Long|null} [gasWanted] ResponseDeliverTx gasWanted + * @property {number|Long|null} [gasUsed] ResponseDeliverTx gasUsed + * @property {Array.|null} [events] ResponseDeliverTx events + * @property {string|null} [codespace] ResponseDeliverTx codespace + */ + + /** + * Constructs a new ResponseDeliverTx. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseDeliverTx. + * @implements IResponseDeliverTx + * @constructor + * @param {tendermint.abci.types.IResponseDeliverTx=} [properties] Properties to set + */ + function ResponseDeliverTx(properties) { + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseDeliverTx code. + * @member {number} code + * @memberof tendermint.abci.types.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.code = 0; + + /** + * ResponseDeliverTx data. + * @member {Uint8Array} data + * @memberof tendermint.abci.types.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.data = $util.newBuffer([]); + + /** + * ResponseDeliverTx log. + * @member {string} log + * @memberof tendermint.abci.types.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.log = ""; + + /** + * ResponseDeliverTx info. + * @member {string} info + * @memberof tendermint.abci.types.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.info = ""; + + /** + * ResponseDeliverTx gasWanted. + * @member {number|Long} gasWanted + * @memberof tendermint.abci.types.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseDeliverTx gasUsed. + * @member {number|Long} gasUsed + * @memberof tendermint.abci.types.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ResponseDeliverTx events. + * @member {Array.} events + * @memberof tendermint.abci.types.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.events = $util.emptyArray; + + /** + * ResponseDeliverTx codespace. + * @member {string} codespace + * @memberof tendermint.abci.types.ResponseDeliverTx + * @instance + */ + ResponseDeliverTx.prototype.codespace = ""; + + /** + * Creates a new ResponseDeliverTx instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseDeliverTx + * @static + * @param {tendermint.abci.types.IResponseDeliverTx=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseDeliverTx} ResponseDeliverTx instance + */ + ResponseDeliverTx.create = function create(properties) { + return new ResponseDeliverTx(properties); + }; + + /** + * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseDeliverTx + * @static + * @param {tendermint.abci.types.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseDeliverTx.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + if (message.log != null && Object.hasOwnProperty.call(message, "log")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); + if (message.info != null && Object.hasOwnProperty.call(message, "info")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); + if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); + if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) + writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); + return writer; + }; + + /** + * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseDeliverTx + * @static + * @param {tendermint.abci.types.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseDeliverTx} ResponseDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseDeliverTx.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseDeliverTx(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.code = reader.uint32(); + break; + case 2: + message.data = reader.bytes(); + break; + case 3: + message.log = reader.string(); + break; + case 4: + message.info = reader.string(); + break; + case 5: + message.gasWanted = reader.int64(); + break; + case 6: + message.gasUsed = reader.int64(); + break; + case 7: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + break; + case 8: + message.codespace = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseDeliverTx + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseDeliverTx} ResponseDeliverTx + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseDeliverTx.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseDeliverTx message. + * @function verify + * @memberof tendermint.abci.types.ResponseDeliverTx + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseDeliverTx.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + if (message.log != null && message.hasOwnProperty("log")) + if (!$util.isString(message.log)) + return "log: string expected"; + if (message.info != null && message.hasOwnProperty("info")) + if (!$util.isString(message.info)) + return "info: string expected"; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) + return "gasWanted: integer|Long expected"; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) + return "gasUsed: integer|Long expected"; + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.types.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + if (!$util.isString(message.codespace)) + return "codespace: string expected"; + return null; + }; + + /** + * Creates a ResponseDeliverTx message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseDeliverTx + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseDeliverTx} ResponseDeliverTx + */ + ResponseDeliverTx.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseDeliverTx) + return object; + var message = new $root.tendermint.abci.types.ResponseDeliverTx(); + if (object.code != null) + message.code = object.code >>> 0; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + if (object.log != null) + message.log = String(object.log); + if (object.info != null) + message.info = String(object.info); + if (object.gasWanted != null) + if ($util.Long) + (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; + else if (typeof object.gasWanted === "string") + message.gasWanted = parseInt(object.gasWanted, 10); + else if (typeof object.gasWanted === "number") + message.gasWanted = object.gasWanted; + else if (typeof object.gasWanted === "object") + message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); + if (object.gasUsed != null) + if ($util.Long) + (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; + else if (typeof object.gasUsed === "string") + message.gasUsed = parseInt(object.gasUsed, 10); + else if (typeof object.gasUsed === "number") + message.gasUsed = object.gasUsed; + else if (typeof object.gasUsed === "object") + message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.types.ResponseDeliverTx.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.types.ResponseDeliverTx.events: object expected"); + message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); + } + } + if (object.codespace != null) + message.codespace = String(object.codespace); + return message; + }; + + /** + * Creates a plain object from a ResponseDeliverTx message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseDeliverTx + * @static + * @param {tendermint.abci.types.ResponseDeliverTx} message ResponseDeliverTx + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseDeliverTx.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.events = []; + if (options.defaults) { + object.code = 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + object.log = ""; + object.info = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasWanted = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.gasUsed = options.longs === String ? "0" : 0; + object.codespace = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + if (message.log != null && message.hasOwnProperty("log")) + object.log = message.log; + if (message.info != null && message.hasOwnProperty("info")) + object.info = message.info; + if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) + if (typeof message.gasWanted === "number") + object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; + else + object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; + if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) + if (typeof message.gasUsed === "number") + object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; + else + object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); + } + if (message.codespace != null && message.hasOwnProperty("codespace")) + object.codespace = message.codespace; + return object; + }; + + /** + * Converts this ResponseDeliverTx to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseDeliverTx + * @instance + * @returns {Object.} JSON object + */ + ResponseDeliverTx.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseDeliverTx; + })(); + + types.ResponseEndBlock = (function() { + + /** + * Properties of a ResponseEndBlock. + * @memberof tendermint.abci.types + * @interface IResponseEndBlock + * @property {Array.|null} [validatorUpdates] ResponseEndBlock validatorUpdates + * @property {tendermint.abci.types.IConsensusParams|null} [consensusParamUpdates] ResponseEndBlock consensusParamUpdates + * @property {Array.|null} [events] ResponseEndBlock events + */ + + /** + * Constructs a new ResponseEndBlock. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseEndBlock. + * @implements IResponseEndBlock + * @constructor + * @param {tendermint.abci.types.IResponseEndBlock=} [properties] Properties to set + */ + function ResponseEndBlock(properties) { + this.validatorUpdates = []; + this.events = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseEndBlock validatorUpdates. + * @member {Array.} validatorUpdates + * @memberof tendermint.abci.types.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.validatorUpdates = $util.emptyArray; + + /** + * ResponseEndBlock consensusParamUpdates. + * @member {tendermint.abci.types.IConsensusParams|null|undefined} consensusParamUpdates + * @memberof tendermint.abci.types.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.consensusParamUpdates = null; + + /** + * ResponseEndBlock events. + * @member {Array.} events + * @memberof tendermint.abci.types.ResponseEndBlock + * @instance + */ + ResponseEndBlock.prototype.events = $util.emptyArray; + + /** + * Creates a new ResponseEndBlock instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseEndBlock + * @static + * @param {tendermint.abci.types.IResponseEndBlock=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseEndBlock} ResponseEndBlock instance + */ + ResponseEndBlock.create = function create(properties) { + return new ResponseEndBlock(properties); + }; + + /** + * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseEndBlock + * @static + * @param {tendermint.abci.types.IResponseEndBlock} message ResponseEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEndBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validatorUpdates != null && message.validatorUpdates.length) + for (var i = 0; i < message.validatorUpdates.length; ++i) + $root.tendermint.abci.types.ValidatorUpdate.encode(message.validatorUpdates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.consensusParamUpdates != null && Object.hasOwnProperty.call(message, "consensusParamUpdates")) + $root.tendermint.abci.types.ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.events != null && message.events.length) + for (var i = 0; i < message.events.length; ++i) + $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseEndBlock + * @static + * @param {tendermint.abci.types.IResponseEndBlock} message ResponseEndBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseEndBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseEndBlock} ResponseEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEndBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseEndBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.validatorUpdates && message.validatorUpdates.length)) + message.validatorUpdates = []; + message.validatorUpdates.push($root.tendermint.abci.types.ValidatorUpdate.decode(reader, reader.uint32())); + break; + case 2: + message.consensusParamUpdates = $root.tendermint.abci.types.ConsensusParams.decode(reader, reader.uint32()); + break; + case 3: + if (!(message.events && message.events.length)) + message.events = []; + message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseEndBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseEndBlock} ResponseEndBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseEndBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseEndBlock message. + * @function verify + * @memberof tendermint.abci.types.ResponseEndBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseEndBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validatorUpdates != null && message.hasOwnProperty("validatorUpdates")) { + if (!Array.isArray(message.validatorUpdates)) + return "validatorUpdates: array expected"; + for (var i = 0; i < message.validatorUpdates.length; ++i) { + var error = $root.tendermint.abci.types.ValidatorUpdate.verify(message.validatorUpdates[i]); + if (error) + return "validatorUpdates." + error; + } + } + if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) { + var error = $root.tendermint.abci.types.ConsensusParams.verify(message.consensusParamUpdates); + if (error) + return "consensusParamUpdates." + error; + } + if (message.events != null && message.hasOwnProperty("events")) { + if (!Array.isArray(message.events)) + return "events: array expected"; + for (var i = 0; i < message.events.length; ++i) { + var error = $root.tendermint.abci.types.Event.verify(message.events[i]); + if (error) + return "events." + error; + } + } + return null; + }; + + /** + * Creates a ResponseEndBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseEndBlock + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseEndBlock} ResponseEndBlock + */ + ResponseEndBlock.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseEndBlock) + return object; + var message = new $root.tendermint.abci.types.ResponseEndBlock(); + if (object.validatorUpdates) { + if (!Array.isArray(object.validatorUpdates)) + throw TypeError(".tendermint.abci.types.ResponseEndBlock.validatorUpdates: array expected"); + message.validatorUpdates = []; + for (var i = 0; i < object.validatorUpdates.length; ++i) { + if (typeof object.validatorUpdates[i] !== "object") + throw TypeError(".tendermint.abci.types.ResponseEndBlock.validatorUpdates: object expected"); + message.validatorUpdates[i] = $root.tendermint.abci.types.ValidatorUpdate.fromObject(object.validatorUpdates[i]); + } + } + if (object.consensusParamUpdates != null) { + if (typeof object.consensusParamUpdates !== "object") + throw TypeError(".tendermint.abci.types.ResponseEndBlock.consensusParamUpdates: object expected"); + message.consensusParamUpdates = $root.tendermint.abci.types.ConsensusParams.fromObject(object.consensusParamUpdates); + } + if (object.events) { + if (!Array.isArray(object.events)) + throw TypeError(".tendermint.abci.types.ResponseEndBlock.events: array expected"); + message.events = []; + for (var i = 0; i < object.events.length; ++i) { + if (typeof object.events[i] !== "object") + throw TypeError(".tendermint.abci.types.ResponseEndBlock.events: object expected"); + message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ResponseEndBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseEndBlock + * @static + * @param {tendermint.abci.types.ResponseEndBlock} message ResponseEndBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseEndBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.validatorUpdates = []; + object.events = []; + } + if (options.defaults) + object.consensusParamUpdates = null; + if (message.validatorUpdates && message.validatorUpdates.length) { + object.validatorUpdates = []; + for (var j = 0; j < message.validatorUpdates.length; ++j) + object.validatorUpdates[j] = $root.tendermint.abci.types.ValidatorUpdate.toObject(message.validatorUpdates[j], options); + } + if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) + object.consensusParamUpdates = $root.tendermint.abci.types.ConsensusParams.toObject(message.consensusParamUpdates, options); + if (message.events && message.events.length) { + object.events = []; + for (var j = 0; j < message.events.length; ++j) + object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); + } + return object; + }; + + /** + * Converts this ResponseEndBlock to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseEndBlock + * @instance + * @returns {Object.} JSON object + */ + ResponseEndBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseEndBlock; + })(); + + types.ResponseCommit = (function() { + + /** + * Properties of a ResponseCommit. + * @memberof tendermint.abci.types + * @interface IResponseCommit + * @property {Uint8Array|null} [data] ResponseCommit data + */ + + /** + * Constructs a new ResponseCommit. + * @memberof tendermint.abci.types + * @classdesc Represents a ResponseCommit. + * @implements IResponseCommit + * @constructor + * @param {tendermint.abci.types.IResponseCommit=} [properties] Properties to set + */ + function ResponseCommit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResponseCommit data. + * @member {Uint8Array} data + * @memberof tendermint.abci.types.ResponseCommit + * @instance + */ + ResponseCommit.prototype.data = $util.newBuffer([]); + + /** + * Creates a new ResponseCommit instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ResponseCommit + * @static + * @param {tendermint.abci.types.IResponseCommit=} [properties] Properties to set + * @returns {tendermint.abci.types.ResponseCommit} ResponseCommit instance + */ + ResponseCommit.create = function create(properties) { + return new ResponseCommit(properties); + }; + + /** + * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ResponseCommit + * @static + * @param {tendermint.abci.types.IResponseCommit} message ResponseCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCommit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ResponseCommit + * @static + * @param {tendermint.abci.types.IResponseCommit} message ResponseCommit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResponseCommit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ResponseCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ResponseCommit} ResponseCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCommit.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseCommit(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ResponseCommit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ResponseCommit} ResponseCommit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResponseCommit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResponseCommit message. + * @function verify + * @memberof tendermint.abci.types.ResponseCommit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResponseCommit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ResponseCommit + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ResponseCommit} ResponseCommit + */ + ResponseCommit.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ResponseCommit) + return object; + var message = new $root.tendermint.abci.types.ResponseCommit(); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ResponseCommit + * @static + * @param {tendermint.abci.types.ResponseCommit} message ResponseCommit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResponseCommit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this ResponseCommit to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ResponseCommit + * @instance + * @returns {Object.} JSON object + */ + ResponseCommit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ResponseCommit; + })(); + + types.ConsensusParams = (function() { + + /** + * Properties of a ConsensusParams. + * @memberof tendermint.abci.types + * @interface IConsensusParams + * @property {tendermint.abci.types.IBlockParams|null} [block] ConsensusParams block + * @property {tendermint.abci.types.IEvidenceParams|null} [evidence] ConsensusParams evidence + * @property {tendermint.abci.types.IValidatorParams|null} [validator] ConsensusParams validator + */ + + /** + * Constructs a new ConsensusParams. + * @memberof tendermint.abci.types + * @classdesc Represents a ConsensusParams. + * @implements IConsensusParams + * @constructor + * @param {tendermint.abci.types.IConsensusParams=} [properties] Properties to set + */ + function ConsensusParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConsensusParams block. + * @member {tendermint.abci.types.IBlockParams|null|undefined} block + * @memberof tendermint.abci.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.block = null; + + /** + * ConsensusParams evidence. + * @member {tendermint.abci.types.IEvidenceParams|null|undefined} evidence + * @memberof tendermint.abci.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.evidence = null; + + /** + * ConsensusParams validator. + * @member {tendermint.abci.types.IValidatorParams|null|undefined} validator + * @memberof tendermint.abci.types.ConsensusParams + * @instance + */ + ConsensusParams.prototype.validator = null; + + /** + * Creates a new ConsensusParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ConsensusParams + * @static + * @param {tendermint.abci.types.IConsensusParams=} [properties] Properties to set + * @returns {tendermint.abci.types.ConsensusParams} ConsensusParams instance + */ + ConsensusParams.create = function create(properties) { + return new ConsensusParams(properties); + }; + + /** + * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ConsensusParams + * @static + * @param {tendermint.abci.types.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.block != null && Object.hasOwnProperty.call(message, "block")) + $root.tendermint.abci.types.BlockParams.encode(message.block, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) + $root.tendermint.abci.types.EvidenceParams.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.abci.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ConsensusParams + * @static + * @param {tendermint.abci.types.IConsensusParams} message ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConsensusParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ConsensusParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.block = $root.tendermint.abci.types.BlockParams.decode(reader, reader.uint32()); + break; + case 2: + message.evidence = $root.tendermint.abci.types.EvidenceParams.decode(reader, reader.uint32()); + break; + case 3: + message.validator = $root.tendermint.abci.types.ValidatorParams.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ConsensusParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ConsensusParams} ConsensusParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConsensusParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConsensusParams message. + * @function verify + * @memberof tendermint.abci.types.ConsensusParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConsensusParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.block != null && message.hasOwnProperty("block")) { + var error = $root.tendermint.abci.types.BlockParams.verify(message.block); + if (error) + return "block." + error; + } + if (message.evidence != null && message.hasOwnProperty("evidence")) { + var error = $root.tendermint.abci.types.EvidenceParams.verify(message.evidence); + if (error) + return "evidence." + error; + } + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.abci.types.ValidatorParams.verify(message.validator); + if (error) + return "validator." + error; + } + return null; + }; + + /** + * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ConsensusParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ConsensusParams} ConsensusParams + */ + ConsensusParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ConsensusParams) + return object; + var message = new $root.tendermint.abci.types.ConsensusParams(); + if (object.block != null) { + if (typeof object.block !== "object") + throw TypeError(".tendermint.abci.types.ConsensusParams.block: object expected"); + message.block = $root.tendermint.abci.types.BlockParams.fromObject(object.block); + } + if (object.evidence != null) { + if (typeof object.evidence !== "object") + throw TypeError(".tendermint.abci.types.ConsensusParams.evidence: object expected"); + message.evidence = $root.tendermint.abci.types.EvidenceParams.fromObject(object.evidence); + } + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.types.ConsensusParams.validator: object expected"); + message.validator = $root.tendermint.abci.types.ValidatorParams.fromObject(object.validator); + } + return message; + }; + + /** + * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ConsensusParams + * @static + * @param {tendermint.abci.types.ConsensusParams} message ConsensusParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConsensusParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.block = null; + object.evidence = null; + object.validator = null; + } + if (message.block != null && message.hasOwnProperty("block")) + object.block = $root.tendermint.abci.types.BlockParams.toObject(message.block, options); + if (message.evidence != null && message.hasOwnProperty("evidence")) + object.evidence = $root.tendermint.abci.types.EvidenceParams.toObject(message.evidence, options); + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.abci.types.ValidatorParams.toObject(message.validator, options); + return object; + }; + + /** + * Converts this ConsensusParams to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ConsensusParams + * @instance + * @returns {Object.} JSON object + */ + ConsensusParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ConsensusParams; + })(); + + types.BlockParams = (function() { + + /** + * Properties of a BlockParams. + * @memberof tendermint.abci.types + * @interface IBlockParams + * @property {number|Long|null} [maxBytes] BlockParams maxBytes + * @property {number|Long|null} [maxGas] BlockParams maxGas + */ + + /** + * Constructs a new BlockParams. + * @memberof tendermint.abci.types + * @classdesc Represents a BlockParams. + * @implements IBlockParams + * @constructor + * @param {tendermint.abci.types.IBlockParams=} [properties] Properties to set + */ + function BlockParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockParams maxBytes. + * @member {number|Long} maxBytes + * @memberof tendermint.abci.types.BlockParams + * @instance + */ + BlockParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BlockParams maxGas. + * @member {number|Long} maxGas + * @memberof tendermint.abci.types.BlockParams + * @instance + */ + BlockParams.prototype.maxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BlockParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.BlockParams + * @static + * @param {tendermint.abci.types.IBlockParams=} [properties] Properties to set + * @returns {tendermint.abci.types.BlockParams} BlockParams instance + */ + BlockParams.create = function create(properties) { + return new BlockParams(properties); + }; + + /** + * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.BlockParams + * @static + * @param {tendermint.abci.types.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxBytes); + if (message.maxGas != null && Object.hasOwnProperty.call(message, "maxGas")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxGas); + return writer; + }; + + /** + * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.BlockParams + * @static + * @param {tendermint.abci.types.IBlockParams} message BlockParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.BlockParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxBytes = reader.int64(); + break; + case 2: + message.maxGas = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.BlockParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.BlockParams} BlockParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockParams message. + * @function verify + * @memberof tendermint.abci.types.BlockParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) + return "maxBytes: integer|Long expected"; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (!$util.isInteger(message.maxGas) && !(message.maxGas && $util.isInteger(message.maxGas.low) && $util.isInteger(message.maxGas.high))) + return "maxGas: integer|Long expected"; + return null; + }; + + /** + * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.BlockParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.BlockParams} BlockParams + */ + BlockParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.BlockParams) + return object; + var message = new $root.tendermint.abci.types.BlockParams(); + if (object.maxBytes != null) + if ($util.Long) + (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; + else if (typeof object.maxBytes === "string") + message.maxBytes = parseInt(object.maxBytes, 10); + else if (typeof object.maxBytes === "number") + message.maxBytes = object.maxBytes; + else if (typeof object.maxBytes === "object") + message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); + if (object.maxGas != null) + if ($util.Long) + (message.maxGas = $util.Long.fromValue(object.maxGas)).unsigned = false; + else if (typeof object.maxGas === "string") + message.maxGas = parseInt(object.maxGas, 10); + else if (typeof object.maxGas === "number") + message.maxGas = object.maxGas; + else if (typeof object.maxGas === "object") + message.maxGas = new $util.LongBits(object.maxGas.low >>> 0, object.maxGas.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BlockParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.BlockParams + * @static + * @param {tendermint.abci.types.BlockParams} message BlockParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxGas = options.longs === String ? "0" : 0; + } + if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) + if (typeof message.maxBytes === "number") + object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; + else + object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; + if (message.maxGas != null && message.hasOwnProperty("maxGas")) + if (typeof message.maxGas === "number") + object.maxGas = options.longs === String ? String(message.maxGas) : message.maxGas; + else + object.maxGas = options.longs === String ? $util.Long.prototype.toString.call(message.maxGas) : options.longs === Number ? new $util.LongBits(message.maxGas.low >>> 0, message.maxGas.high >>> 0).toNumber() : message.maxGas; + return object; + }; + + /** + * Converts this BlockParams to JSON. + * @function toJSON + * @memberof tendermint.abci.types.BlockParams + * @instance + * @returns {Object.} JSON object + */ + BlockParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockParams; + })(); + + types.EvidenceParams = (function() { + + /** + * Properties of an EvidenceParams. + * @memberof tendermint.abci.types + * @interface IEvidenceParams + * @property {number|Long|null} [maxAgeNumBlocks] EvidenceParams maxAgeNumBlocks + * @property {google.protobuf.IDuration|null} [maxAgeDuration] EvidenceParams maxAgeDuration + */ + + /** + * Constructs a new EvidenceParams. + * @memberof tendermint.abci.types + * @classdesc Represents an EvidenceParams. + * @implements IEvidenceParams + * @constructor + * @param {tendermint.abci.types.IEvidenceParams=} [properties] Properties to set + */ + function EvidenceParams(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EvidenceParams maxAgeNumBlocks. + * @member {number|Long} maxAgeNumBlocks + * @memberof tendermint.abci.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxAgeNumBlocks = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * EvidenceParams maxAgeDuration. + * @member {google.protobuf.IDuration|null|undefined} maxAgeDuration + * @memberof tendermint.abci.types.EvidenceParams + * @instance + */ + EvidenceParams.prototype.maxAgeDuration = null; + + /** + * Creates a new EvidenceParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.EvidenceParams + * @static + * @param {tendermint.abci.types.IEvidenceParams=} [properties] Properties to set + * @returns {tendermint.abci.types.EvidenceParams} EvidenceParams instance + */ + EvidenceParams.create = function create(properties) { + return new EvidenceParams(properties); + }; + + /** + * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.EvidenceParams + * @static + * @param {tendermint.abci.types.IEvidenceParams} message EvidenceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxAgeNumBlocks != null && Object.hasOwnProperty.call(message, "maxAgeNumBlocks")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxAgeNumBlocks); + if (message.maxAgeDuration != null && Object.hasOwnProperty.call(message, "maxAgeDuration")) + $root.google.protobuf.Duration.encode(message.maxAgeDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.EvidenceParams + * @static + * @param {tendermint.abci.types.IEvidenceParams} message EvidenceParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EvidenceParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.EvidenceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.EvidenceParams} EvidenceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.EvidenceParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.maxAgeNumBlocks = reader.int64(); + break; + case 2: + message.maxAgeDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.EvidenceParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.EvidenceParams} EvidenceParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EvidenceParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EvidenceParams message. + * @function verify + * @memberof tendermint.abci.types.EvidenceParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EvidenceParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) + if (!$util.isInteger(message.maxAgeNumBlocks) && !(message.maxAgeNumBlocks && $util.isInteger(message.maxAgeNumBlocks.low) && $util.isInteger(message.maxAgeNumBlocks.high))) + return "maxAgeNumBlocks: integer|Long expected"; + if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) { + var error = $root.google.protobuf.Duration.verify(message.maxAgeDuration); + if (error) + return "maxAgeDuration." + error; + } + return null; + }; + + /** + * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.EvidenceParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.EvidenceParams} EvidenceParams + */ + EvidenceParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.EvidenceParams) + return object; + var message = new $root.tendermint.abci.types.EvidenceParams(); + if (object.maxAgeNumBlocks != null) + if ($util.Long) + (message.maxAgeNumBlocks = $util.Long.fromValue(object.maxAgeNumBlocks)).unsigned = false; + else if (typeof object.maxAgeNumBlocks === "string") + message.maxAgeNumBlocks = parseInt(object.maxAgeNumBlocks, 10); + else if (typeof object.maxAgeNumBlocks === "number") + message.maxAgeNumBlocks = object.maxAgeNumBlocks; + else if (typeof object.maxAgeNumBlocks === "object") + message.maxAgeNumBlocks = new $util.LongBits(object.maxAgeNumBlocks.low >>> 0, object.maxAgeNumBlocks.high >>> 0).toNumber(); + if (object.maxAgeDuration != null) { + if (typeof object.maxAgeDuration !== "object") + throw TypeError(".tendermint.abci.types.EvidenceParams.maxAgeDuration: object expected"); + message.maxAgeDuration = $root.google.protobuf.Duration.fromObject(object.maxAgeDuration); + } + return message; + }; + + /** + * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.EvidenceParams + * @static + * @param {tendermint.abci.types.EvidenceParams} message EvidenceParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EvidenceParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxAgeNumBlocks = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxAgeNumBlocks = options.longs === String ? "0" : 0; + object.maxAgeDuration = null; + } + if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) + if (typeof message.maxAgeNumBlocks === "number") + object.maxAgeNumBlocks = options.longs === String ? String(message.maxAgeNumBlocks) : message.maxAgeNumBlocks; + else + object.maxAgeNumBlocks = options.longs === String ? $util.Long.prototype.toString.call(message.maxAgeNumBlocks) : options.longs === Number ? new $util.LongBits(message.maxAgeNumBlocks.low >>> 0, message.maxAgeNumBlocks.high >>> 0).toNumber() : message.maxAgeNumBlocks; + if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) + object.maxAgeDuration = $root.google.protobuf.Duration.toObject(message.maxAgeDuration, options); + return object; + }; + + /** + * Converts this EvidenceParams to JSON. + * @function toJSON + * @memberof tendermint.abci.types.EvidenceParams + * @instance + * @returns {Object.} JSON object + */ + EvidenceParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EvidenceParams; + })(); + + types.ValidatorParams = (function() { + + /** + * Properties of a ValidatorParams. + * @memberof tendermint.abci.types + * @interface IValidatorParams + * @property {Array.|null} [pubKeyTypes] ValidatorParams pubKeyTypes + */ + + /** + * Constructs a new ValidatorParams. + * @memberof tendermint.abci.types + * @classdesc Represents a ValidatorParams. + * @implements IValidatorParams + * @constructor + * @param {tendermint.abci.types.IValidatorParams=} [properties] Properties to set + */ + function ValidatorParams(properties) { + this.pubKeyTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorParams pubKeyTypes. + * @member {Array.} pubKeyTypes + * @memberof tendermint.abci.types.ValidatorParams + * @instance + */ + ValidatorParams.prototype.pubKeyTypes = $util.emptyArray; + + /** + * Creates a new ValidatorParams instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ValidatorParams + * @static + * @param {tendermint.abci.types.IValidatorParams=} [properties] Properties to set + * @returns {tendermint.abci.types.ValidatorParams} ValidatorParams instance + */ + ValidatorParams.create = function create(properties) { + return new ValidatorParams(properties); + }; + + /** + * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ValidatorParams + * @static + * @param {tendermint.abci.types.IValidatorParams} message ValidatorParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorParams.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKeyTypes != null && message.pubKeyTypes.length) + for (var i = 0; i < message.pubKeyTypes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubKeyTypes[i]); + return writer; + }; + + /** + * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ValidatorParams + * @static + * @param {tendermint.abci.types.IValidatorParams} message ValidatorParams message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorParams.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ValidatorParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ValidatorParams} ValidatorParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorParams.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ValidatorParams(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.pubKeyTypes && message.pubKeyTypes.length)) + message.pubKeyTypes = []; + message.pubKeyTypes.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ValidatorParams + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ValidatorParams} ValidatorParams + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorParams.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorParams message. + * @function verify + * @memberof tendermint.abci.types.ValidatorParams + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorParams.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKeyTypes != null && message.hasOwnProperty("pubKeyTypes")) { + if (!Array.isArray(message.pubKeyTypes)) + return "pubKeyTypes: array expected"; + for (var i = 0; i < message.pubKeyTypes.length; ++i) + if (!$util.isString(message.pubKeyTypes[i])) + return "pubKeyTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ValidatorParams + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ValidatorParams} ValidatorParams + */ + ValidatorParams.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ValidatorParams) + return object; + var message = new $root.tendermint.abci.types.ValidatorParams(); + if (object.pubKeyTypes) { + if (!Array.isArray(object.pubKeyTypes)) + throw TypeError(".tendermint.abci.types.ValidatorParams.pubKeyTypes: array expected"); + message.pubKeyTypes = []; + for (var i = 0; i < object.pubKeyTypes.length; ++i) + message.pubKeyTypes[i] = String(object.pubKeyTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ValidatorParams + * @static + * @param {tendermint.abci.types.ValidatorParams} message ValidatorParams + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorParams.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pubKeyTypes = []; + if (message.pubKeyTypes && message.pubKeyTypes.length) { + object.pubKeyTypes = []; + for (var j = 0; j < message.pubKeyTypes.length; ++j) + object.pubKeyTypes[j] = message.pubKeyTypes[j]; + } + return object; + }; + + /** + * Converts this ValidatorParams to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ValidatorParams + * @instance + * @returns {Object.} JSON object + */ + ValidatorParams.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorParams; + })(); + + types.LastCommitInfo = (function() { + + /** + * Properties of a LastCommitInfo. + * @memberof tendermint.abci.types + * @interface ILastCommitInfo + * @property {number|null} [round] LastCommitInfo round + * @property {Array.|null} [votes] LastCommitInfo votes + */ + + /** + * Constructs a new LastCommitInfo. + * @memberof tendermint.abci.types + * @classdesc Represents a LastCommitInfo. + * @implements ILastCommitInfo + * @constructor + * @param {tendermint.abci.types.ILastCommitInfo=} [properties] Properties to set + */ + function LastCommitInfo(properties) { + this.votes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LastCommitInfo round. + * @member {number} round + * @memberof tendermint.abci.types.LastCommitInfo + * @instance + */ + LastCommitInfo.prototype.round = 0; + + /** + * LastCommitInfo votes. + * @member {Array.} votes + * @memberof tendermint.abci.types.LastCommitInfo + * @instance + */ + LastCommitInfo.prototype.votes = $util.emptyArray; + + /** + * Creates a new LastCommitInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.LastCommitInfo + * @static + * @param {tendermint.abci.types.ILastCommitInfo=} [properties] Properties to set + * @returns {tendermint.abci.types.LastCommitInfo} LastCommitInfo instance + */ + LastCommitInfo.create = function create(properties) { + return new LastCommitInfo(properties); + }; + + /** + * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.LastCommitInfo + * @static + * @param {tendermint.abci.types.ILastCommitInfo} message LastCommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastCommitInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.round != null && Object.hasOwnProperty.call(message, "round")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.round); + if (message.votes != null && message.votes.length) + for (var i = 0; i < message.votes.length; ++i) + $root.tendermint.abci.types.VoteInfo.encode(message.votes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.LastCommitInfo + * @static + * @param {tendermint.abci.types.ILastCommitInfo} message LastCommitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LastCommitInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.LastCommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.LastCommitInfo} LastCommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastCommitInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.LastCommitInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.round = reader.int32(); + break; + case 2: + if (!(message.votes && message.votes.length)) + message.votes = []; + message.votes.push($root.tendermint.abci.types.VoteInfo.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.LastCommitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.LastCommitInfo} LastCommitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LastCommitInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LastCommitInfo message. + * @function verify + * @memberof tendermint.abci.types.LastCommitInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LastCommitInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.round != null && message.hasOwnProperty("round")) + if (!$util.isInteger(message.round)) + return "round: integer expected"; + if (message.votes != null && message.hasOwnProperty("votes")) { + if (!Array.isArray(message.votes)) + return "votes: array expected"; + for (var i = 0; i < message.votes.length; ++i) { + var error = $root.tendermint.abci.types.VoteInfo.verify(message.votes[i]); + if (error) + return "votes." + error; + } + } + return null; + }; + + /** + * Creates a LastCommitInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.LastCommitInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.LastCommitInfo} LastCommitInfo + */ + LastCommitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.LastCommitInfo) + return object; + var message = new $root.tendermint.abci.types.LastCommitInfo(); + if (object.round != null) + message.round = object.round | 0; + if (object.votes) { + if (!Array.isArray(object.votes)) + throw TypeError(".tendermint.abci.types.LastCommitInfo.votes: array expected"); + message.votes = []; + for (var i = 0; i < object.votes.length; ++i) { + if (typeof object.votes[i] !== "object") + throw TypeError(".tendermint.abci.types.LastCommitInfo.votes: object expected"); + message.votes[i] = $root.tendermint.abci.types.VoteInfo.fromObject(object.votes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LastCommitInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.LastCommitInfo + * @static + * @param {tendermint.abci.types.LastCommitInfo} message LastCommitInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LastCommitInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.votes = []; + if (options.defaults) + object.round = 0; + if (message.round != null && message.hasOwnProperty("round")) + object.round = message.round; + if (message.votes && message.votes.length) { + object.votes = []; + for (var j = 0; j < message.votes.length; ++j) + object.votes[j] = $root.tendermint.abci.types.VoteInfo.toObject(message.votes[j], options); + } + return object; + }; + + /** + * Converts this LastCommitInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.types.LastCommitInfo + * @instance + * @returns {Object.} JSON object + */ + LastCommitInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return LastCommitInfo; + })(); + + types.Event = (function() { + + /** + * Properties of an Event. + * @memberof tendermint.abci.types + * @interface IEvent + * @property {string|null} [type] Event type + * @property {Array.|null} [attributes] Event attributes + */ + + /** + * Constructs a new Event. + * @memberof tendermint.abci.types + * @classdesc Represents an Event. + * @implements IEvent + * @constructor + * @param {tendermint.abci.types.IEvent=} [properties] Properties to set + */ + function Event(properties) { + this.attributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Event type. + * @member {string} type + * @memberof tendermint.abci.types.Event + * @instance + */ + Event.prototype.type = ""; + + /** + * Event attributes. + * @member {Array.} attributes + * @memberof tendermint.abci.types.Event + * @instance + */ + Event.prototype.attributes = $util.emptyArray; + + /** + * Creates a new Event instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.Event + * @static + * @param {tendermint.abci.types.IEvent=} [properties] Properties to set + * @returns {tendermint.abci.types.Event} Event instance + */ + Event.create = function create(properties) { + return new Event(properties); + }; + + /** + * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.Event + * @static + * @param {tendermint.abci.types.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.attributes != null && message.attributes.length) + for (var i = 0; i < message.attributes.length; ++i) + $root.tendermint.libs.kv.Pair.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.Event + * @static + * @param {tendermint.abci.types.IEvent} message Event message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Event.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Event message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Event(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + if (!(message.attributes && message.attributes.length)) + message.attributes = []; + message.attributes.push($root.tendermint.libs.kv.Pair.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.Event + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.Event} Event + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Event.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Event message. + * @function verify + * @memberof tendermint.abci.types.Event + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Event.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.attributes != null && message.hasOwnProperty("attributes")) { + if (!Array.isArray(message.attributes)) + return "attributes: array expected"; + for (var i = 0; i < message.attributes.length; ++i) { + var error = $root.tendermint.libs.kv.Pair.verify(message.attributes[i]); + if (error) + return "attributes." + error; + } + } + return null; + }; + + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.Event + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.Event} Event + */ + Event.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.Event) + return object; + var message = new $root.tendermint.abci.types.Event(); + if (object.type != null) + message.type = String(object.type); + if (object.attributes) { + if (!Array.isArray(object.attributes)) + throw TypeError(".tendermint.abci.types.Event.attributes: array expected"); + message.attributes = []; + for (var i = 0; i < object.attributes.length; ++i) { + if (typeof object.attributes[i] !== "object") + throw TypeError(".tendermint.abci.types.Event.attributes: object expected"); + message.attributes[i] = $root.tendermint.libs.kv.Pair.fromObject(object.attributes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.Event + * @static + * @param {tendermint.abci.types.Event} message Event + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Event.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attributes = []; + if (options.defaults) + object.type = ""; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.attributes && message.attributes.length) { + object.attributes = []; + for (var j = 0; j < message.attributes.length; ++j) + object.attributes[j] = $root.tendermint.libs.kv.Pair.toObject(message.attributes[j], options); + } + return object; + }; + + /** + * Converts this Event to JSON. + * @function toJSON + * @memberof tendermint.abci.types.Event + * @instance + * @returns {Object.} JSON object + */ + Event.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Event; + })(); + + types.Header = (function() { + + /** + * Properties of a Header. + * @memberof tendermint.abci.types + * @interface IHeader + * @property {tendermint.abci.types.IVersion|null} [version] Header version + * @property {string|null} [chainId] Header chainId + * @property {number|Long|null} [height] Header height + * @property {google.protobuf.ITimestamp|null} [time] Header time + * @property {tendermint.abci.types.IBlockID|null} [lastBlockId] Header lastBlockId + * @property {Uint8Array|null} [lastCommitHash] Header lastCommitHash + * @property {Uint8Array|null} [dataHash] Header dataHash + * @property {Uint8Array|null} [validatorsHash] Header validatorsHash + * @property {Uint8Array|null} [nextValidatorsHash] Header nextValidatorsHash + * @property {Uint8Array|null} [consensusHash] Header consensusHash + * @property {Uint8Array|null} [appHash] Header appHash + * @property {Uint8Array|null} [lastResultsHash] Header lastResultsHash + * @property {Uint8Array|null} [evidenceHash] Header evidenceHash + * @property {Uint8Array|null} [proposerAddress] Header proposerAddress + */ + + /** + * Constructs a new Header. + * @memberof tendermint.abci.types + * @classdesc Represents a Header. + * @implements IHeader + * @constructor + * @param {tendermint.abci.types.IHeader=} [properties] Properties to set + */ + function Header(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Header version. + * @member {tendermint.abci.types.IVersion|null|undefined} version + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.version = null; + + /** + * Header chainId. + * @member {string} chainId + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.chainId = ""; + + /** + * Header height. + * @member {number|Long} height + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Header time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.time = null; + + /** + * Header lastBlockId. + * @member {tendermint.abci.types.IBlockID|null|undefined} lastBlockId + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.lastBlockId = null; + + /** + * Header lastCommitHash. + * @member {Uint8Array} lastCommitHash + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.lastCommitHash = $util.newBuffer([]); + + /** + * Header dataHash. + * @member {Uint8Array} dataHash + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.dataHash = $util.newBuffer([]); + + /** + * Header validatorsHash. + * @member {Uint8Array} validatorsHash + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.validatorsHash = $util.newBuffer([]); + + /** + * Header nextValidatorsHash. + * @member {Uint8Array} nextValidatorsHash + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.nextValidatorsHash = $util.newBuffer([]); + + /** + * Header consensusHash. + * @member {Uint8Array} consensusHash + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.consensusHash = $util.newBuffer([]); + + /** + * Header appHash. + * @member {Uint8Array} appHash + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.appHash = $util.newBuffer([]); + + /** + * Header lastResultsHash. + * @member {Uint8Array} lastResultsHash + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.lastResultsHash = $util.newBuffer([]); + + /** + * Header evidenceHash. + * @member {Uint8Array} evidenceHash + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.evidenceHash = $util.newBuffer([]); + + /** + * Header proposerAddress. + * @member {Uint8Array} proposerAddress + * @memberof tendermint.abci.types.Header + * @instance + */ + Header.prototype.proposerAddress = $util.newBuffer([]); + + /** + * Creates a new Header instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.Header + * @static + * @param {tendermint.abci.types.IHeader=} [properties] Properties to set + * @returns {tendermint.abci.types.Header} Header instance + */ + Header.create = function create(properties) { + return new Header(properties); + }; + + /** + * Encodes the specified Header message. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.Header + * @static + * @param {tendermint.abci.types.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + $root.tendermint.abci.types.Version.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastBlockId != null && Object.hasOwnProperty.call(message, "lastBlockId")) + $root.tendermint.abci.types.BlockID.encode(message.lastBlockId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.lastCommitHash != null && Object.hasOwnProperty.call(message, "lastCommitHash")) + writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.lastCommitHash); + if (message.dataHash != null && Object.hasOwnProperty.call(message, "dataHash")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.dataHash); + if (message.validatorsHash != null && Object.hasOwnProperty.call(message, "validatorsHash")) + writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validatorsHash); + if (message.nextValidatorsHash != null && Object.hasOwnProperty.call(message, "nextValidatorsHash")) + writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.nextValidatorsHash); + if (message.consensusHash != null && Object.hasOwnProperty.call(message, "consensusHash")) + writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.consensusHash); + if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) + writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.appHash); + if (message.lastResultsHash != null && Object.hasOwnProperty.call(message, "lastResultsHash")) + writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.lastResultsHash); + if (message.evidenceHash != null && Object.hasOwnProperty.call(message, "evidenceHash")) + writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.evidenceHash); + if (message.proposerAddress != null && Object.hasOwnProperty.call(message, "proposerAddress")) + writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.proposerAddress); + return writer; + }; + + /** + * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.Header + * @static + * @param {tendermint.abci.types.IHeader} message Header message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Header.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Header message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Header(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.version = $root.tendermint.abci.types.Version.decode(reader, reader.uint32()); + break; + case 2: + message.chainId = reader.string(); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.lastBlockId = $root.tendermint.abci.types.BlockID.decode(reader, reader.uint32()); + break; + case 6: + message.lastCommitHash = reader.bytes(); + break; + case 7: + message.dataHash = reader.bytes(); + break; + case 8: + message.validatorsHash = reader.bytes(); + break; + case 9: + message.nextValidatorsHash = reader.bytes(); + break; + case 10: + message.consensusHash = reader.bytes(); + break; + case 11: + message.appHash = reader.bytes(); + break; + case 12: + message.lastResultsHash = reader.bytes(); + break; + case 13: + message.evidenceHash = reader.bytes(); + break; + case 14: + message.proposerAddress = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Header message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.Header + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.Header} Header + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Header.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Header message. + * @function verify + * @memberof tendermint.abci.types.Header + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Header.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) { + var error = $root.tendermint.abci.types.Version.verify(message.version); + if (error) + return "version." + error; + } + if (message.chainId != null && message.hasOwnProperty("chainId")) + if (!$util.isString(message.chainId)) + return "chainId: string expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) { + var error = $root.tendermint.abci.types.BlockID.verify(message.lastBlockId); + if (error) + return "lastBlockId." + error; + } + if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) + if (!(message.lastCommitHash && typeof message.lastCommitHash.length === "number" || $util.isString(message.lastCommitHash))) + return "lastCommitHash: buffer expected"; + if (message.dataHash != null && message.hasOwnProperty("dataHash")) + if (!(message.dataHash && typeof message.dataHash.length === "number" || $util.isString(message.dataHash))) + return "dataHash: buffer expected"; + if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) + if (!(message.validatorsHash && typeof message.validatorsHash.length === "number" || $util.isString(message.validatorsHash))) + return "validatorsHash: buffer expected"; + if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) + if (!(message.nextValidatorsHash && typeof message.nextValidatorsHash.length === "number" || $util.isString(message.nextValidatorsHash))) + return "nextValidatorsHash: buffer expected"; + if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) + if (!(message.consensusHash && typeof message.consensusHash.length === "number" || $util.isString(message.consensusHash))) + return "consensusHash: buffer expected"; + if (message.appHash != null && message.hasOwnProperty("appHash")) + if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) + return "appHash: buffer expected"; + if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) + if (!(message.lastResultsHash && typeof message.lastResultsHash.length === "number" || $util.isString(message.lastResultsHash))) + return "lastResultsHash: buffer expected"; + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + if (!(message.evidenceHash && typeof message.evidenceHash.length === "number" || $util.isString(message.evidenceHash))) + return "evidenceHash: buffer expected"; + if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) + if (!(message.proposerAddress && typeof message.proposerAddress.length === "number" || $util.isString(message.proposerAddress))) + return "proposerAddress: buffer expected"; + return null; + }; + + /** + * Creates a Header message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.Header + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.Header} Header + */ + Header.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.Header) + return object; + var message = new $root.tendermint.abci.types.Header(); + if (object.version != null) { + if (typeof object.version !== "object") + throw TypeError(".tendermint.abci.types.Header.version: object expected"); + message.version = $root.tendermint.abci.types.Version.fromObject(object.version); + } + if (object.chainId != null) + message.chainId = String(object.chainId); + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.abci.types.Header.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.lastBlockId != null) { + if (typeof object.lastBlockId !== "object") + throw TypeError(".tendermint.abci.types.Header.lastBlockId: object expected"); + message.lastBlockId = $root.tendermint.abci.types.BlockID.fromObject(object.lastBlockId); + } + if (object.lastCommitHash != null) + if (typeof object.lastCommitHash === "string") + $util.base64.decode(object.lastCommitHash, message.lastCommitHash = $util.newBuffer($util.base64.length(object.lastCommitHash)), 0); + else if (object.lastCommitHash.length) + message.lastCommitHash = object.lastCommitHash; + if (object.dataHash != null) + if (typeof object.dataHash === "string") + $util.base64.decode(object.dataHash, message.dataHash = $util.newBuffer($util.base64.length(object.dataHash)), 0); + else if (object.dataHash.length) + message.dataHash = object.dataHash; + if (object.validatorsHash != null) + if (typeof object.validatorsHash === "string") + $util.base64.decode(object.validatorsHash, message.validatorsHash = $util.newBuffer($util.base64.length(object.validatorsHash)), 0); + else if (object.validatorsHash.length) + message.validatorsHash = object.validatorsHash; + if (object.nextValidatorsHash != null) + if (typeof object.nextValidatorsHash === "string") + $util.base64.decode(object.nextValidatorsHash, message.nextValidatorsHash = $util.newBuffer($util.base64.length(object.nextValidatorsHash)), 0); + else if (object.nextValidatorsHash.length) + message.nextValidatorsHash = object.nextValidatorsHash; + if (object.consensusHash != null) + if (typeof object.consensusHash === "string") + $util.base64.decode(object.consensusHash, message.consensusHash = $util.newBuffer($util.base64.length(object.consensusHash)), 0); + else if (object.consensusHash.length) + message.consensusHash = object.consensusHash; + if (object.appHash != null) + if (typeof object.appHash === "string") + $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); + else if (object.appHash.length) + message.appHash = object.appHash; + if (object.lastResultsHash != null) + if (typeof object.lastResultsHash === "string") + $util.base64.decode(object.lastResultsHash, message.lastResultsHash = $util.newBuffer($util.base64.length(object.lastResultsHash)), 0); + else if (object.lastResultsHash.length) + message.lastResultsHash = object.lastResultsHash; + if (object.evidenceHash != null) + if (typeof object.evidenceHash === "string") + $util.base64.decode(object.evidenceHash, message.evidenceHash = $util.newBuffer($util.base64.length(object.evidenceHash)), 0); + else if (object.evidenceHash.length) + message.evidenceHash = object.evidenceHash; + if (object.proposerAddress != null) + if (typeof object.proposerAddress === "string") + $util.base64.decode(object.proposerAddress, message.proposerAddress = $util.newBuffer($util.base64.length(object.proposerAddress)), 0); + else if (object.proposerAddress.length) + message.proposerAddress = object.proposerAddress; + return message; + }; + + /** + * Creates a plain object from a Header message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.Header + * @static + * @param {tendermint.abci.types.Header} message Header + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Header.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = null; + object.chainId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + object.lastBlockId = null; + if (options.bytes === String) + object.lastCommitHash = ""; + else { + object.lastCommitHash = []; + if (options.bytes !== Array) + object.lastCommitHash = $util.newBuffer(object.lastCommitHash); + } + if (options.bytes === String) + object.dataHash = ""; + else { + object.dataHash = []; + if (options.bytes !== Array) + object.dataHash = $util.newBuffer(object.dataHash); + } + if (options.bytes === String) + object.validatorsHash = ""; + else { + object.validatorsHash = []; + if (options.bytes !== Array) + object.validatorsHash = $util.newBuffer(object.validatorsHash); + } + if (options.bytes === String) + object.nextValidatorsHash = ""; + else { + object.nextValidatorsHash = []; + if (options.bytes !== Array) + object.nextValidatorsHash = $util.newBuffer(object.nextValidatorsHash); + } + if (options.bytes === String) + object.consensusHash = ""; + else { + object.consensusHash = []; + if (options.bytes !== Array) + object.consensusHash = $util.newBuffer(object.consensusHash); + } + if (options.bytes === String) + object.appHash = ""; + else { + object.appHash = []; + if (options.bytes !== Array) + object.appHash = $util.newBuffer(object.appHash); + } + if (options.bytes === String) + object.lastResultsHash = ""; + else { + object.lastResultsHash = []; + if (options.bytes !== Array) + object.lastResultsHash = $util.newBuffer(object.lastResultsHash); + } + if (options.bytes === String) + object.evidenceHash = ""; + else { + object.evidenceHash = []; + if (options.bytes !== Array) + object.evidenceHash = $util.newBuffer(object.evidenceHash); + } + if (options.bytes === String) + object.proposerAddress = ""; + else { + object.proposerAddress = []; + if (options.bytes !== Array) + object.proposerAddress = $util.newBuffer(object.proposerAddress); + } + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = $root.tendermint.abci.types.Version.toObject(message.version, options); + if (message.chainId != null && message.hasOwnProperty("chainId")) + object.chainId = message.chainId; + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) + object.lastBlockId = $root.tendermint.abci.types.BlockID.toObject(message.lastBlockId, options); + if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) + object.lastCommitHash = options.bytes === String ? $util.base64.encode(message.lastCommitHash, 0, message.lastCommitHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastCommitHash) : message.lastCommitHash; + if (message.dataHash != null && message.hasOwnProperty("dataHash")) + object.dataHash = options.bytes === String ? $util.base64.encode(message.dataHash, 0, message.dataHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataHash) : message.dataHash; + if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) + object.validatorsHash = options.bytes === String ? $util.base64.encode(message.validatorsHash, 0, message.validatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorsHash) : message.validatorsHash; + if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) + object.nextValidatorsHash = options.bytes === String ? $util.base64.encode(message.nextValidatorsHash, 0, message.nextValidatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.nextValidatorsHash) : message.nextValidatorsHash; + if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) + object.consensusHash = options.bytes === String ? $util.base64.encode(message.consensusHash, 0, message.consensusHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensusHash) : message.consensusHash; + if (message.appHash != null && message.hasOwnProperty("appHash")) + object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; + if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) + object.lastResultsHash = options.bytes === String ? $util.base64.encode(message.lastResultsHash, 0, message.lastResultsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastResultsHash) : message.lastResultsHash; + if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) + object.evidenceHash = options.bytes === String ? $util.base64.encode(message.evidenceHash, 0, message.evidenceHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.evidenceHash) : message.evidenceHash; + if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) + object.proposerAddress = options.bytes === String ? $util.base64.encode(message.proposerAddress, 0, message.proposerAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposerAddress) : message.proposerAddress; + return object; + }; + + /** + * Converts this Header to JSON. + * @function toJSON + * @memberof tendermint.abci.types.Header + * @instance + * @returns {Object.} JSON object + */ + Header.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Header; + })(); + + types.Version = (function() { + + /** + * Properties of a Version. + * @memberof tendermint.abci.types + * @interface IVersion + * @property {number|Long|null} [Block] Version Block + * @property {number|Long|null} [App] Version App + */ + + /** + * Constructs a new Version. + * @memberof tendermint.abci.types + * @classdesc Represents a Version. + * @implements IVersion + * @constructor + * @param {tendermint.abci.types.IVersion=} [properties] Properties to set + */ + function Version(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Version Block. + * @member {number|Long} Block + * @memberof tendermint.abci.types.Version + * @instance + */ + Version.prototype.Block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Version App. + * @member {number|Long} App + * @memberof tendermint.abci.types.Version + * @instance + */ + Version.prototype.App = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new Version instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.Version + * @static + * @param {tendermint.abci.types.IVersion=} [properties] Properties to set + * @returns {tendermint.abci.types.Version} Version instance + */ + Version.create = function create(properties) { + return new Version(properties); + }; + + /** + * Encodes the specified Version message. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.Version + * @static + * @param {tendermint.abci.types.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.Block != null && Object.hasOwnProperty.call(message, "Block")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.Block); + if (message.App != null && Object.hasOwnProperty.call(message, "App")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.App); + return writer; + }; + + /** + * Encodes the specified Version message, length delimited. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.Version + * @static + * @param {tendermint.abci.types.IVersion} message Version message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Version.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Version message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Version(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.Block = reader.uint64(); + break; + case 2: + message.App = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.Version + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.Version} Version + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Version.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Version message. + * @function verify + * @memberof tendermint.abci.types.Version + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Version.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.Block != null && message.hasOwnProperty("Block")) + if (!$util.isInteger(message.Block) && !(message.Block && $util.isInteger(message.Block.low) && $util.isInteger(message.Block.high))) + return "Block: integer|Long expected"; + if (message.App != null && message.hasOwnProperty("App")) + if (!$util.isInteger(message.App) && !(message.App && $util.isInteger(message.App.low) && $util.isInteger(message.App.high))) + return "App: integer|Long expected"; + return null; + }; + + /** + * Creates a Version message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.Version + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.Version} Version + */ + Version.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.Version) + return object; + var message = new $root.tendermint.abci.types.Version(); + if (object.Block != null) + if ($util.Long) + (message.Block = $util.Long.fromValue(object.Block)).unsigned = true; + else if (typeof object.Block === "string") + message.Block = parseInt(object.Block, 10); + else if (typeof object.Block === "number") + message.Block = object.Block; + else if (typeof object.Block === "object") + message.Block = new $util.LongBits(object.Block.low >>> 0, object.Block.high >>> 0).toNumber(true); + if (object.App != null) + if ($util.Long) + (message.App = $util.Long.fromValue(object.App)).unsigned = true; + else if (typeof object.App === "string") + message.App = parseInt(object.App, 10); + else if (typeof object.App === "number") + message.App = object.App; + else if (typeof object.App === "object") + message.App = new $util.LongBits(object.App.low >>> 0, object.App.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.Version + * @static + * @param {tendermint.abci.types.Version} message Version + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Version.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.Block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.Block = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.App = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.App = options.longs === String ? "0" : 0; + } + if (message.Block != null && message.hasOwnProperty("Block")) + if (typeof message.Block === "number") + object.Block = options.longs === String ? String(message.Block) : message.Block; + else + object.Block = options.longs === String ? $util.Long.prototype.toString.call(message.Block) : options.longs === Number ? new $util.LongBits(message.Block.low >>> 0, message.Block.high >>> 0).toNumber(true) : message.Block; + if (message.App != null && message.hasOwnProperty("App")) + if (typeof message.App === "number") + object.App = options.longs === String ? String(message.App) : message.App; + else + object.App = options.longs === String ? $util.Long.prototype.toString.call(message.App) : options.longs === Number ? new $util.LongBits(message.App.low >>> 0, message.App.high >>> 0).toNumber(true) : message.App; + return object; + }; + + /** + * Converts this Version to JSON. + * @function toJSON + * @memberof tendermint.abci.types.Version + * @instance + * @returns {Object.} JSON object + */ + Version.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Version; + })(); + + types.BlockID = (function() { + + /** + * Properties of a BlockID. + * @memberof tendermint.abci.types + * @interface IBlockID + * @property {Uint8Array|null} [hash] BlockID hash + * @property {tendermint.abci.types.IPartSetHeader|null} [partsHeader] BlockID partsHeader + */ + + /** + * Constructs a new BlockID. + * @memberof tendermint.abci.types + * @classdesc Represents a BlockID. + * @implements IBlockID + * @constructor + * @param {tendermint.abci.types.IBlockID=} [properties] Properties to set + */ + function BlockID(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BlockID hash. + * @member {Uint8Array} hash + * @memberof tendermint.abci.types.BlockID + * @instance + */ + BlockID.prototype.hash = $util.newBuffer([]); + + /** + * BlockID partsHeader. + * @member {tendermint.abci.types.IPartSetHeader|null|undefined} partsHeader + * @memberof tendermint.abci.types.BlockID + * @instance + */ + BlockID.prototype.partsHeader = null; + + /** + * Creates a new BlockID instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.BlockID + * @static + * @param {tendermint.abci.types.IBlockID=} [properties] Properties to set + * @returns {tendermint.abci.types.BlockID} BlockID instance + */ + BlockID.create = function create(properties) { + return new BlockID(properties); + }; + + /** + * Encodes the specified BlockID message. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.BlockID + * @static + * @param {tendermint.abci.types.IBlockID} message BlockID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockID.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); + if (message.partsHeader != null && Object.hasOwnProperty.call(message, "partsHeader")) + $root.tendermint.abci.types.PartSetHeader.encode(message.partsHeader, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.BlockID + * @static + * @param {tendermint.abci.types.IBlockID} message BlockID message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockID.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockID message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.BlockID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.BlockID} BlockID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockID.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.BlockID(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.hash = reader.bytes(); + break; + case 2: + message.partsHeader = $root.tendermint.abci.types.PartSetHeader.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockID message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.BlockID + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.BlockID} BlockID + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockID.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockID message. + * @function verify + * @memberof tendermint.abci.types.BlockID + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockID.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + if (message.partsHeader != null && message.hasOwnProperty("partsHeader")) { + var error = $root.tendermint.abci.types.PartSetHeader.verify(message.partsHeader); + if (error) + return "partsHeader." + error; + } + return null; + }; + + /** + * Creates a BlockID message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.BlockID + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.BlockID} BlockID + */ + BlockID.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.BlockID) + return object; + var message = new $root.tendermint.abci.types.BlockID(); + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + if (object.partsHeader != null) { + if (typeof object.partsHeader !== "object") + throw TypeError(".tendermint.abci.types.BlockID.partsHeader: object expected"); + message.partsHeader = $root.tendermint.abci.types.PartSetHeader.fromObject(object.partsHeader); + } + return message; + }; + + /** + * Creates a plain object from a BlockID message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.BlockID + * @static + * @param {tendermint.abci.types.BlockID} message BlockID + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockID.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + object.partsHeader = null; + } + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + if (message.partsHeader != null && message.hasOwnProperty("partsHeader")) + object.partsHeader = $root.tendermint.abci.types.PartSetHeader.toObject(message.partsHeader, options); + return object; + }; + + /** + * Converts this BlockID to JSON. + * @function toJSON + * @memberof tendermint.abci.types.BlockID + * @instance + * @returns {Object.} JSON object + */ + BlockID.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockID; + })(); + + types.PartSetHeader = (function() { + + /** + * Properties of a PartSetHeader. + * @memberof tendermint.abci.types + * @interface IPartSetHeader + * @property {number|null} [total] PartSetHeader total + * @property {Uint8Array|null} [hash] PartSetHeader hash + */ + + /** + * Constructs a new PartSetHeader. + * @memberof tendermint.abci.types + * @classdesc Represents a PartSetHeader. + * @implements IPartSetHeader + * @constructor + * @param {tendermint.abci.types.IPartSetHeader=} [properties] Properties to set + */ + function PartSetHeader(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartSetHeader total. + * @member {number} total + * @memberof tendermint.abci.types.PartSetHeader + * @instance + */ + PartSetHeader.prototype.total = 0; + + /** + * PartSetHeader hash. + * @member {Uint8Array} hash + * @memberof tendermint.abci.types.PartSetHeader + * @instance + */ + PartSetHeader.prototype.hash = $util.newBuffer([]); + + /** + * Creates a new PartSetHeader instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.PartSetHeader + * @static + * @param {tendermint.abci.types.IPartSetHeader=} [properties] Properties to set + * @returns {tendermint.abci.types.PartSetHeader} PartSetHeader instance + */ + PartSetHeader.create = function create(properties) { + return new PartSetHeader(properties); + }; + + /** + * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.PartSetHeader + * @static + * @param {tendermint.abci.types.IPartSetHeader} message PartSetHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartSetHeader.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.total != null && Object.hasOwnProperty.call(message, "total")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.total); + if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash); + return writer; + }; + + /** + * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.PartSetHeader + * @static + * @param {tendermint.abci.types.IPartSetHeader} message PartSetHeader message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartSetHeader.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.PartSetHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.PartSetHeader} PartSetHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartSetHeader.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.PartSetHeader(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.total = reader.int32(); + break; + case 2: + message.hash = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.PartSetHeader + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.PartSetHeader} PartSetHeader + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartSetHeader.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartSetHeader message. + * @function verify + * @memberof tendermint.abci.types.PartSetHeader + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartSetHeader.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.total != null && message.hasOwnProperty("total")) + if (!$util.isInteger(message.total)) + return "total: integer expected"; + if (message.hash != null && message.hasOwnProperty("hash")) + if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) + return "hash: buffer expected"; + return null; + }; + + /** + * Creates a PartSetHeader message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.PartSetHeader + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.PartSetHeader} PartSetHeader + */ + PartSetHeader.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.PartSetHeader) + return object; + var message = new $root.tendermint.abci.types.PartSetHeader(); + if (object.total != null) + message.total = object.total | 0; + if (object.hash != null) + if (typeof object.hash === "string") + $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); + else if (object.hash.length) + message.hash = object.hash; + return message; + }; + + /** + * Creates a plain object from a PartSetHeader message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.PartSetHeader + * @static + * @param {tendermint.abci.types.PartSetHeader} message PartSetHeader + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartSetHeader.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.total = 0; + if (options.bytes === String) + object.hash = ""; + else { + object.hash = []; + if (options.bytes !== Array) + object.hash = $util.newBuffer(object.hash); + } + } + if (message.total != null && message.hasOwnProperty("total")) + object.total = message.total; + if (message.hash != null && message.hasOwnProperty("hash")) + object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; + return object; + }; + + /** + * Converts this PartSetHeader to JSON. + * @function toJSON + * @memberof tendermint.abci.types.PartSetHeader + * @instance + * @returns {Object.} JSON object + */ + PartSetHeader.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PartSetHeader; + })(); + + types.Validator = (function() { + + /** + * Properties of a Validator. + * @memberof tendermint.abci.types + * @interface IValidator + * @property {Uint8Array|null} [address] Validator address + * @property {number|Long|null} [power] Validator power + */ + + /** + * Constructs a new Validator. + * @memberof tendermint.abci.types + * @classdesc Represents a Validator. + * @implements IValidator + * @constructor + * @param {tendermint.abci.types.IValidator=} [properties] Properties to set + */ + function Validator(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Validator address. + * @member {Uint8Array} address + * @memberof tendermint.abci.types.Validator + * @instance + */ + Validator.prototype.address = $util.newBuffer([]); + + /** + * Validator power. + * @member {number|Long} power + * @memberof tendermint.abci.types.Validator + * @instance + */ + Validator.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Validator instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.Validator + * @static + * @param {tendermint.abci.types.IValidator=} [properties] Properties to set + * @returns {tendermint.abci.types.Validator} Validator instance + */ + Validator.create = function create(properties) { + return new Validator(properties); + }; + + /** + * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.Validator + * @static + * @param {tendermint.abci.types.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.power); + return writer; + }; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.Validator + * @static + * @param {tendermint.abci.types.IValidator} message Validator message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Validator.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Validator(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 3: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.Validator + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.Validator} Validator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Validator.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Validator message. + * @function verify + * @memberof tendermint.abci.types.Validator + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Validator.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + return null; + }; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.Validator + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.Validator} Validator + */ + Validator.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.Validator) + return object; + var message = new $root.tendermint.abci.types.Validator(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length) + message.address = object.address; + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.Validator + * @static + * @param {tendermint.abci.types.Validator} message Validator + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Validator.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + return object; + }; + + /** + * Converts this Validator to JSON. + * @function toJSON + * @memberof tendermint.abci.types.Validator + * @instance + * @returns {Object.} JSON object + */ + Validator.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Validator; + })(); + + types.ValidatorUpdate = (function() { + + /** + * Properties of a ValidatorUpdate. + * @memberof tendermint.abci.types + * @interface IValidatorUpdate + * @property {tendermint.abci.types.IPubKey|null} [pubKey] ValidatorUpdate pubKey + * @property {number|Long|null} [power] ValidatorUpdate power + */ + + /** + * Constructs a new ValidatorUpdate. + * @memberof tendermint.abci.types + * @classdesc Represents a ValidatorUpdate. + * @implements IValidatorUpdate + * @constructor + * @param {tendermint.abci.types.IValidatorUpdate=} [properties] Properties to set + */ + function ValidatorUpdate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValidatorUpdate pubKey. + * @member {tendermint.abci.types.IPubKey|null|undefined} pubKey + * @memberof tendermint.abci.types.ValidatorUpdate + * @instance + */ + ValidatorUpdate.prototype.pubKey = null; + + /** + * ValidatorUpdate power. + * @member {number|Long} power + * @memberof tendermint.abci.types.ValidatorUpdate + * @instance + */ + ValidatorUpdate.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValidatorUpdate instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.ValidatorUpdate + * @static + * @param {tendermint.abci.types.IValidatorUpdate=} [properties] Properties to set + * @returns {tendermint.abci.types.ValidatorUpdate} ValidatorUpdate instance + */ + ValidatorUpdate.create = function create(properties) { + return new ValidatorUpdate(properties); + }; + + /** + * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.ValidatorUpdate + * @static + * @param {tendermint.abci.types.IValidatorUpdate} message ValidatorUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorUpdate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) + $root.tendermint.abci.types.PubKey.encode(message.pubKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.power != null && Object.hasOwnProperty.call(message, "power")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.power); + return writer; + }; + + /** + * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.ValidatorUpdate + * @static + * @param {tendermint.abci.types.IValidatorUpdate} message ValidatorUpdate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValidatorUpdate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.ValidatorUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.ValidatorUpdate} ValidatorUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorUpdate.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ValidatorUpdate(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.pubKey = $root.tendermint.abci.types.PubKey.decode(reader, reader.uint32()); + break; + case 2: + message.power = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.ValidatorUpdate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.ValidatorUpdate} ValidatorUpdate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValidatorUpdate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValidatorUpdate message. + * @function verify + * @memberof tendermint.abci.types.ValidatorUpdate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValidatorUpdate.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.pubKey != null && message.hasOwnProperty("pubKey")) { + var error = $root.tendermint.abci.types.PubKey.verify(message.pubKey); + if (error) + return "pubKey." + error; + } + if (message.power != null && message.hasOwnProperty("power")) + if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) + return "power: integer|Long expected"; + return null; + }; + + /** + * Creates a ValidatorUpdate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.ValidatorUpdate + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.ValidatorUpdate} ValidatorUpdate + */ + ValidatorUpdate.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.ValidatorUpdate) + return object; + var message = new $root.tendermint.abci.types.ValidatorUpdate(); + if (object.pubKey != null) { + if (typeof object.pubKey !== "object") + throw TypeError(".tendermint.abci.types.ValidatorUpdate.pubKey: object expected"); + message.pubKey = $root.tendermint.abci.types.PubKey.fromObject(object.pubKey); + } + if (object.power != null) + if ($util.Long) + (message.power = $util.Long.fromValue(object.power)).unsigned = false; + else if (typeof object.power === "string") + message.power = parseInt(object.power, 10); + else if (typeof object.power === "number") + message.power = object.power; + else if (typeof object.power === "object") + message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValidatorUpdate message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.ValidatorUpdate + * @static + * @param {tendermint.abci.types.ValidatorUpdate} message ValidatorUpdate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValidatorUpdate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.pubKey = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.power = options.longs === String ? "0" : 0; + } + if (message.pubKey != null && message.hasOwnProperty("pubKey")) + object.pubKey = $root.tendermint.abci.types.PubKey.toObject(message.pubKey, options); + if (message.power != null && message.hasOwnProperty("power")) + if (typeof message.power === "number") + object.power = options.longs === String ? String(message.power) : message.power; + else + object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; + return object; + }; + + /** + * Converts this ValidatorUpdate to JSON. + * @function toJSON + * @memberof tendermint.abci.types.ValidatorUpdate + * @instance + * @returns {Object.} JSON object + */ + ValidatorUpdate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ValidatorUpdate; + })(); + + types.VoteInfo = (function() { + + /** + * Properties of a VoteInfo. + * @memberof tendermint.abci.types + * @interface IVoteInfo + * @property {tendermint.abci.types.IValidator|null} [validator] VoteInfo validator + * @property {boolean|null} [signedLastBlock] VoteInfo signedLastBlock + */ + + /** + * Constructs a new VoteInfo. + * @memberof tendermint.abci.types + * @classdesc Represents a VoteInfo. + * @implements IVoteInfo + * @constructor + * @param {tendermint.abci.types.IVoteInfo=} [properties] Properties to set + */ + function VoteInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * VoteInfo validator. + * @member {tendermint.abci.types.IValidator|null|undefined} validator + * @memberof tendermint.abci.types.VoteInfo + * @instance + */ + VoteInfo.prototype.validator = null; + + /** + * VoteInfo signedLastBlock. + * @member {boolean} signedLastBlock + * @memberof tendermint.abci.types.VoteInfo + * @instance + */ + VoteInfo.prototype.signedLastBlock = false; + + /** + * Creates a new VoteInfo instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.VoteInfo + * @static + * @param {tendermint.abci.types.IVoteInfo=} [properties] Properties to set + * @returns {tendermint.abci.types.VoteInfo} VoteInfo instance + */ + VoteInfo.create = function create(properties) { + return new VoteInfo(properties); + }; + + /** + * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.VoteInfo + * @static + * @param {tendermint.abci.types.IVoteInfo} message VoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoteInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.abci.types.Validator.encode(message.validator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.signedLastBlock != null && Object.hasOwnProperty.call(message, "signedLastBlock")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.signedLastBlock); + return writer; + }; + + /** + * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.VoteInfo + * @static + * @param {tendermint.abci.types.IVoteInfo} message VoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VoteInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VoteInfo message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.VoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.VoteInfo} VoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoteInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.VoteInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.validator = $root.tendermint.abci.types.Validator.decode(reader, reader.uint32()); + break; + case 2: + message.signedLastBlock = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VoteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.VoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.VoteInfo} VoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VoteInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VoteInfo message. + * @function verify + * @memberof tendermint.abci.types.VoteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VoteInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.abci.types.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) + if (typeof message.signedLastBlock !== "boolean") + return "signedLastBlock: boolean expected"; + return null; + }; + + /** + * Creates a VoteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.VoteInfo + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.VoteInfo} VoteInfo + */ + VoteInfo.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.VoteInfo) + return object; + var message = new $root.tendermint.abci.types.VoteInfo(); + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.types.VoteInfo.validator: object expected"); + message.validator = $root.tendermint.abci.types.Validator.fromObject(object.validator); + } + if (object.signedLastBlock != null) + message.signedLastBlock = Boolean(object.signedLastBlock); + return message; + }; + + /** + * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.VoteInfo + * @static + * @param {tendermint.abci.types.VoteInfo} message VoteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VoteInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.validator = null; + object.signedLastBlock = false; + } + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.abci.types.Validator.toObject(message.validator, options); + if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) + object.signedLastBlock = message.signedLastBlock; + return object; + }; + + /** + * Converts this VoteInfo to JSON. + * @function toJSON + * @memberof tendermint.abci.types.VoteInfo + * @instance + * @returns {Object.} JSON object + */ + VoteInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return VoteInfo; + })(); + + types.PubKey = (function() { + + /** + * Properties of a PubKey. + * @memberof tendermint.abci.types + * @interface IPubKey + * @property {string|null} [type] PubKey type + * @property {Uint8Array|null} [data] PubKey data + */ + + /** + * Constructs a new PubKey. + * @memberof tendermint.abci.types + * @classdesc Represents a PubKey. + * @implements IPubKey + * @constructor + * @param {tendermint.abci.types.IPubKey=} [properties] Properties to set + */ + function PubKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubKey type. + * @member {string} type + * @memberof tendermint.abci.types.PubKey + * @instance + */ + PubKey.prototype.type = ""; + + /** + * PubKey data. + * @member {Uint8Array} data + * @memberof tendermint.abci.types.PubKey + * @instance + */ + PubKey.prototype.data = $util.newBuffer([]); + + /** + * Creates a new PubKey instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.PubKey + * @static + * @param {tendermint.abci.types.IPubKey=} [properties] Properties to set + * @returns {tendermint.abci.types.PubKey} PubKey instance + */ + PubKey.create = function create(properties) { + return new PubKey(properties); + }; + + /** + * Encodes the specified PubKey message. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.PubKey + * @static + * @param {tendermint.abci.types.IPubKey} message PubKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified PubKey message, length delimited. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.PubKey + * @static + * @param {tendermint.abci.types.IPubKey} message PubKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubKey message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.PubKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.PubKey} PubKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubKey.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.PubKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PubKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.PubKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.PubKey} PubKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubKey message. + * @function verify + * @memberof tendermint.abci.types.PubKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubKey.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a PubKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.PubKey + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.PubKey} PubKey + */ + PubKey.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.PubKey) + return object; + var message = new $root.tendermint.abci.types.PubKey(); + if (object.type != null) + message.type = String(object.type); + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a PubKey message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.PubKey + * @static + * @param {tendermint.abci.types.PubKey} message PubKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this PubKey to JSON. + * @function toJSON + * @memberof tendermint.abci.types.PubKey + * @instance + * @returns {Object.} JSON object + */ + PubKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return PubKey; + })(); + + types.Evidence = (function() { + + /** + * Properties of an Evidence. + * @memberof tendermint.abci.types + * @interface IEvidence + * @property {string|null} [type] Evidence type + * @property {tendermint.abci.types.IValidator|null} [validator] Evidence validator + * @property {number|Long|null} [height] Evidence height + * @property {google.protobuf.ITimestamp|null} [time] Evidence time + * @property {number|Long|null} [totalVotingPower] Evidence totalVotingPower + */ + + /** + * Constructs a new Evidence. + * @memberof tendermint.abci.types + * @classdesc Represents an Evidence. + * @implements IEvidence + * @constructor + * @param {tendermint.abci.types.IEvidence=} [properties] Properties to set + */ + function Evidence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Evidence type. + * @member {string} type + * @memberof tendermint.abci.types.Evidence + * @instance + */ + Evidence.prototype.type = ""; + + /** + * Evidence validator. + * @member {tendermint.abci.types.IValidator|null|undefined} validator + * @memberof tendermint.abci.types.Evidence + * @instance + */ + Evidence.prototype.validator = null; + + /** + * Evidence height. + * @member {number|Long} height + * @memberof tendermint.abci.types.Evidence + * @instance + */ + Evidence.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Evidence time. + * @member {google.protobuf.ITimestamp|null|undefined} time + * @memberof tendermint.abci.types.Evidence + * @instance + */ + Evidence.prototype.time = null; + + /** + * Evidence totalVotingPower. + * @member {number|Long} totalVotingPower + * @memberof tendermint.abci.types.Evidence + * @instance + */ + Evidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Evidence instance using the specified properties. + * @function create + * @memberof tendermint.abci.types.Evidence + * @static + * @param {tendermint.abci.types.IEvidence=} [properties] Properties to set + * @returns {tendermint.abci.types.Evidence} Evidence instance + */ + Evidence.create = function create(properties) { + return new Evidence(properties); + }; + + /** + * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. + * @function encode + * @memberof tendermint.abci.types.Evidence + * @static + * @param {tendermint.abci.types.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) + $root.tendermint.abci.types.Validator.encode(message.validator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalVotingPower); + return writer; + }; + + /** + * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.abci.types.Evidence + * @static + * @param {tendermint.abci.types.IEvidence} message Evidence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Evidence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @function decode + * @memberof tendermint.abci.types.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.abci.types.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Evidence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.validator = $root.tendermint.abci.types.Validator.decode(reader, reader.uint32()); + break; + case 3: + message.height = reader.int64(); + break; + case 4: + message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + case 5: + message.totalVotingPower = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Evidence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.abci.types.Evidence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.abci.types.Evidence} Evidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Evidence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Evidence message. + * @function verify + * @memberof tendermint.abci.types.Evidence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Evidence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.validator != null && message.hasOwnProperty("validator")) { + var error = $root.tendermint.abci.types.Validator.verify(message.validator); + if (error) + return "validator." + error; + } + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) + return "height: integer|Long expected"; + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.protobuf.Timestamp.verify(message.time); + if (error) + return "time." + error; + } + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) + return "totalVotingPower: integer|Long expected"; + return null; + }; + + /** + * Creates an Evidence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.abci.types.Evidence + * @static + * @param {Object.} object Plain object + * @returns {tendermint.abci.types.Evidence} Evidence + */ + Evidence.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.abci.types.Evidence) + return object; + var message = new $root.tendermint.abci.types.Evidence(); + if (object.type != null) + message.type = String(object.type); + if (object.validator != null) { + if (typeof object.validator !== "object") + throw TypeError(".tendermint.abci.types.Evidence.validator: object expected"); + message.validator = $root.tendermint.abci.types.Validator.fromObject(object.validator); + } + if (object.height != null) + if ($util.Long) + (message.height = $util.Long.fromValue(object.height)).unsigned = false; + else if (typeof object.height === "string") + message.height = parseInt(object.height, 10); + else if (typeof object.height === "number") + message.height = object.height; + else if (typeof object.height === "object") + message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".tendermint.abci.types.Evidence.time: object expected"); + message.time = $root.google.protobuf.Timestamp.fromObject(object.time); + } + if (object.totalVotingPower != null) + if ($util.Long) + (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; + else if (typeof object.totalVotingPower === "string") + message.totalVotingPower = parseInt(object.totalVotingPower, 10); + else if (typeof object.totalVotingPower === "number") + message.totalVotingPower = object.totalVotingPower; + else if (typeof object.totalVotingPower === "object") + message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an Evidence message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.abci.types.Evidence + * @static + * @param {tendermint.abci.types.Evidence} message Evidence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Evidence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.validator = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.height = options.longs === String ? "0" : 0; + object.time = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalVotingPower = options.longs === String ? "0" : 0; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.validator != null && message.hasOwnProperty("validator")) + object.validator = $root.tendermint.abci.types.Validator.toObject(message.validator, options); + if (message.height != null && message.hasOwnProperty("height")) + if (typeof message.height === "number") + object.height = options.longs === String ? String(message.height) : message.height; + else + object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); + if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) + if (typeof message.totalVotingPower === "number") + object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; + else + object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; + return object; + }; + + /** + * Converts this Evidence to JSON. + * @function toJSON + * @memberof tendermint.abci.types.Evidence + * @instance + * @returns {Object.} JSON object + */ + Evidence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Evidence; + })(); + + types.ABCIApplication = (function() { + + /** + * Constructs a new ABCIApplication service. + * @memberof tendermint.abci.types + * @classdesc Represents a ABCIApplication + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function ABCIApplication(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ABCIApplication.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ABCIApplication; + + /** + * Creates new ABCIApplication service using the specified rpc implementation. + * @function create + * @memberof tendermint.abci.types.ABCIApplication + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {ABCIApplication} RPC service. Useful where requests and/or responses are streamed. + */ + ABCIApplication.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#echo}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef EchoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseEcho} [response] ResponseEcho + */ + + /** + * Calls Echo. + * @function echo + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestEcho} request RequestEcho message or plain object + * @param {tendermint.abci.types.ABCIApplication.EchoCallback} callback Node-style callback called with the error, if any, and ResponseEcho + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls Echo. + * @function echo + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestEcho} request RequestEcho message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#flush}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef FlushCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseFlush} [response] ResponseFlush + */ + + /** + * Calls Flush. + * @function flush + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestFlush} request RequestFlush message or plain object + * @param {tendermint.abci.types.ABCIApplication.FlushCallback} callback Node-style callback called with the error, if any, and ResponseFlush + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls Flush. + * @function flush + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestFlush} request RequestFlush message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#info}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef InfoCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseInfo} [response] ResponseInfo + */ + + /** + * Calls Info. + * @function info + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestInfo} request RequestInfo message or plain object + * @param {tendermint.abci.types.ABCIApplication.InfoCallback} callback Node-style callback called with the error, if any, and ResponseInfo + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls Info. + * @function info + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestInfo} request RequestInfo message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#setOption}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef SetOptionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseSetOption} [response] ResponseSetOption + */ + + /** + * Calls SetOption. + * @function setOption + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestSetOption} request RequestSetOption message or plain object + * @param {tendermint.abci.types.ABCIApplication.SetOptionCallback} callback Node-style callback called with the error, if any, and ResponseSetOption + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls SetOption. + * @function setOption + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestSetOption} request RequestSetOption message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#deliverTx}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef DeliverTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseDeliverTx} [response] ResponseDeliverTx + */ + + /** + * Calls DeliverTx. + * @function deliverTx + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestDeliverTx} request RequestDeliverTx message or plain object + * @param {tendermint.abci.types.ABCIApplication.DeliverTxCallback} callback Node-style callback called with the error, if any, and ResponseDeliverTx + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls DeliverTx. + * @function deliverTx + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestDeliverTx} request RequestDeliverTx message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#checkTx}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef CheckTxCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseCheckTx} [response] ResponseCheckTx + */ + + /** + * Calls CheckTx. + * @function checkTx + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestCheckTx} request RequestCheckTx message or plain object + * @param {tendermint.abci.types.ABCIApplication.CheckTxCallback} callback Node-style callback called with the error, if any, and ResponseCheckTx + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls CheckTx. + * @function checkTx + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestCheckTx} request RequestCheckTx message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#query}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef QueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseQuery} [response] ResponseQuery + */ + + /** + * Calls Query. + * @function query + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestQuery} request RequestQuery message or plain object + * @param {tendermint.abci.types.ABCIApplication.QueryCallback} callback Node-style callback called with the error, if any, and ResponseQuery + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls Query. + * @function query + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestQuery} request RequestQuery message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#commit}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef CommitCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseCommit} [response] ResponseCommit + */ + + /** + * Calls Commit. + * @function commit + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestCommit} request RequestCommit message or plain object + * @param {tendermint.abci.types.ABCIApplication.CommitCallback} callback Node-style callback called with the error, if any, and ResponseCommit + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls Commit. + * @function commit + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestCommit} request RequestCommit message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#initChain}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef InitChainCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseInitChain} [response] ResponseInitChain + */ + + /** + * Calls InitChain. + * @function initChain + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestInitChain} request RequestInitChain message or plain object + * @param {tendermint.abci.types.ABCIApplication.InitChainCallback} callback Node-style callback called with the error, if any, and ResponseInitChain + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls InitChain. + * @function initChain + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestInitChain} request RequestInitChain message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#beginBlock}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef BeginBlockCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseBeginBlock} [response] ResponseBeginBlock + */ + + /** + * Calls BeginBlock. + * @function beginBlock + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestBeginBlock} request RequestBeginBlock message or plain object + * @param {tendermint.abci.types.ABCIApplication.BeginBlockCallback} callback Node-style callback called with the error, if any, and ResponseBeginBlock + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls BeginBlock. + * @function beginBlock + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestBeginBlock} request RequestBeginBlock message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link tendermint.abci.types.ABCIApplication#endBlock}. + * @memberof tendermint.abci.types.ABCIApplication + * @typedef EndBlockCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {tendermint.abci.types.ResponseEndBlock} [response] ResponseEndBlock + */ + + /** + * Calls EndBlock. + * @function endBlock + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestEndBlock} request RequestEndBlock message or plain object + * @param {tendermint.abci.types.ABCIApplication.EndBlockCallback} callback Node-style callback called with the error, if any, and ResponseEndBlock + * @returns {undefined} + * @variation 1 + */ + 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" }); + + /** + * Calls EndBlock. + * @function endBlock + * @memberof tendermint.abci.types.ABCIApplication + * @instance + * @param {tendermint.abci.types.IRequestEndBlock} request RequestEndBlock message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ABCIApplication; + })(); + + return types; + })(); + + return abci; + })(); + + tendermint.crypto = (function() { + + /** + * Namespace crypto. + * @memberof tendermint + * @namespace + */ + var crypto = {}; + + crypto.merkle = (function() { + + /** + * Namespace merkle. + * @memberof tendermint.crypto + * @namespace + */ + var merkle = {}; + + merkle.ProofOp = (function() { + + /** + * Properties of a ProofOp. + * @memberof tendermint.crypto.merkle + * @interface IProofOp + * @property {string|null} [type] ProofOp type + * @property {Uint8Array|null} [key] ProofOp key + * @property {Uint8Array|null} [data] ProofOp data + */ + + /** + * Constructs a new ProofOp. + * @memberof tendermint.crypto.merkle + * @classdesc Represents a ProofOp. + * @implements IProofOp + * @constructor + * @param {tendermint.crypto.merkle.IProofOp=} [properties] Properties to set + */ + function ProofOp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProofOp type. + * @member {string} type + * @memberof tendermint.crypto.merkle.ProofOp + * @instance + */ + ProofOp.prototype.type = ""; + + /** + * ProofOp key. + * @member {Uint8Array} key + * @memberof tendermint.crypto.merkle.ProofOp + * @instance + */ + ProofOp.prototype.key = $util.newBuffer([]); + + /** + * ProofOp data. + * @member {Uint8Array} data + * @memberof tendermint.crypto.merkle.ProofOp + * @instance + */ + ProofOp.prototype.data = $util.newBuffer([]); + + /** + * Creates a new ProofOp instance using the specified properties. + * @function create + * @memberof tendermint.crypto.merkle.ProofOp + * @static + * @param {tendermint.crypto.merkle.IProofOp=} [properties] Properties to set + * @returns {tendermint.crypto.merkle.ProofOp} ProofOp instance + */ + ProofOp.create = function create(properties) { + return new ProofOp(properties); + }; + + /** + * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.merkle.ProofOp + * @static + * @param {tendermint.crypto.merkle.IProofOp} message ProofOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.merkle.ProofOp + * @static + * @param {tendermint.crypto.merkle.IProofOp} message ProofOp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProofOp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProofOp message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.merkle.ProofOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.merkle.ProofOp} ProofOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.merkle.ProofOp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type = reader.string(); + break; + case 2: + message.key = reader.bytes(); + break; + case 3: + message.data = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ProofOp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.merkle.ProofOp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.merkle.ProofOp} ProofOp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProofOp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProofOp message. + * @function verify + * @memberof tendermint.crypto.merkle.ProofOp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProofOp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a ProofOp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.merkle.ProofOp + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.merkle.ProofOp} ProofOp + */ + ProofOp.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.merkle.ProofOp) + return object; + var message = new $root.tendermint.crypto.merkle.ProofOp(); + if (object.type != null) + message.type = String(object.type); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a ProofOp message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.merkle.ProofOp + * @static + * @param {tendermint.crypto.merkle.ProofOp} message ProofOp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProofOp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this ProofOp to JSON. + * @function toJSON + * @memberof tendermint.crypto.merkle.ProofOp + * @instance + * @returns {Object.} JSON object + */ + ProofOp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ProofOp; + })(); + + merkle.Proof = (function() { + + /** + * Properties of a Proof. + * @memberof tendermint.crypto.merkle + * @interface IProof + * @property {Array.|null} [ops] Proof ops + */ + + /** + * Constructs a new Proof. + * @memberof tendermint.crypto.merkle + * @classdesc Represents a Proof. + * @implements IProof + * @constructor + * @param {tendermint.crypto.merkle.IProof=} [properties] Properties to set + */ + function Proof(properties) { + this.ops = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proof ops. + * @member {Array.} ops + * @memberof tendermint.crypto.merkle.Proof + * @instance + */ + Proof.prototype.ops = $util.emptyArray; + + /** + * Creates a new Proof instance using the specified properties. + * @function create + * @memberof tendermint.crypto.merkle.Proof + * @static + * @param {tendermint.crypto.merkle.IProof=} [properties] Properties to set + * @returns {tendermint.crypto.merkle.Proof} Proof instance + */ + Proof.create = function create(properties) { + return new Proof(properties); + }; + + /** + * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. + * @function encode + * @memberof tendermint.crypto.merkle.Proof + * @static + * @param {tendermint.crypto.merkle.IProof} message Proof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proof.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ops != null && message.ops.length) + for (var i = 0; i < message.ops.length; ++i) + $root.tendermint.crypto.merkle.ProofOp.encode(message.ops[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.crypto.merkle.Proof + * @static + * @param {tendermint.crypto.merkle.IProof} message Proof message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proof.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proof message from the specified reader or buffer. + * @function decode + * @memberof tendermint.crypto.merkle.Proof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.crypto.merkle.Proof} Proof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proof.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.merkle.Proof(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.ops && message.ops.length)) + message.ops = []; + message.ops.push($root.tendermint.crypto.merkle.ProofOp.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Proof message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.crypto.merkle.Proof + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.crypto.merkle.Proof} Proof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proof.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proof message. + * @function verify + * @memberof tendermint.crypto.merkle.Proof + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proof.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ops != null && message.hasOwnProperty("ops")) { + if (!Array.isArray(message.ops)) + return "ops: array expected"; + for (var i = 0; i < message.ops.length; ++i) { + var error = $root.tendermint.crypto.merkle.ProofOp.verify(message.ops[i]); + if (error) + return "ops." + error; + } + } + return null; + }; + + /** + * Creates a Proof message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.crypto.merkle.Proof + * @static + * @param {Object.} object Plain object + * @returns {tendermint.crypto.merkle.Proof} Proof + */ + Proof.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.crypto.merkle.Proof) + return object; + var message = new $root.tendermint.crypto.merkle.Proof(); + if (object.ops) { + if (!Array.isArray(object.ops)) + throw TypeError(".tendermint.crypto.merkle.Proof.ops: array expected"); + message.ops = []; + for (var i = 0; i < object.ops.length; ++i) { + if (typeof object.ops[i] !== "object") + throw TypeError(".tendermint.crypto.merkle.Proof.ops: object expected"); + message.ops[i] = $root.tendermint.crypto.merkle.ProofOp.fromObject(object.ops[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Proof message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.crypto.merkle.Proof + * @static + * @param {tendermint.crypto.merkle.Proof} message Proof + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proof.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.ops = []; + if (message.ops && message.ops.length) { + object.ops = []; + for (var j = 0; j < message.ops.length; ++j) + object.ops[j] = $root.tendermint.crypto.merkle.ProofOp.toObject(message.ops[j], options); + } + return object; + }; + + /** + * Converts this Proof to JSON. + * @function toJSON + * @memberof tendermint.crypto.merkle.Proof + * @instance + * @returns {Object.} JSON object + */ + Proof.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Proof; + })(); + + return merkle; + })(); + + return crypto; + })(); + + tendermint.libs = (function() { + + /** + * Namespace libs. + * @memberof tendermint + * @namespace + */ + var libs = {}; + + libs.kv = (function() { + + /** + * Namespace kv. + * @memberof tendermint.libs + * @namespace + */ + var kv = {}; + + kv.Pair = (function() { + + /** + * Properties of a Pair. + * @memberof tendermint.libs.kv + * @interface IPair + * @property {Uint8Array|null} [key] Pair key + * @property {Uint8Array|null} [value] Pair value + */ + + /** + * Constructs a new Pair. + * @memberof tendermint.libs.kv + * @classdesc Represents a Pair. + * @implements IPair + * @constructor + * @param {tendermint.libs.kv.IPair=} [properties] Properties to set + */ + function Pair(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Pair key. + * @member {Uint8Array} key + * @memberof tendermint.libs.kv.Pair + * @instance + */ + Pair.prototype.key = $util.newBuffer([]); + + /** + * Pair value. + * @member {Uint8Array} value + * @memberof tendermint.libs.kv.Pair + * @instance + */ + Pair.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Pair instance using the specified properties. + * @function create + * @memberof tendermint.libs.kv.Pair + * @static + * @param {tendermint.libs.kv.IPair=} [properties] Properties to set + * @returns {tendermint.libs.kv.Pair} Pair instance + */ + Pair.create = function create(properties) { + return new Pair(properties); + }; + + /** + * Encodes the specified Pair message. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. + * @function encode + * @memberof tendermint.libs.kv.Pair + * @static + * @param {tendermint.libs.kv.IPair} message Pair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pair.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.libs.kv.Pair + * @static + * @param {tendermint.libs.kv.IPair} message Pair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Pair.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Pair message from the specified reader or buffer. + * @function decode + * @memberof tendermint.libs.kv.Pair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.libs.kv.Pair} Pair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pair.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.libs.kv.Pair(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Pair message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.libs.kv.Pair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.libs.kv.Pair} Pair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Pair.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Pair message. + * @function verify + * @memberof tendermint.libs.kv.Pair + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Pair.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates a Pair message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.libs.kv.Pair + * @static + * @param {Object.} object Plain object + * @returns {tendermint.libs.kv.Pair} Pair + */ + Pair.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.libs.kv.Pair) + return object; + var message = new $root.tendermint.libs.kv.Pair(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a Pair message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.libs.kv.Pair + * @static + * @param {tendermint.libs.kv.Pair} message Pair + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Pair.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Pair to JSON. + * @function toJSON + * @memberof tendermint.libs.kv.Pair + * @instance + * @returns {Object.} JSON object + */ + Pair.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Pair; + })(); + + kv.KI64Pair = (function() { + + /** + * Properties of a KI64Pair. + * @memberof tendermint.libs.kv + * @interface IKI64Pair + * @property {Uint8Array|null} [key] KI64Pair key + * @property {number|Long|null} [value] KI64Pair value + */ + + /** + * Constructs a new KI64Pair. + * @memberof tendermint.libs.kv + * @classdesc Represents a KI64Pair. + * @implements IKI64Pair + * @constructor + * @param {tendermint.libs.kv.IKI64Pair=} [properties] Properties to set + */ + function KI64Pair(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * KI64Pair key. + * @member {Uint8Array} key + * @memberof tendermint.libs.kv.KI64Pair + * @instance + */ + KI64Pair.prototype.key = $util.newBuffer([]); + + /** + * KI64Pair value. + * @member {number|Long} value + * @memberof tendermint.libs.kv.KI64Pair + * @instance + */ + KI64Pair.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new KI64Pair instance using the specified properties. + * @function create + * @memberof tendermint.libs.kv.KI64Pair + * @static + * @param {tendermint.libs.kv.IKI64Pair=} [properties] Properties to set + * @returns {tendermint.libs.kv.KI64Pair} KI64Pair instance + */ + KI64Pair.create = function create(properties) { + return new KI64Pair(properties); + }; + + /** + * Encodes the specified KI64Pair message. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. + * @function encode + * @memberof tendermint.libs.kv.KI64Pair + * @static + * @param {tendermint.libs.kv.IKI64Pair} message KI64Pair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KI64Pair.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.value); + return writer; + }; + + /** + * Encodes the specified KI64Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. + * @function encodeDelimited + * @memberof tendermint.libs.kv.KI64Pair + * @static + * @param {tendermint.libs.kv.IKI64Pair} message KI64Pair message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KI64Pair.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KI64Pair message from the specified reader or buffer. + * @function decode + * @memberof tendermint.libs.kv.KI64Pair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {tendermint.libs.kv.KI64Pair} KI64Pair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KI64Pair.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.libs.kv.KI64Pair(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.key = reader.bytes(); + break; + case 2: + message.value = reader.int64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a KI64Pair message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof tendermint.libs.kv.KI64Pair + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {tendermint.libs.kv.KI64Pair} KI64Pair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KI64Pair.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KI64Pair message. + * @function verify + * @memberof tendermint.libs.kv.KI64Pair + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KI64Pair.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) + return "value: integer|Long expected"; + return null; + }; + + /** + * Creates a KI64Pair message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof tendermint.libs.kv.KI64Pair + * @static + * @param {Object.} object Plain object + * @returns {tendermint.libs.kv.KI64Pair} KI64Pair + */ + KI64Pair.fromObject = function fromObject(object) { + if (object instanceof $root.tendermint.libs.kv.KI64Pair) + return object; + var message = new $root.tendermint.libs.kv.KI64Pair(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length) + message.key = object.key; + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a KI64Pair message. Also converts values to other types if specified. + * @function toObject + * @memberof tendermint.libs.kv.KI64Pair + * @static + * @param {tendermint.libs.kv.KI64Pair} message KI64Pair + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KI64Pair.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; + + /** + * Converts this KI64Pair to JSON. + * @function toJSON + * @memberof tendermint.libs.kv.KI64Pair + * @instance + * @returns {Object.} JSON object + */ + KI64Pair.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return KI64Pair; + })(); + + return kv; + })(); + + return libs; + })(); + + return tendermint; +})(); + +$root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.type_url = reader.string(); + break; + case 2: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Any; + })(); + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message["package"] = reader.string(); + break; + case 3: + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + case 10: + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + case 11: + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + case 4: + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 8: + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + case 9: + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + case 12: + message.syntax = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 6: + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + case 4: + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + case 5: + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + case 8: + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + case 7: + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + case 9: + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + case 10: + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.start = reader.int32(); + break; + case 2: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 3: + message.number = reader.int32(); + break; + case 4: + message.label = reader.int32(); + break; + case 5: + message.type = reader.int32(); + break; + case 6: + message.typeName = reader.string(); + break; + case 2: + message.extendee = reader.string(); + break; + case 7: + message.defaultValue = reader.string(); + break; + case 9: + message.oneofIndex = reader.int32(); + break; + case 10: + message.jsonName = reader.string(); + break; + case 8: + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.value = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.number = reader.int32(); + break; + case 3: + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + case 3: + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.inputType = reader.string(); + break; + case 3: + message.outputType = reader.string(); + break; + case 4: + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + case 5: + message.clientStreaming = reader.bool(); + break; + case 6: + message.serverStreaming = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {boolean|null} [".gogoproto.goprotoGettersAll"] FileOptions .gogoproto.goprotoGettersAll + * @property {boolean|null} [".gogoproto.goprotoEnumPrefixAll"] FileOptions .gogoproto.goprotoEnumPrefixAll + * @property {boolean|null} [".gogoproto.goprotoStringerAll"] FileOptions .gogoproto.goprotoStringerAll + * @property {boolean|null} [".gogoproto.verboseEqualAll"] FileOptions .gogoproto.verboseEqualAll + * @property {boolean|null} [".gogoproto.faceAll"] FileOptions .gogoproto.faceAll + * @property {boolean|null} [".gogoproto.gostringAll"] FileOptions .gogoproto.gostringAll + * @property {boolean|null} [".gogoproto.populateAll"] FileOptions .gogoproto.populateAll + * @property {boolean|null} [".gogoproto.stringerAll"] FileOptions .gogoproto.stringerAll + * @property {boolean|null} [".gogoproto.onlyoneAll"] FileOptions .gogoproto.onlyoneAll + * @property {boolean|null} [".gogoproto.equalAll"] FileOptions .gogoproto.equalAll + * @property {boolean|null} [".gogoproto.descriptionAll"] FileOptions .gogoproto.descriptionAll + * @property {boolean|null} [".gogoproto.testgenAll"] FileOptions .gogoproto.testgenAll + * @property {boolean|null} [".gogoproto.benchgenAll"] FileOptions .gogoproto.benchgenAll + * @property {boolean|null} [".gogoproto.marshalerAll"] FileOptions .gogoproto.marshalerAll + * @property {boolean|null} [".gogoproto.unmarshalerAll"] FileOptions .gogoproto.unmarshalerAll + * @property {boolean|null} [".gogoproto.stableMarshalerAll"] FileOptions .gogoproto.stableMarshalerAll + * @property {boolean|null} [".gogoproto.sizerAll"] FileOptions .gogoproto.sizerAll + * @property {boolean|null} [".gogoproto.goprotoEnumStringerAll"] FileOptions .gogoproto.goprotoEnumStringerAll + * @property {boolean|null} [".gogoproto.enumStringerAll"] FileOptions .gogoproto.enumStringerAll + * @property {boolean|null} [".gogoproto.unsafeMarshalerAll"] FileOptions .gogoproto.unsafeMarshalerAll + * @property {boolean|null} [".gogoproto.unsafeUnmarshalerAll"] FileOptions .gogoproto.unsafeUnmarshalerAll + * @property {boolean|null} [".gogoproto.goprotoExtensionsMapAll"] FileOptions .gogoproto.goprotoExtensionsMapAll + * @property {boolean|null} [".gogoproto.goprotoUnrecognizedAll"] FileOptions .gogoproto.goprotoUnrecognizedAll + * @property {boolean|null} [".gogoproto.gogoprotoImport"] FileOptions .gogoproto.gogoprotoImport + * @property {boolean|null} [".gogoproto.protosizerAll"] FileOptions .gogoproto.protosizerAll + * @property {boolean|null} [".gogoproto.compareAll"] FileOptions .gogoproto.compareAll + * @property {boolean|null} [".gogoproto.typedeclAll"] FileOptions .gogoproto.typedeclAll + * @property {boolean|null} [".gogoproto.enumdeclAll"] FileOptions .gogoproto.enumdeclAll + * @property {boolean|null} [".gogoproto.goprotoRegistration"] FileOptions .gogoproto.goprotoRegistration + * @property {boolean|null} [".gogoproto.messagenameAll"] FileOptions .gogoproto.messagenameAll + * @property {boolean|null} [".gogoproto.goprotoSizecacheAll"] FileOptions .gogoproto.goprotoSizecacheAll + * @property {boolean|null} [".gogoproto.goprotoUnkeyedAll"] FileOptions .gogoproto.goprotoUnkeyedAll + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = false; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .gogoproto.goprotoGettersAll. + * @member {boolean} .gogoproto.goprotoGettersAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.goprotoGettersAll"] = false; + + /** + * FileOptions .gogoproto.goprotoEnumPrefixAll. + * @member {boolean} .gogoproto.goprotoEnumPrefixAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.goprotoEnumPrefixAll"] = false; + + /** + * FileOptions .gogoproto.goprotoStringerAll. + * @member {boolean} .gogoproto.goprotoStringerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.goprotoStringerAll"] = false; + + /** + * FileOptions .gogoproto.verboseEqualAll. + * @member {boolean} .gogoproto.verboseEqualAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.verboseEqualAll"] = false; + + /** + * FileOptions .gogoproto.faceAll. + * @member {boolean} .gogoproto.faceAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.faceAll"] = false; + + /** + * FileOptions .gogoproto.gostringAll. + * @member {boolean} .gogoproto.gostringAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.gostringAll"] = false; + + /** + * FileOptions .gogoproto.populateAll. + * @member {boolean} .gogoproto.populateAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.populateAll"] = false; + + /** + * FileOptions .gogoproto.stringerAll. + * @member {boolean} .gogoproto.stringerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.stringerAll"] = false; + + /** + * FileOptions .gogoproto.onlyoneAll. + * @member {boolean} .gogoproto.onlyoneAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.onlyoneAll"] = false; + + /** + * FileOptions .gogoproto.equalAll. + * @member {boolean} .gogoproto.equalAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.equalAll"] = false; + + /** + * FileOptions .gogoproto.descriptionAll. + * @member {boolean} .gogoproto.descriptionAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.descriptionAll"] = false; + + /** + * FileOptions .gogoproto.testgenAll. + * @member {boolean} .gogoproto.testgenAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.testgenAll"] = false; + + /** + * FileOptions .gogoproto.benchgenAll. + * @member {boolean} .gogoproto.benchgenAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.benchgenAll"] = false; + + /** + * FileOptions .gogoproto.marshalerAll. + * @member {boolean} .gogoproto.marshalerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.marshalerAll"] = false; + + /** + * FileOptions .gogoproto.unmarshalerAll. + * @member {boolean} .gogoproto.unmarshalerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.unmarshalerAll"] = false; + + /** + * FileOptions .gogoproto.stableMarshalerAll. + * @member {boolean} .gogoproto.stableMarshalerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.stableMarshalerAll"] = false; + + /** + * FileOptions .gogoproto.sizerAll. + * @member {boolean} .gogoproto.sizerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.sizerAll"] = false; + + /** + * FileOptions .gogoproto.goprotoEnumStringerAll. + * @member {boolean} .gogoproto.goprotoEnumStringerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.goprotoEnumStringerAll"] = false; + + /** + * FileOptions .gogoproto.enumStringerAll. + * @member {boolean} .gogoproto.enumStringerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.enumStringerAll"] = false; + + /** + * FileOptions .gogoproto.unsafeMarshalerAll. + * @member {boolean} .gogoproto.unsafeMarshalerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.unsafeMarshalerAll"] = false; + + /** + * FileOptions .gogoproto.unsafeUnmarshalerAll. + * @member {boolean} .gogoproto.unsafeUnmarshalerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.unsafeUnmarshalerAll"] = false; + + /** + * FileOptions .gogoproto.goprotoExtensionsMapAll. + * @member {boolean} .gogoproto.goprotoExtensionsMapAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.goprotoExtensionsMapAll"] = false; + + /** + * FileOptions .gogoproto.goprotoUnrecognizedAll. + * @member {boolean} .gogoproto.goprotoUnrecognizedAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.goprotoUnrecognizedAll"] = false; + + /** + * FileOptions .gogoproto.gogoprotoImport. + * @member {boolean} .gogoproto.gogoprotoImport + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.gogoprotoImport"] = false; + + /** + * FileOptions .gogoproto.protosizerAll. + * @member {boolean} .gogoproto.protosizerAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.protosizerAll"] = false; + + /** + * FileOptions .gogoproto.compareAll. + * @member {boolean} .gogoproto.compareAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.compareAll"] = false; + + /** + * FileOptions .gogoproto.typedeclAll. + * @member {boolean} .gogoproto.typedeclAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.typedeclAll"] = false; + + /** + * FileOptions .gogoproto.enumdeclAll. + * @member {boolean} .gogoproto.enumdeclAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.enumdeclAll"] = false; + + /** + * FileOptions .gogoproto.goprotoRegistration. + * @member {boolean} .gogoproto.goprotoRegistration + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.goprotoRegistration"] = false; + + /** + * FileOptions .gogoproto.messagenameAll. + * @member {boolean} .gogoproto.messagenameAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.messagenameAll"] = false; + + /** + * FileOptions .gogoproto.goprotoSizecacheAll. + * @member {boolean} .gogoproto.goprotoSizecacheAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.goprotoSizecacheAll"] = false; + + /** + * FileOptions .gogoproto.goprotoUnkeyedAll. + * @member {boolean} .gogoproto.goprotoUnkeyedAll + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".gogoproto.goprotoUnkeyedAll"] = false; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".gogoproto.goprotoGettersAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoGettersAll")) + writer.uint32(/* id 63001, wireType 0 =*/504008).bool(message[".gogoproto.goprotoGettersAll"]); + if (message[".gogoproto.goprotoEnumPrefixAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoEnumPrefixAll")) + writer.uint32(/* id 63002, wireType 0 =*/504016).bool(message[".gogoproto.goprotoEnumPrefixAll"]); + if (message[".gogoproto.goprotoStringerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoStringerAll")) + writer.uint32(/* id 63003, wireType 0 =*/504024).bool(message[".gogoproto.goprotoStringerAll"]); + if (message[".gogoproto.verboseEqualAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verboseEqualAll")) + writer.uint32(/* id 63004, wireType 0 =*/504032).bool(message[".gogoproto.verboseEqualAll"]); + if (message[".gogoproto.faceAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.faceAll")) + writer.uint32(/* id 63005, wireType 0 =*/504040).bool(message[".gogoproto.faceAll"]); + if (message[".gogoproto.gostringAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostringAll")) + writer.uint32(/* id 63006, wireType 0 =*/504048).bool(message[".gogoproto.gostringAll"]); + if (message[".gogoproto.populateAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populateAll")) + writer.uint32(/* id 63007, wireType 0 =*/504056).bool(message[".gogoproto.populateAll"]); + if (message[".gogoproto.stringerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringerAll")) + writer.uint32(/* id 63008, wireType 0 =*/504064).bool(message[".gogoproto.stringerAll"]); + if (message[".gogoproto.onlyoneAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyoneAll")) + writer.uint32(/* id 63009, wireType 0 =*/504072).bool(message[".gogoproto.onlyoneAll"]); + if (message[".gogoproto.equalAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equalAll")) + writer.uint32(/* id 63013, wireType 0 =*/504104).bool(message[".gogoproto.equalAll"]); + if (message[".gogoproto.descriptionAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.descriptionAll")) + writer.uint32(/* id 63014, wireType 0 =*/504112).bool(message[".gogoproto.descriptionAll"]); + if (message[".gogoproto.testgenAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgenAll")) + writer.uint32(/* id 63015, wireType 0 =*/504120).bool(message[".gogoproto.testgenAll"]); + if (message[".gogoproto.benchgenAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgenAll")) + writer.uint32(/* id 63016, wireType 0 =*/504128).bool(message[".gogoproto.benchgenAll"]); + if (message[".gogoproto.marshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshalerAll")) + writer.uint32(/* id 63017, wireType 0 =*/504136).bool(message[".gogoproto.marshalerAll"]); + if (message[".gogoproto.unmarshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshalerAll")) + writer.uint32(/* id 63018, wireType 0 =*/504144).bool(message[".gogoproto.unmarshalerAll"]); + if (message[".gogoproto.stableMarshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stableMarshalerAll")) + writer.uint32(/* id 63019, wireType 0 =*/504152).bool(message[".gogoproto.stableMarshalerAll"]); + if (message[".gogoproto.sizerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizerAll")) + writer.uint32(/* id 63020, wireType 0 =*/504160).bool(message[".gogoproto.sizerAll"]); + if (message[".gogoproto.goprotoEnumStringerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoEnumStringerAll")) + writer.uint32(/* id 63021, wireType 0 =*/504168).bool(message[".gogoproto.goprotoEnumStringerAll"]); + if (message[".gogoproto.enumStringerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumStringerAll")) + writer.uint32(/* id 63022, wireType 0 =*/504176).bool(message[".gogoproto.enumStringerAll"]); + if (message[".gogoproto.unsafeMarshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafeMarshalerAll")) + writer.uint32(/* id 63023, wireType 0 =*/504184).bool(message[".gogoproto.unsafeMarshalerAll"]); + if (message[".gogoproto.unsafeUnmarshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafeUnmarshalerAll")) + writer.uint32(/* id 63024, wireType 0 =*/504192).bool(message[".gogoproto.unsafeUnmarshalerAll"]); + if (message[".gogoproto.goprotoExtensionsMapAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoExtensionsMapAll")) + writer.uint32(/* id 63025, wireType 0 =*/504200).bool(message[".gogoproto.goprotoExtensionsMapAll"]); + if (message[".gogoproto.goprotoUnrecognizedAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoUnrecognizedAll")) + writer.uint32(/* id 63026, wireType 0 =*/504208).bool(message[".gogoproto.goprotoUnrecognizedAll"]); + if (message[".gogoproto.gogoprotoImport"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gogoprotoImport")) + writer.uint32(/* id 63027, wireType 0 =*/504216).bool(message[".gogoproto.gogoprotoImport"]); + if (message[".gogoproto.protosizerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizerAll")) + writer.uint32(/* id 63028, wireType 0 =*/504224).bool(message[".gogoproto.protosizerAll"]); + if (message[".gogoproto.compareAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compareAll")) + writer.uint32(/* id 63029, wireType 0 =*/504232).bool(message[".gogoproto.compareAll"]); + if (message[".gogoproto.typedeclAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedeclAll")) + writer.uint32(/* id 63030, wireType 0 =*/504240).bool(message[".gogoproto.typedeclAll"]); + if (message[".gogoproto.enumdeclAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdeclAll")) + writer.uint32(/* id 63031, wireType 0 =*/504248).bool(message[".gogoproto.enumdeclAll"]); + if (message[".gogoproto.goprotoRegistration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoRegistration")) + writer.uint32(/* id 63032, wireType 0 =*/504256).bool(message[".gogoproto.goprotoRegistration"]); + if (message[".gogoproto.messagenameAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagenameAll")) + writer.uint32(/* id 63033, wireType 0 =*/504264).bool(message[".gogoproto.messagenameAll"]); + if (message[".gogoproto.goprotoSizecacheAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoSizecacheAll")) + writer.uint32(/* id 63034, wireType 0 =*/504272).bool(message[".gogoproto.goprotoSizecacheAll"]); + if (message[".gogoproto.goprotoUnkeyedAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoUnkeyedAll")) + writer.uint32(/* id 63035, wireType 0 =*/504280).bool(message[".gogoproto.goprotoUnkeyedAll"]); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.javaPackage = reader.string(); + break; + case 8: + message.javaOuterClassname = reader.string(); + break; + case 10: + message.javaMultipleFiles = reader.bool(); + break; + case 20: + message.javaGenerateEqualsAndHash = reader.bool(); + break; + case 27: + message.javaStringCheckUtf8 = reader.bool(); + break; + case 9: + message.optimizeFor = reader.int32(); + break; + case 11: + message.goPackage = reader.string(); + break; + case 16: + message.ccGenericServices = reader.bool(); + break; + case 17: + message.javaGenericServices = reader.bool(); + break; + case 18: + message.pyGenericServices = reader.bool(); + break; + case 23: + message.deprecated = reader.bool(); + break; + case 31: + message.ccEnableArenas = reader.bool(); + break; + case 36: + message.objcClassPrefix = reader.string(); + break; + case 37: + message.csharpNamespace = reader.string(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 63001: + message[".gogoproto.goprotoGettersAll"] = reader.bool(); + break; + case 63002: + message[".gogoproto.goprotoEnumPrefixAll"] = reader.bool(); + break; + case 63003: + message[".gogoproto.goprotoStringerAll"] = reader.bool(); + break; + case 63004: + message[".gogoproto.verboseEqualAll"] = reader.bool(); + break; + case 63005: + message[".gogoproto.faceAll"] = reader.bool(); + break; + case 63006: + message[".gogoproto.gostringAll"] = reader.bool(); + break; + case 63007: + message[".gogoproto.populateAll"] = reader.bool(); + break; + case 63008: + message[".gogoproto.stringerAll"] = reader.bool(); + break; + case 63009: + message[".gogoproto.onlyoneAll"] = reader.bool(); + break; + case 63013: + message[".gogoproto.equalAll"] = reader.bool(); + break; + case 63014: + message[".gogoproto.descriptionAll"] = reader.bool(); + break; + case 63015: + message[".gogoproto.testgenAll"] = reader.bool(); + break; + case 63016: + message[".gogoproto.benchgenAll"] = reader.bool(); + break; + case 63017: + message[".gogoproto.marshalerAll"] = reader.bool(); + break; + case 63018: + message[".gogoproto.unmarshalerAll"] = reader.bool(); + break; + case 63019: + message[".gogoproto.stableMarshalerAll"] = reader.bool(); + break; + case 63020: + message[".gogoproto.sizerAll"] = reader.bool(); + break; + case 63021: + message[".gogoproto.goprotoEnumStringerAll"] = reader.bool(); + break; + case 63022: + message[".gogoproto.enumStringerAll"] = reader.bool(); + break; + case 63023: + message[".gogoproto.unsafeMarshalerAll"] = reader.bool(); + break; + case 63024: + message[".gogoproto.unsafeUnmarshalerAll"] = reader.bool(); + break; + case 63025: + message[".gogoproto.goprotoExtensionsMapAll"] = reader.bool(); + break; + case 63026: + message[".gogoproto.goprotoUnrecognizedAll"] = reader.bool(); + break; + case 63027: + message[".gogoproto.gogoprotoImport"] = reader.bool(); + break; + case 63028: + message[".gogoproto.protosizerAll"] = reader.bool(); + break; + case 63029: + message[".gogoproto.compareAll"] = reader.bool(); + break; + case 63030: + message[".gogoproto.typedeclAll"] = reader.bool(); + break; + case 63031: + message[".gogoproto.enumdeclAll"] = reader.bool(); + break; + case 63032: + message[".gogoproto.goprotoRegistration"] = reader.bool(); + break; + case 63033: + message[".gogoproto.messagenameAll"] = reader.bool(); + break; + case 63034: + message[".gogoproto.goprotoSizecacheAll"] = reader.bool(); + break; + case 63035: + message[".gogoproto.goprotoUnkeyedAll"] = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".gogoproto.goprotoGettersAll"] != null && message.hasOwnProperty(".gogoproto.goprotoGettersAll")) + if (typeof message[".gogoproto.goprotoGettersAll"] !== "boolean") + return ".gogoproto.goprotoGettersAll: boolean expected"; + if (message[".gogoproto.goprotoEnumPrefixAll"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumPrefixAll")) + if (typeof message[".gogoproto.goprotoEnumPrefixAll"] !== "boolean") + return ".gogoproto.goprotoEnumPrefixAll: boolean expected"; + if (message[".gogoproto.goprotoStringerAll"] != null && message.hasOwnProperty(".gogoproto.goprotoStringerAll")) + if (typeof message[".gogoproto.goprotoStringerAll"] !== "boolean") + return ".gogoproto.goprotoStringerAll: boolean expected"; + if (message[".gogoproto.verboseEqualAll"] != null && message.hasOwnProperty(".gogoproto.verboseEqualAll")) + if (typeof message[".gogoproto.verboseEqualAll"] !== "boolean") + return ".gogoproto.verboseEqualAll: boolean expected"; + if (message[".gogoproto.faceAll"] != null && message.hasOwnProperty(".gogoproto.faceAll")) + if (typeof message[".gogoproto.faceAll"] !== "boolean") + return ".gogoproto.faceAll: boolean expected"; + if (message[".gogoproto.gostringAll"] != null && message.hasOwnProperty(".gogoproto.gostringAll")) + if (typeof message[".gogoproto.gostringAll"] !== "boolean") + return ".gogoproto.gostringAll: boolean expected"; + if (message[".gogoproto.populateAll"] != null && message.hasOwnProperty(".gogoproto.populateAll")) + if (typeof message[".gogoproto.populateAll"] !== "boolean") + return ".gogoproto.populateAll: boolean expected"; + if (message[".gogoproto.stringerAll"] != null && message.hasOwnProperty(".gogoproto.stringerAll")) + if (typeof message[".gogoproto.stringerAll"] !== "boolean") + return ".gogoproto.stringerAll: boolean expected"; + if (message[".gogoproto.onlyoneAll"] != null && message.hasOwnProperty(".gogoproto.onlyoneAll")) + if (typeof message[".gogoproto.onlyoneAll"] !== "boolean") + return ".gogoproto.onlyoneAll: boolean expected"; + if (message[".gogoproto.equalAll"] != null && message.hasOwnProperty(".gogoproto.equalAll")) + if (typeof message[".gogoproto.equalAll"] !== "boolean") + return ".gogoproto.equalAll: boolean expected"; + if (message[".gogoproto.descriptionAll"] != null && message.hasOwnProperty(".gogoproto.descriptionAll")) + if (typeof message[".gogoproto.descriptionAll"] !== "boolean") + return ".gogoproto.descriptionAll: boolean expected"; + if (message[".gogoproto.testgenAll"] != null && message.hasOwnProperty(".gogoproto.testgenAll")) + if (typeof message[".gogoproto.testgenAll"] !== "boolean") + return ".gogoproto.testgenAll: boolean expected"; + if (message[".gogoproto.benchgenAll"] != null && message.hasOwnProperty(".gogoproto.benchgenAll")) + if (typeof message[".gogoproto.benchgenAll"] !== "boolean") + return ".gogoproto.benchgenAll: boolean expected"; + if (message[".gogoproto.marshalerAll"] != null && message.hasOwnProperty(".gogoproto.marshalerAll")) + if (typeof message[".gogoproto.marshalerAll"] !== "boolean") + return ".gogoproto.marshalerAll: boolean expected"; + if (message[".gogoproto.unmarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unmarshalerAll")) + if (typeof message[".gogoproto.unmarshalerAll"] !== "boolean") + return ".gogoproto.unmarshalerAll: boolean expected"; + if (message[".gogoproto.stableMarshalerAll"] != null && message.hasOwnProperty(".gogoproto.stableMarshalerAll")) + if (typeof message[".gogoproto.stableMarshalerAll"] !== "boolean") + return ".gogoproto.stableMarshalerAll: boolean expected"; + if (message[".gogoproto.sizerAll"] != null && message.hasOwnProperty(".gogoproto.sizerAll")) + if (typeof message[".gogoproto.sizerAll"] !== "boolean") + return ".gogoproto.sizerAll: boolean expected"; + if (message[".gogoproto.goprotoEnumStringerAll"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumStringerAll")) + if (typeof message[".gogoproto.goprotoEnumStringerAll"] !== "boolean") + return ".gogoproto.goprotoEnumStringerAll: boolean expected"; + if (message[".gogoproto.enumStringerAll"] != null && message.hasOwnProperty(".gogoproto.enumStringerAll")) + if (typeof message[".gogoproto.enumStringerAll"] !== "boolean") + return ".gogoproto.enumStringerAll: boolean expected"; + if (message[".gogoproto.unsafeMarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unsafeMarshalerAll")) + if (typeof message[".gogoproto.unsafeMarshalerAll"] !== "boolean") + return ".gogoproto.unsafeMarshalerAll: boolean expected"; + if (message[".gogoproto.unsafeUnmarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unsafeUnmarshalerAll")) + if (typeof message[".gogoproto.unsafeUnmarshalerAll"] !== "boolean") + return ".gogoproto.unsafeUnmarshalerAll: boolean expected"; + if (message[".gogoproto.goprotoExtensionsMapAll"] != null && message.hasOwnProperty(".gogoproto.goprotoExtensionsMapAll")) + if (typeof message[".gogoproto.goprotoExtensionsMapAll"] !== "boolean") + return ".gogoproto.goprotoExtensionsMapAll: boolean expected"; + if (message[".gogoproto.goprotoUnrecognizedAll"] != null && message.hasOwnProperty(".gogoproto.goprotoUnrecognizedAll")) + if (typeof message[".gogoproto.goprotoUnrecognizedAll"] !== "boolean") + return ".gogoproto.goprotoUnrecognizedAll: boolean expected"; + if (message[".gogoproto.gogoprotoImport"] != null && message.hasOwnProperty(".gogoproto.gogoprotoImport")) + if (typeof message[".gogoproto.gogoprotoImport"] !== "boolean") + return ".gogoproto.gogoprotoImport: boolean expected"; + if (message[".gogoproto.protosizerAll"] != null && message.hasOwnProperty(".gogoproto.protosizerAll")) + if (typeof message[".gogoproto.protosizerAll"] !== "boolean") + return ".gogoproto.protosizerAll: boolean expected"; + if (message[".gogoproto.compareAll"] != null && message.hasOwnProperty(".gogoproto.compareAll")) + if (typeof message[".gogoproto.compareAll"] !== "boolean") + return ".gogoproto.compareAll: boolean expected"; + if (message[".gogoproto.typedeclAll"] != null && message.hasOwnProperty(".gogoproto.typedeclAll")) + if (typeof message[".gogoproto.typedeclAll"] !== "boolean") + return ".gogoproto.typedeclAll: boolean expected"; + if (message[".gogoproto.enumdeclAll"] != null && message.hasOwnProperty(".gogoproto.enumdeclAll")) + if (typeof message[".gogoproto.enumdeclAll"] !== "boolean") + return ".gogoproto.enumdeclAll: boolean expected"; + if (message[".gogoproto.goprotoRegistration"] != null && message.hasOwnProperty(".gogoproto.goprotoRegistration")) + if (typeof message[".gogoproto.goprotoRegistration"] !== "boolean") + return ".gogoproto.goprotoRegistration: boolean expected"; + if (message[".gogoproto.messagenameAll"] != null && message.hasOwnProperty(".gogoproto.messagenameAll")) + if (typeof message[".gogoproto.messagenameAll"] !== "boolean") + return ".gogoproto.messagenameAll: boolean expected"; + if (message[".gogoproto.goprotoSizecacheAll"] != null && message.hasOwnProperty(".gogoproto.goprotoSizecacheAll")) + if (typeof message[".gogoproto.goprotoSizecacheAll"] !== "boolean") + return ".gogoproto.goprotoSizecacheAll: boolean expected"; + if (message[".gogoproto.goprotoUnkeyedAll"] != null && message.hasOwnProperty(".gogoproto.goprotoUnkeyedAll")) + if (typeof message[".gogoproto.goprotoUnkeyedAll"] !== "boolean") + return ".gogoproto.goprotoUnkeyedAll: boolean expected"; + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".gogoproto.goprotoGettersAll"] != null) + message[".gogoproto.goprotoGettersAll"] = Boolean(object[".gogoproto.goprotoGettersAll"]); + if (object[".gogoproto.goprotoEnumPrefixAll"] != null) + message[".gogoproto.goprotoEnumPrefixAll"] = Boolean(object[".gogoproto.goprotoEnumPrefixAll"]); + if (object[".gogoproto.goprotoStringerAll"] != null) + message[".gogoproto.goprotoStringerAll"] = Boolean(object[".gogoproto.goprotoStringerAll"]); + if (object[".gogoproto.verboseEqualAll"] != null) + message[".gogoproto.verboseEqualAll"] = Boolean(object[".gogoproto.verboseEqualAll"]); + if (object[".gogoproto.faceAll"] != null) + message[".gogoproto.faceAll"] = Boolean(object[".gogoproto.faceAll"]); + if (object[".gogoproto.gostringAll"] != null) + message[".gogoproto.gostringAll"] = Boolean(object[".gogoproto.gostringAll"]); + if (object[".gogoproto.populateAll"] != null) + message[".gogoproto.populateAll"] = Boolean(object[".gogoproto.populateAll"]); + if (object[".gogoproto.stringerAll"] != null) + message[".gogoproto.stringerAll"] = Boolean(object[".gogoproto.stringerAll"]); + if (object[".gogoproto.onlyoneAll"] != null) + message[".gogoproto.onlyoneAll"] = Boolean(object[".gogoproto.onlyoneAll"]); + if (object[".gogoproto.equalAll"] != null) + message[".gogoproto.equalAll"] = Boolean(object[".gogoproto.equalAll"]); + if (object[".gogoproto.descriptionAll"] != null) + message[".gogoproto.descriptionAll"] = Boolean(object[".gogoproto.descriptionAll"]); + if (object[".gogoproto.testgenAll"] != null) + message[".gogoproto.testgenAll"] = Boolean(object[".gogoproto.testgenAll"]); + if (object[".gogoproto.benchgenAll"] != null) + message[".gogoproto.benchgenAll"] = Boolean(object[".gogoproto.benchgenAll"]); + if (object[".gogoproto.marshalerAll"] != null) + message[".gogoproto.marshalerAll"] = Boolean(object[".gogoproto.marshalerAll"]); + if (object[".gogoproto.unmarshalerAll"] != null) + message[".gogoproto.unmarshalerAll"] = Boolean(object[".gogoproto.unmarshalerAll"]); + if (object[".gogoproto.stableMarshalerAll"] != null) + message[".gogoproto.stableMarshalerAll"] = Boolean(object[".gogoproto.stableMarshalerAll"]); + if (object[".gogoproto.sizerAll"] != null) + message[".gogoproto.sizerAll"] = Boolean(object[".gogoproto.sizerAll"]); + if (object[".gogoproto.goprotoEnumStringerAll"] != null) + message[".gogoproto.goprotoEnumStringerAll"] = Boolean(object[".gogoproto.goprotoEnumStringerAll"]); + if (object[".gogoproto.enumStringerAll"] != null) + message[".gogoproto.enumStringerAll"] = Boolean(object[".gogoproto.enumStringerAll"]); + if (object[".gogoproto.unsafeMarshalerAll"] != null) + message[".gogoproto.unsafeMarshalerAll"] = Boolean(object[".gogoproto.unsafeMarshalerAll"]); + if (object[".gogoproto.unsafeUnmarshalerAll"] != null) + message[".gogoproto.unsafeUnmarshalerAll"] = Boolean(object[".gogoproto.unsafeUnmarshalerAll"]); + if (object[".gogoproto.goprotoExtensionsMapAll"] != null) + message[".gogoproto.goprotoExtensionsMapAll"] = Boolean(object[".gogoproto.goprotoExtensionsMapAll"]); + if (object[".gogoproto.goprotoUnrecognizedAll"] != null) + message[".gogoproto.goprotoUnrecognizedAll"] = Boolean(object[".gogoproto.goprotoUnrecognizedAll"]); + if (object[".gogoproto.gogoprotoImport"] != null) + message[".gogoproto.gogoprotoImport"] = Boolean(object[".gogoproto.gogoprotoImport"]); + if (object[".gogoproto.protosizerAll"] != null) + message[".gogoproto.protosizerAll"] = Boolean(object[".gogoproto.protosizerAll"]); + if (object[".gogoproto.compareAll"] != null) + message[".gogoproto.compareAll"] = Boolean(object[".gogoproto.compareAll"]); + if (object[".gogoproto.typedeclAll"] != null) + message[".gogoproto.typedeclAll"] = Boolean(object[".gogoproto.typedeclAll"]); + if (object[".gogoproto.enumdeclAll"] != null) + message[".gogoproto.enumdeclAll"] = Boolean(object[".gogoproto.enumdeclAll"]); + if (object[".gogoproto.goprotoRegistration"] != null) + message[".gogoproto.goprotoRegistration"] = Boolean(object[".gogoproto.goprotoRegistration"]); + if (object[".gogoproto.messagenameAll"] != null) + message[".gogoproto.messagenameAll"] = Boolean(object[".gogoproto.messagenameAll"]); + if (object[".gogoproto.goprotoSizecacheAll"] != null) + message[".gogoproto.goprotoSizecacheAll"] = Boolean(object[".gogoproto.goprotoSizecacheAll"]); + if (object[".gogoproto.goprotoUnkeyedAll"] != null) + message[".gogoproto.goprotoUnkeyedAll"] = Boolean(object[".gogoproto.goprotoUnkeyedAll"]); + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = false; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object[".gogoproto.goprotoGettersAll"] = false; + object[".gogoproto.goprotoEnumPrefixAll"] = false; + object[".gogoproto.goprotoStringerAll"] = false; + object[".gogoproto.verboseEqualAll"] = false; + object[".gogoproto.faceAll"] = false; + object[".gogoproto.gostringAll"] = false; + object[".gogoproto.populateAll"] = false; + object[".gogoproto.stringerAll"] = false; + object[".gogoproto.onlyoneAll"] = false; + object[".gogoproto.equalAll"] = false; + object[".gogoproto.descriptionAll"] = false; + object[".gogoproto.testgenAll"] = false; + object[".gogoproto.benchgenAll"] = false; + object[".gogoproto.marshalerAll"] = false; + object[".gogoproto.unmarshalerAll"] = false; + object[".gogoproto.stableMarshalerAll"] = false; + object[".gogoproto.sizerAll"] = false; + object[".gogoproto.goprotoEnumStringerAll"] = false; + object[".gogoproto.enumStringerAll"] = false; + object[".gogoproto.unsafeMarshalerAll"] = false; + object[".gogoproto.unsafeUnmarshalerAll"] = false; + object[".gogoproto.goprotoExtensionsMapAll"] = false; + object[".gogoproto.goprotoUnrecognizedAll"] = false; + object[".gogoproto.gogoprotoImport"] = false; + object[".gogoproto.protosizerAll"] = false; + object[".gogoproto.compareAll"] = false; + object[".gogoproto.typedeclAll"] = false; + object[".gogoproto.enumdeclAll"] = false; + object[".gogoproto.goprotoRegistration"] = false; + object[".gogoproto.messagenameAll"] = false; + object[".gogoproto.goprotoSizecacheAll"] = false; + object[".gogoproto.goprotoUnkeyedAll"] = false; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".gogoproto.goprotoGettersAll"] != null && message.hasOwnProperty(".gogoproto.goprotoGettersAll")) + object[".gogoproto.goprotoGettersAll"] = message[".gogoproto.goprotoGettersAll"]; + if (message[".gogoproto.goprotoEnumPrefixAll"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumPrefixAll")) + object[".gogoproto.goprotoEnumPrefixAll"] = message[".gogoproto.goprotoEnumPrefixAll"]; + if (message[".gogoproto.goprotoStringerAll"] != null && message.hasOwnProperty(".gogoproto.goprotoStringerAll")) + object[".gogoproto.goprotoStringerAll"] = message[".gogoproto.goprotoStringerAll"]; + if (message[".gogoproto.verboseEqualAll"] != null && message.hasOwnProperty(".gogoproto.verboseEqualAll")) + object[".gogoproto.verboseEqualAll"] = message[".gogoproto.verboseEqualAll"]; + if (message[".gogoproto.faceAll"] != null && message.hasOwnProperty(".gogoproto.faceAll")) + object[".gogoproto.faceAll"] = message[".gogoproto.faceAll"]; + if (message[".gogoproto.gostringAll"] != null && message.hasOwnProperty(".gogoproto.gostringAll")) + object[".gogoproto.gostringAll"] = message[".gogoproto.gostringAll"]; + if (message[".gogoproto.populateAll"] != null && message.hasOwnProperty(".gogoproto.populateAll")) + object[".gogoproto.populateAll"] = message[".gogoproto.populateAll"]; + if (message[".gogoproto.stringerAll"] != null && message.hasOwnProperty(".gogoproto.stringerAll")) + object[".gogoproto.stringerAll"] = message[".gogoproto.stringerAll"]; + if (message[".gogoproto.onlyoneAll"] != null && message.hasOwnProperty(".gogoproto.onlyoneAll")) + object[".gogoproto.onlyoneAll"] = message[".gogoproto.onlyoneAll"]; + if (message[".gogoproto.equalAll"] != null && message.hasOwnProperty(".gogoproto.equalAll")) + object[".gogoproto.equalAll"] = message[".gogoproto.equalAll"]; + if (message[".gogoproto.descriptionAll"] != null && message.hasOwnProperty(".gogoproto.descriptionAll")) + object[".gogoproto.descriptionAll"] = message[".gogoproto.descriptionAll"]; + if (message[".gogoproto.testgenAll"] != null && message.hasOwnProperty(".gogoproto.testgenAll")) + object[".gogoproto.testgenAll"] = message[".gogoproto.testgenAll"]; + if (message[".gogoproto.benchgenAll"] != null && message.hasOwnProperty(".gogoproto.benchgenAll")) + object[".gogoproto.benchgenAll"] = message[".gogoproto.benchgenAll"]; + if (message[".gogoproto.marshalerAll"] != null && message.hasOwnProperty(".gogoproto.marshalerAll")) + object[".gogoproto.marshalerAll"] = message[".gogoproto.marshalerAll"]; + if (message[".gogoproto.unmarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unmarshalerAll")) + object[".gogoproto.unmarshalerAll"] = message[".gogoproto.unmarshalerAll"]; + if (message[".gogoproto.stableMarshalerAll"] != null && message.hasOwnProperty(".gogoproto.stableMarshalerAll")) + object[".gogoproto.stableMarshalerAll"] = message[".gogoproto.stableMarshalerAll"]; + if (message[".gogoproto.sizerAll"] != null && message.hasOwnProperty(".gogoproto.sizerAll")) + object[".gogoproto.sizerAll"] = message[".gogoproto.sizerAll"]; + if (message[".gogoproto.goprotoEnumStringerAll"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumStringerAll")) + object[".gogoproto.goprotoEnumStringerAll"] = message[".gogoproto.goprotoEnumStringerAll"]; + if (message[".gogoproto.enumStringerAll"] != null && message.hasOwnProperty(".gogoproto.enumStringerAll")) + object[".gogoproto.enumStringerAll"] = message[".gogoproto.enumStringerAll"]; + if (message[".gogoproto.unsafeMarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unsafeMarshalerAll")) + object[".gogoproto.unsafeMarshalerAll"] = message[".gogoproto.unsafeMarshalerAll"]; + if (message[".gogoproto.unsafeUnmarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unsafeUnmarshalerAll")) + object[".gogoproto.unsafeUnmarshalerAll"] = message[".gogoproto.unsafeUnmarshalerAll"]; + if (message[".gogoproto.goprotoExtensionsMapAll"] != null && message.hasOwnProperty(".gogoproto.goprotoExtensionsMapAll")) + object[".gogoproto.goprotoExtensionsMapAll"] = message[".gogoproto.goprotoExtensionsMapAll"]; + if (message[".gogoproto.goprotoUnrecognizedAll"] != null && message.hasOwnProperty(".gogoproto.goprotoUnrecognizedAll")) + object[".gogoproto.goprotoUnrecognizedAll"] = message[".gogoproto.goprotoUnrecognizedAll"]; + if (message[".gogoproto.gogoprotoImport"] != null && message.hasOwnProperty(".gogoproto.gogoprotoImport")) + object[".gogoproto.gogoprotoImport"] = message[".gogoproto.gogoprotoImport"]; + if (message[".gogoproto.protosizerAll"] != null && message.hasOwnProperty(".gogoproto.protosizerAll")) + object[".gogoproto.protosizerAll"] = message[".gogoproto.protosizerAll"]; + if (message[".gogoproto.compareAll"] != null && message.hasOwnProperty(".gogoproto.compareAll")) + object[".gogoproto.compareAll"] = message[".gogoproto.compareAll"]; + if (message[".gogoproto.typedeclAll"] != null && message.hasOwnProperty(".gogoproto.typedeclAll")) + object[".gogoproto.typedeclAll"] = message[".gogoproto.typedeclAll"]; + if (message[".gogoproto.enumdeclAll"] != null && message.hasOwnProperty(".gogoproto.enumdeclAll")) + object[".gogoproto.enumdeclAll"] = message[".gogoproto.enumdeclAll"]; + if (message[".gogoproto.goprotoRegistration"] != null && message.hasOwnProperty(".gogoproto.goprotoRegistration")) + object[".gogoproto.goprotoRegistration"] = message[".gogoproto.goprotoRegistration"]; + if (message[".gogoproto.messagenameAll"] != null && message.hasOwnProperty(".gogoproto.messagenameAll")) + object[".gogoproto.messagenameAll"] = message[".gogoproto.messagenameAll"]; + if (message[".gogoproto.goprotoSizecacheAll"] != null && message.hasOwnProperty(".gogoproto.goprotoSizecacheAll")) + object[".gogoproto.goprotoSizecacheAll"] = message[".gogoproto.goprotoSizecacheAll"]; + if (message[".gogoproto.goprotoUnkeyedAll"] != null && message.hasOwnProperty(".gogoproto.goprotoUnkeyedAll")) + object[".gogoproto.goprotoUnkeyedAll"] = message[".gogoproto.goprotoUnkeyedAll"]; + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {string|null} [".cosmos_proto.interfaceType"] MessageOptions .cosmos_proto.interfaceType + * @property {string|null} [".cosmos_proto.implementsInterface"] MessageOptions .cosmos_proto.implementsInterface + * @property {boolean|null} [".gogoproto.goprotoGetters"] MessageOptions .gogoproto.goprotoGetters + * @property {boolean|null} [".gogoproto.goprotoStringer"] MessageOptions .gogoproto.goprotoStringer + * @property {boolean|null} [".gogoproto.verboseEqual"] MessageOptions .gogoproto.verboseEqual + * @property {boolean|null} [".gogoproto.face"] MessageOptions .gogoproto.face + * @property {boolean|null} [".gogoproto.gostring"] MessageOptions .gogoproto.gostring + * @property {boolean|null} [".gogoproto.populate"] MessageOptions .gogoproto.populate + * @property {boolean|null} [".gogoproto.stringer"] MessageOptions .gogoproto.stringer + * @property {boolean|null} [".gogoproto.onlyone"] MessageOptions .gogoproto.onlyone + * @property {boolean|null} [".gogoproto.equal"] MessageOptions .gogoproto.equal + * @property {boolean|null} [".gogoproto.description"] MessageOptions .gogoproto.description + * @property {boolean|null} [".gogoproto.testgen"] MessageOptions .gogoproto.testgen + * @property {boolean|null} [".gogoproto.benchgen"] MessageOptions .gogoproto.benchgen + * @property {boolean|null} [".gogoproto.marshaler"] MessageOptions .gogoproto.marshaler + * @property {boolean|null} [".gogoproto.unmarshaler"] MessageOptions .gogoproto.unmarshaler + * @property {boolean|null} [".gogoproto.stableMarshaler"] MessageOptions .gogoproto.stableMarshaler + * @property {boolean|null} [".gogoproto.sizer"] MessageOptions .gogoproto.sizer + * @property {boolean|null} [".gogoproto.unsafeMarshaler"] MessageOptions .gogoproto.unsafeMarshaler + * @property {boolean|null} [".gogoproto.unsafeUnmarshaler"] MessageOptions .gogoproto.unsafeUnmarshaler + * @property {boolean|null} [".gogoproto.goprotoExtensionsMap"] MessageOptions .gogoproto.goprotoExtensionsMap + * @property {boolean|null} [".gogoproto.goprotoUnrecognized"] MessageOptions .gogoproto.goprotoUnrecognized + * @property {boolean|null} [".gogoproto.protosizer"] MessageOptions .gogoproto.protosizer + * @property {boolean|null} [".gogoproto.compare"] MessageOptions .gogoproto.compare + * @property {boolean|null} [".gogoproto.typedecl"] MessageOptions .gogoproto.typedecl + * @property {boolean|null} [".gogoproto.messagename"] MessageOptions .gogoproto.messagename + * @property {boolean|null} [".gogoproto.goprotoSizecache"] MessageOptions .gogoproto.goprotoSizecache + * @property {boolean|null} [".gogoproto.goprotoUnkeyed"] MessageOptions .gogoproto.goprotoUnkeyed + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .cosmos_proto.interfaceType. + * @member {string} .cosmos_proto.interfaceType + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".cosmos_proto.interfaceType"] = ""; + + /** + * MessageOptions .cosmos_proto.implementsInterface. + * @member {string} .cosmos_proto.implementsInterface + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".cosmos_proto.implementsInterface"] = ""; + + /** + * MessageOptions .gogoproto.goprotoGetters. + * @member {boolean} .gogoproto.goprotoGetters + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.goprotoGetters"] = false; + + /** + * MessageOptions .gogoproto.goprotoStringer. + * @member {boolean} .gogoproto.goprotoStringer + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.goprotoStringer"] = false; + + /** + * MessageOptions .gogoproto.verboseEqual. + * @member {boolean} .gogoproto.verboseEqual + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.verboseEqual"] = false; + + /** + * MessageOptions .gogoproto.face. + * @member {boolean} .gogoproto.face + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.face"] = false; + + /** + * MessageOptions .gogoproto.gostring. + * @member {boolean} .gogoproto.gostring + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.gostring"] = false; + + /** + * MessageOptions .gogoproto.populate. + * @member {boolean} .gogoproto.populate + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.populate"] = false; + + /** + * MessageOptions .gogoproto.stringer. + * @member {boolean} .gogoproto.stringer + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.stringer"] = false; + + /** + * MessageOptions .gogoproto.onlyone. + * @member {boolean} .gogoproto.onlyone + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.onlyone"] = false; + + /** + * MessageOptions .gogoproto.equal. + * @member {boolean} .gogoproto.equal + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.equal"] = false; + + /** + * MessageOptions .gogoproto.description. + * @member {boolean} .gogoproto.description + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.description"] = false; + + /** + * MessageOptions .gogoproto.testgen. + * @member {boolean} .gogoproto.testgen + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.testgen"] = false; + + /** + * MessageOptions .gogoproto.benchgen. + * @member {boolean} .gogoproto.benchgen + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.benchgen"] = false; + + /** + * MessageOptions .gogoproto.marshaler. + * @member {boolean} .gogoproto.marshaler + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.marshaler"] = false; + + /** + * MessageOptions .gogoproto.unmarshaler. + * @member {boolean} .gogoproto.unmarshaler + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.unmarshaler"] = false; + + /** + * MessageOptions .gogoproto.stableMarshaler. + * @member {boolean} .gogoproto.stableMarshaler + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.stableMarshaler"] = false; + + /** + * MessageOptions .gogoproto.sizer. + * @member {boolean} .gogoproto.sizer + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.sizer"] = false; + + /** + * MessageOptions .gogoproto.unsafeMarshaler. + * @member {boolean} .gogoproto.unsafeMarshaler + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.unsafeMarshaler"] = false; + + /** + * MessageOptions .gogoproto.unsafeUnmarshaler. + * @member {boolean} .gogoproto.unsafeUnmarshaler + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.unsafeUnmarshaler"] = false; + + /** + * MessageOptions .gogoproto.goprotoExtensionsMap. + * @member {boolean} .gogoproto.goprotoExtensionsMap + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.goprotoExtensionsMap"] = false; + + /** + * MessageOptions .gogoproto.goprotoUnrecognized. + * @member {boolean} .gogoproto.goprotoUnrecognized + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.goprotoUnrecognized"] = false; + + /** + * MessageOptions .gogoproto.protosizer. + * @member {boolean} .gogoproto.protosizer + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.protosizer"] = false; + + /** + * MessageOptions .gogoproto.compare. + * @member {boolean} .gogoproto.compare + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.compare"] = false; + + /** + * MessageOptions .gogoproto.typedecl. + * @member {boolean} .gogoproto.typedecl + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.typedecl"] = false; + + /** + * MessageOptions .gogoproto.messagename. + * @member {boolean} .gogoproto.messagename + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.messagename"] = false; + + /** + * MessageOptions .gogoproto.goprotoSizecache. + * @member {boolean} .gogoproto.goprotoSizecache + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.goprotoSizecache"] = false; + + /** + * MessageOptions .gogoproto.goprotoUnkeyed. + * @member {boolean} .gogoproto.goprotoUnkeyed + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".gogoproto.goprotoUnkeyed"] = false; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".gogoproto.goprotoGetters"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoGetters")) + writer.uint32(/* id 64001, wireType 0 =*/512008).bool(message[".gogoproto.goprotoGetters"]); + if (message[".gogoproto.goprotoStringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoStringer")) + writer.uint32(/* id 64003, wireType 0 =*/512024).bool(message[".gogoproto.goprotoStringer"]); + if (message[".gogoproto.verboseEqual"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verboseEqual")) + writer.uint32(/* id 64004, wireType 0 =*/512032).bool(message[".gogoproto.verboseEqual"]); + if (message[".gogoproto.face"] != null && Object.hasOwnProperty.call(message, ".gogoproto.face")) + writer.uint32(/* id 64005, wireType 0 =*/512040).bool(message[".gogoproto.face"]); + if (message[".gogoproto.gostring"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostring")) + writer.uint32(/* id 64006, wireType 0 =*/512048).bool(message[".gogoproto.gostring"]); + if (message[".gogoproto.populate"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populate")) + writer.uint32(/* id 64007, wireType 0 =*/512056).bool(message[".gogoproto.populate"]); + if (message[".gogoproto.onlyone"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyone")) + writer.uint32(/* id 64009, wireType 0 =*/512072).bool(message[".gogoproto.onlyone"]); + if (message[".gogoproto.equal"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equal")) + writer.uint32(/* id 64013, wireType 0 =*/512104).bool(message[".gogoproto.equal"]); + if (message[".gogoproto.description"] != null && Object.hasOwnProperty.call(message, ".gogoproto.description")) + writer.uint32(/* id 64014, wireType 0 =*/512112).bool(message[".gogoproto.description"]); + if (message[".gogoproto.testgen"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgen")) + writer.uint32(/* id 64015, wireType 0 =*/512120).bool(message[".gogoproto.testgen"]); + if (message[".gogoproto.benchgen"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgen")) + writer.uint32(/* id 64016, wireType 0 =*/512128).bool(message[".gogoproto.benchgen"]); + if (message[".gogoproto.marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshaler")) + writer.uint32(/* id 64017, wireType 0 =*/512136).bool(message[".gogoproto.marshaler"]); + if (message[".gogoproto.unmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshaler")) + writer.uint32(/* id 64018, wireType 0 =*/512144).bool(message[".gogoproto.unmarshaler"]); + if (message[".gogoproto.stableMarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stableMarshaler")) + writer.uint32(/* id 64019, wireType 0 =*/512152).bool(message[".gogoproto.stableMarshaler"]); + if (message[".gogoproto.sizer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizer")) + writer.uint32(/* id 64020, wireType 0 =*/512160).bool(message[".gogoproto.sizer"]); + if (message[".gogoproto.unsafeMarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafeMarshaler")) + writer.uint32(/* id 64023, wireType 0 =*/512184).bool(message[".gogoproto.unsafeMarshaler"]); + if (message[".gogoproto.unsafeUnmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafeUnmarshaler")) + writer.uint32(/* id 64024, wireType 0 =*/512192).bool(message[".gogoproto.unsafeUnmarshaler"]); + if (message[".gogoproto.goprotoExtensionsMap"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoExtensionsMap")) + writer.uint32(/* id 64025, wireType 0 =*/512200).bool(message[".gogoproto.goprotoExtensionsMap"]); + if (message[".gogoproto.goprotoUnrecognized"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoUnrecognized")) + writer.uint32(/* id 64026, wireType 0 =*/512208).bool(message[".gogoproto.goprotoUnrecognized"]); + if (message[".gogoproto.protosizer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizer")) + writer.uint32(/* id 64028, wireType 0 =*/512224).bool(message[".gogoproto.protosizer"]); + if (message[".gogoproto.compare"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compare")) + writer.uint32(/* id 64029, wireType 0 =*/512232).bool(message[".gogoproto.compare"]); + if (message[".gogoproto.typedecl"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedecl")) + writer.uint32(/* id 64030, wireType 0 =*/512240).bool(message[".gogoproto.typedecl"]); + if (message[".gogoproto.messagename"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagename")) + writer.uint32(/* id 64033, wireType 0 =*/512264).bool(message[".gogoproto.messagename"]); + if (message[".gogoproto.goprotoSizecache"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoSizecache")) + writer.uint32(/* id 64034, wireType 0 =*/512272).bool(message[".gogoproto.goprotoSizecache"]); + if (message[".gogoproto.goprotoUnkeyed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoUnkeyed")) + writer.uint32(/* id 64035, wireType 0 =*/512280).bool(message[".gogoproto.goprotoUnkeyed"]); + if (message[".gogoproto.stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringer")) + writer.uint32(/* id 67008, wireType 0 =*/536064).bool(message[".gogoproto.stringer"]); + if (message[".cosmos_proto.interfaceType"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.interfaceType")) + writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.interfaceType"]); + if (message[".cosmos_proto.implementsInterface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.implementsInterface")) + writer.uint32(/* id 93002, wireType 2 =*/744018).string(message[".cosmos_proto.implementsInterface"]); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.messageSetWireFormat = reader.bool(); + break; + case 2: + message.noStandardDescriptorAccessor = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 7: + message.mapEntry = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 93001: + message[".cosmos_proto.interfaceType"] = reader.string(); + break; + case 93002: + message[".cosmos_proto.implementsInterface"] = reader.string(); + break; + case 64001: + message[".gogoproto.goprotoGetters"] = reader.bool(); + break; + case 64003: + message[".gogoproto.goprotoStringer"] = reader.bool(); + break; + case 64004: + message[".gogoproto.verboseEqual"] = reader.bool(); + break; + case 64005: + message[".gogoproto.face"] = reader.bool(); + break; + case 64006: + message[".gogoproto.gostring"] = reader.bool(); + break; + case 64007: + message[".gogoproto.populate"] = reader.bool(); + break; + case 67008: + message[".gogoproto.stringer"] = reader.bool(); + break; + case 64009: + message[".gogoproto.onlyone"] = reader.bool(); + break; + case 64013: + message[".gogoproto.equal"] = reader.bool(); + break; + case 64014: + message[".gogoproto.description"] = reader.bool(); + break; + case 64015: + message[".gogoproto.testgen"] = reader.bool(); + break; + case 64016: + message[".gogoproto.benchgen"] = reader.bool(); + break; + case 64017: + message[".gogoproto.marshaler"] = reader.bool(); + break; + case 64018: + message[".gogoproto.unmarshaler"] = reader.bool(); + break; + case 64019: + message[".gogoproto.stableMarshaler"] = reader.bool(); + break; + case 64020: + message[".gogoproto.sizer"] = reader.bool(); + break; + case 64023: + message[".gogoproto.unsafeMarshaler"] = reader.bool(); + break; + case 64024: + message[".gogoproto.unsafeUnmarshaler"] = reader.bool(); + break; + case 64025: + message[".gogoproto.goprotoExtensionsMap"] = reader.bool(); + break; + case 64026: + message[".gogoproto.goprotoUnrecognized"] = reader.bool(); + break; + case 64028: + message[".gogoproto.protosizer"] = reader.bool(); + break; + case 64029: + message[".gogoproto.compare"] = reader.bool(); + break; + case 64030: + message[".gogoproto.typedecl"] = reader.bool(); + break; + case 64033: + message[".gogoproto.messagename"] = reader.bool(); + break; + case 64034: + message[".gogoproto.goprotoSizecache"] = reader.bool(); + break; + case 64035: + message[".gogoproto.goprotoUnkeyed"] = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".cosmos_proto.interfaceType"] != null && message.hasOwnProperty(".cosmos_proto.interfaceType")) + if (!$util.isString(message[".cosmos_proto.interfaceType"])) + return ".cosmos_proto.interfaceType: string expected"; + if (message[".cosmos_proto.implementsInterface"] != null && message.hasOwnProperty(".cosmos_proto.implementsInterface")) + if (!$util.isString(message[".cosmos_proto.implementsInterface"])) + return ".cosmos_proto.implementsInterface: string expected"; + if (message[".gogoproto.goprotoGetters"] != null && message.hasOwnProperty(".gogoproto.goprotoGetters")) + if (typeof message[".gogoproto.goprotoGetters"] !== "boolean") + return ".gogoproto.goprotoGetters: boolean expected"; + if (message[".gogoproto.goprotoStringer"] != null && message.hasOwnProperty(".gogoproto.goprotoStringer")) + if (typeof message[".gogoproto.goprotoStringer"] !== "boolean") + return ".gogoproto.goprotoStringer: boolean expected"; + if (message[".gogoproto.verboseEqual"] != null && message.hasOwnProperty(".gogoproto.verboseEqual")) + if (typeof message[".gogoproto.verboseEqual"] !== "boolean") + return ".gogoproto.verboseEqual: boolean expected"; + if (message[".gogoproto.face"] != null && message.hasOwnProperty(".gogoproto.face")) + if (typeof message[".gogoproto.face"] !== "boolean") + return ".gogoproto.face: boolean expected"; + if (message[".gogoproto.gostring"] != null && message.hasOwnProperty(".gogoproto.gostring")) + if (typeof message[".gogoproto.gostring"] !== "boolean") + return ".gogoproto.gostring: boolean expected"; + if (message[".gogoproto.populate"] != null && message.hasOwnProperty(".gogoproto.populate")) + if (typeof message[".gogoproto.populate"] !== "boolean") + return ".gogoproto.populate: boolean expected"; + if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) + if (typeof message[".gogoproto.stringer"] !== "boolean") + return ".gogoproto.stringer: boolean expected"; + if (message[".gogoproto.onlyone"] != null && message.hasOwnProperty(".gogoproto.onlyone")) + if (typeof message[".gogoproto.onlyone"] !== "boolean") + return ".gogoproto.onlyone: boolean expected"; + if (message[".gogoproto.equal"] != null && message.hasOwnProperty(".gogoproto.equal")) + if (typeof message[".gogoproto.equal"] !== "boolean") + return ".gogoproto.equal: boolean expected"; + if (message[".gogoproto.description"] != null && message.hasOwnProperty(".gogoproto.description")) + if (typeof message[".gogoproto.description"] !== "boolean") + return ".gogoproto.description: boolean expected"; + if (message[".gogoproto.testgen"] != null && message.hasOwnProperty(".gogoproto.testgen")) + if (typeof message[".gogoproto.testgen"] !== "boolean") + return ".gogoproto.testgen: boolean expected"; + if (message[".gogoproto.benchgen"] != null && message.hasOwnProperty(".gogoproto.benchgen")) + if (typeof message[".gogoproto.benchgen"] !== "boolean") + return ".gogoproto.benchgen: boolean expected"; + if (message[".gogoproto.marshaler"] != null && message.hasOwnProperty(".gogoproto.marshaler")) + if (typeof message[".gogoproto.marshaler"] !== "boolean") + return ".gogoproto.marshaler: boolean expected"; + if (message[".gogoproto.unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unmarshaler")) + if (typeof message[".gogoproto.unmarshaler"] !== "boolean") + return ".gogoproto.unmarshaler: boolean expected"; + if (message[".gogoproto.stableMarshaler"] != null && message.hasOwnProperty(".gogoproto.stableMarshaler")) + if (typeof message[".gogoproto.stableMarshaler"] !== "boolean") + return ".gogoproto.stableMarshaler: boolean expected"; + if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) + if (typeof message[".gogoproto.sizer"] !== "boolean") + return ".gogoproto.sizer: boolean expected"; + if (message[".gogoproto.unsafeMarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafeMarshaler")) + if (typeof message[".gogoproto.unsafeMarshaler"] !== "boolean") + return ".gogoproto.unsafeMarshaler: boolean expected"; + if (message[".gogoproto.unsafeUnmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafeUnmarshaler")) + if (typeof message[".gogoproto.unsafeUnmarshaler"] !== "boolean") + return ".gogoproto.unsafeUnmarshaler: boolean expected"; + if (message[".gogoproto.goprotoExtensionsMap"] != null && message.hasOwnProperty(".gogoproto.goprotoExtensionsMap")) + if (typeof message[".gogoproto.goprotoExtensionsMap"] !== "boolean") + return ".gogoproto.goprotoExtensionsMap: boolean expected"; + if (message[".gogoproto.goprotoUnrecognized"] != null && message.hasOwnProperty(".gogoproto.goprotoUnrecognized")) + if (typeof message[".gogoproto.goprotoUnrecognized"] !== "boolean") + return ".gogoproto.goprotoUnrecognized: boolean expected"; + if (message[".gogoproto.protosizer"] != null && message.hasOwnProperty(".gogoproto.protosizer")) + if (typeof message[".gogoproto.protosizer"] !== "boolean") + return ".gogoproto.protosizer: boolean expected"; + if (message[".gogoproto.compare"] != null && message.hasOwnProperty(".gogoproto.compare")) + if (typeof message[".gogoproto.compare"] !== "boolean") + return ".gogoproto.compare: boolean expected"; + if (message[".gogoproto.typedecl"] != null && message.hasOwnProperty(".gogoproto.typedecl")) + if (typeof message[".gogoproto.typedecl"] !== "boolean") + return ".gogoproto.typedecl: boolean expected"; + if (message[".gogoproto.messagename"] != null && message.hasOwnProperty(".gogoproto.messagename")) + if (typeof message[".gogoproto.messagename"] !== "boolean") + return ".gogoproto.messagename: boolean expected"; + if (message[".gogoproto.goprotoSizecache"] != null && message.hasOwnProperty(".gogoproto.goprotoSizecache")) + if (typeof message[".gogoproto.goprotoSizecache"] !== "boolean") + return ".gogoproto.goprotoSizecache: boolean expected"; + if (message[".gogoproto.goprotoUnkeyed"] != null && message.hasOwnProperty(".gogoproto.goprotoUnkeyed")) + if (typeof message[".gogoproto.goprotoUnkeyed"] !== "boolean") + return ".gogoproto.goprotoUnkeyed: boolean expected"; + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".cosmos_proto.interfaceType"] != null) + message[".cosmos_proto.interfaceType"] = String(object[".cosmos_proto.interfaceType"]); + if (object[".cosmos_proto.implementsInterface"] != null) + message[".cosmos_proto.implementsInterface"] = String(object[".cosmos_proto.implementsInterface"]); + if (object[".gogoproto.goprotoGetters"] != null) + message[".gogoproto.goprotoGetters"] = Boolean(object[".gogoproto.goprotoGetters"]); + if (object[".gogoproto.goprotoStringer"] != null) + message[".gogoproto.goprotoStringer"] = Boolean(object[".gogoproto.goprotoStringer"]); + if (object[".gogoproto.verboseEqual"] != null) + message[".gogoproto.verboseEqual"] = Boolean(object[".gogoproto.verboseEqual"]); + if (object[".gogoproto.face"] != null) + message[".gogoproto.face"] = Boolean(object[".gogoproto.face"]); + if (object[".gogoproto.gostring"] != null) + message[".gogoproto.gostring"] = Boolean(object[".gogoproto.gostring"]); + if (object[".gogoproto.populate"] != null) + message[".gogoproto.populate"] = Boolean(object[".gogoproto.populate"]); + if (object[".gogoproto.stringer"] != null) + message[".gogoproto.stringer"] = Boolean(object[".gogoproto.stringer"]); + if (object[".gogoproto.onlyone"] != null) + message[".gogoproto.onlyone"] = Boolean(object[".gogoproto.onlyone"]); + if (object[".gogoproto.equal"] != null) + message[".gogoproto.equal"] = Boolean(object[".gogoproto.equal"]); + if (object[".gogoproto.description"] != null) + message[".gogoproto.description"] = Boolean(object[".gogoproto.description"]); + if (object[".gogoproto.testgen"] != null) + message[".gogoproto.testgen"] = Boolean(object[".gogoproto.testgen"]); + if (object[".gogoproto.benchgen"] != null) + message[".gogoproto.benchgen"] = Boolean(object[".gogoproto.benchgen"]); + if (object[".gogoproto.marshaler"] != null) + message[".gogoproto.marshaler"] = Boolean(object[".gogoproto.marshaler"]); + if (object[".gogoproto.unmarshaler"] != null) + message[".gogoproto.unmarshaler"] = Boolean(object[".gogoproto.unmarshaler"]); + if (object[".gogoproto.stableMarshaler"] != null) + message[".gogoproto.stableMarshaler"] = Boolean(object[".gogoproto.stableMarshaler"]); + if (object[".gogoproto.sizer"] != null) + message[".gogoproto.sizer"] = Boolean(object[".gogoproto.sizer"]); + if (object[".gogoproto.unsafeMarshaler"] != null) + message[".gogoproto.unsafeMarshaler"] = Boolean(object[".gogoproto.unsafeMarshaler"]); + if (object[".gogoproto.unsafeUnmarshaler"] != null) + message[".gogoproto.unsafeUnmarshaler"] = Boolean(object[".gogoproto.unsafeUnmarshaler"]); + if (object[".gogoproto.goprotoExtensionsMap"] != null) + message[".gogoproto.goprotoExtensionsMap"] = Boolean(object[".gogoproto.goprotoExtensionsMap"]); + if (object[".gogoproto.goprotoUnrecognized"] != null) + message[".gogoproto.goprotoUnrecognized"] = Boolean(object[".gogoproto.goprotoUnrecognized"]); + if (object[".gogoproto.protosizer"] != null) + message[".gogoproto.protosizer"] = Boolean(object[".gogoproto.protosizer"]); + if (object[".gogoproto.compare"] != null) + message[".gogoproto.compare"] = Boolean(object[".gogoproto.compare"]); + if (object[".gogoproto.typedecl"] != null) + message[".gogoproto.typedecl"] = Boolean(object[".gogoproto.typedecl"]); + if (object[".gogoproto.messagename"] != null) + message[".gogoproto.messagename"] = Boolean(object[".gogoproto.messagename"]); + if (object[".gogoproto.goprotoSizecache"] != null) + message[".gogoproto.goprotoSizecache"] = Boolean(object[".gogoproto.goprotoSizecache"]); + if (object[".gogoproto.goprotoUnkeyed"] != null) + message[".gogoproto.goprotoUnkeyed"] = Boolean(object[".gogoproto.goprotoUnkeyed"]); + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".gogoproto.goprotoGetters"] = false; + object[".gogoproto.goprotoStringer"] = false; + object[".gogoproto.verboseEqual"] = false; + object[".gogoproto.face"] = false; + object[".gogoproto.gostring"] = false; + object[".gogoproto.populate"] = false; + object[".gogoproto.onlyone"] = false; + object[".gogoproto.equal"] = false; + object[".gogoproto.description"] = false; + object[".gogoproto.testgen"] = false; + object[".gogoproto.benchgen"] = false; + object[".gogoproto.marshaler"] = false; + object[".gogoproto.unmarshaler"] = false; + object[".gogoproto.stableMarshaler"] = false; + object[".gogoproto.sizer"] = false; + object[".gogoproto.unsafeMarshaler"] = false; + object[".gogoproto.unsafeUnmarshaler"] = false; + object[".gogoproto.goprotoExtensionsMap"] = false; + object[".gogoproto.goprotoUnrecognized"] = false; + object[".gogoproto.protosizer"] = false; + object[".gogoproto.compare"] = false; + object[".gogoproto.typedecl"] = false; + object[".gogoproto.messagename"] = false; + object[".gogoproto.goprotoSizecache"] = false; + object[".gogoproto.goprotoUnkeyed"] = false; + object[".gogoproto.stringer"] = false; + object[".cosmos_proto.interfaceType"] = ""; + object[".cosmos_proto.implementsInterface"] = ""; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".gogoproto.goprotoGetters"] != null && message.hasOwnProperty(".gogoproto.goprotoGetters")) + object[".gogoproto.goprotoGetters"] = message[".gogoproto.goprotoGetters"]; + if (message[".gogoproto.goprotoStringer"] != null && message.hasOwnProperty(".gogoproto.goprotoStringer")) + object[".gogoproto.goprotoStringer"] = message[".gogoproto.goprotoStringer"]; + if (message[".gogoproto.verboseEqual"] != null && message.hasOwnProperty(".gogoproto.verboseEqual")) + object[".gogoproto.verboseEqual"] = message[".gogoproto.verboseEqual"]; + if (message[".gogoproto.face"] != null && message.hasOwnProperty(".gogoproto.face")) + object[".gogoproto.face"] = message[".gogoproto.face"]; + if (message[".gogoproto.gostring"] != null && message.hasOwnProperty(".gogoproto.gostring")) + object[".gogoproto.gostring"] = message[".gogoproto.gostring"]; + if (message[".gogoproto.populate"] != null && message.hasOwnProperty(".gogoproto.populate")) + object[".gogoproto.populate"] = message[".gogoproto.populate"]; + if (message[".gogoproto.onlyone"] != null && message.hasOwnProperty(".gogoproto.onlyone")) + object[".gogoproto.onlyone"] = message[".gogoproto.onlyone"]; + if (message[".gogoproto.equal"] != null && message.hasOwnProperty(".gogoproto.equal")) + object[".gogoproto.equal"] = message[".gogoproto.equal"]; + if (message[".gogoproto.description"] != null && message.hasOwnProperty(".gogoproto.description")) + object[".gogoproto.description"] = message[".gogoproto.description"]; + if (message[".gogoproto.testgen"] != null && message.hasOwnProperty(".gogoproto.testgen")) + object[".gogoproto.testgen"] = message[".gogoproto.testgen"]; + if (message[".gogoproto.benchgen"] != null && message.hasOwnProperty(".gogoproto.benchgen")) + object[".gogoproto.benchgen"] = message[".gogoproto.benchgen"]; + if (message[".gogoproto.marshaler"] != null && message.hasOwnProperty(".gogoproto.marshaler")) + object[".gogoproto.marshaler"] = message[".gogoproto.marshaler"]; + if (message[".gogoproto.unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unmarshaler")) + object[".gogoproto.unmarshaler"] = message[".gogoproto.unmarshaler"]; + if (message[".gogoproto.stableMarshaler"] != null && message.hasOwnProperty(".gogoproto.stableMarshaler")) + object[".gogoproto.stableMarshaler"] = message[".gogoproto.stableMarshaler"]; + if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) + object[".gogoproto.sizer"] = message[".gogoproto.sizer"]; + if (message[".gogoproto.unsafeMarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafeMarshaler")) + object[".gogoproto.unsafeMarshaler"] = message[".gogoproto.unsafeMarshaler"]; + if (message[".gogoproto.unsafeUnmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafeUnmarshaler")) + object[".gogoproto.unsafeUnmarshaler"] = message[".gogoproto.unsafeUnmarshaler"]; + if (message[".gogoproto.goprotoExtensionsMap"] != null && message.hasOwnProperty(".gogoproto.goprotoExtensionsMap")) + object[".gogoproto.goprotoExtensionsMap"] = message[".gogoproto.goprotoExtensionsMap"]; + if (message[".gogoproto.goprotoUnrecognized"] != null && message.hasOwnProperty(".gogoproto.goprotoUnrecognized")) + object[".gogoproto.goprotoUnrecognized"] = message[".gogoproto.goprotoUnrecognized"]; + if (message[".gogoproto.protosizer"] != null && message.hasOwnProperty(".gogoproto.protosizer")) + object[".gogoproto.protosizer"] = message[".gogoproto.protosizer"]; + if (message[".gogoproto.compare"] != null && message.hasOwnProperty(".gogoproto.compare")) + object[".gogoproto.compare"] = message[".gogoproto.compare"]; + if (message[".gogoproto.typedecl"] != null && message.hasOwnProperty(".gogoproto.typedecl")) + object[".gogoproto.typedecl"] = message[".gogoproto.typedecl"]; + if (message[".gogoproto.messagename"] != null && message.hasOwnProperty(".gogoproto.messagename")) + object[".gogoproto.messagename"] = message[".gogoproto.messagename"]; + if (message[".gogoproto.goprotoSizecache"] != null && message.hasOwnProperty(".gogoproto.goprotoSizecache")) + object[".gogoproto.goprotoSizecache"] = message[".gogoproto.goprotoSizecache"]; + if (message[".gogoproto.goprotoUnkeyed"] != null && message.hasOwnProperty(".gogoproto.goprotoUnkeyed")) + object[".gogoproto.goprotoUnkeyed"] = message[".gogoproto.goprotoUnkeyed"]; + if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) + object[".gogoproto.stringer"] = message[".gogoproto.stringer"]; + if (message[".cosmos_proto.interfaceType"] != null && message.hasOwnProperty(".cosmos_proto.interfaceType")) + object[".cosmos_proto.interfaceType"] = message[".cosmos_proto.interfaceType"]; + if (message[".cosmos_proto.implementsInterface"] != null && message.hasOwnProperty(".cosmos_proto.implementsInterface")) + object[".cosmos_proto.implementsInterface"] = message[".cosmos_proto.implementsInterface"]; + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {string|null} [".cosmos_proto.acceptsInterface"] FieldOptions .cosmos_proto.acceptsInterface + * @property {boolean|null} [".gogoproto.nullable"] FieldOptions .gogoproto.nullable + * @property {boolean|null} [".gogoproto.embed"] FieldOptions .gogoproto.embed + * @property {string|null} [".gogoproto.customtype"] FieldOptions .gogoproto.customtype + * @property {string|null} [".gogoproto.customname"] FieldOptions .gogoproto.customname + * @property {string|null} [".gogoproto.jsontag"] FieldOptions .gogoproto.jsontag + * @property {string|null} [".gogoproto.moretags"] FieldOptions .gogoproto.moretags + * @property {string|null} [".gogoproto.casttype"] FieldOptions .gogoproto.casttype + * @property {string|null} [".gogoproto.castkey"] FieldOptions .gogoproto.castkey + * @property {string|null} [".gogoproto.castvalue"] FieldOptions .gogoproto.castvalue + * @property {boolean|null} [".gogoproto.stdtime"] FieldOptions .gogoproto.stdtime + * @property {boolean|null} [".gogoproto.stdduration"] FieldOptions .gogoproto.stdduration + * @property {boolean|null} [".gogoproto.wktpointer"] FieldOptions .gogoproto.wktpointer + * @property {string|null} [".gogoproto.castrepeated"] FieldOptions .gogoproto.castrepeated + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .cosmos_proto.acceptsInterface. + * @member {string} .cosmos_proto.acceptsInterface + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".cosmos_proto.acceptsInterface"] = ""; + + /** + * FieldOptions .gogoproto.nullable. + * @member {boolean} .gogoproto.nullable + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.nullable"] = false; + + /** + * FieldOptions .gogoproto.embed. + * @member {boolean} .gogoproto.embed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.embed"] = false; + + /** + * FieldOptions .gogoproto.customtype. + * @member {string} .gogoproto.customtype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.customtype"] = ""; + + /** + * FieldOptions .gogoproto.customname. + * @member {string} .gogoproto.customname + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.customname"] = ""; + + /** + * FieldOptions .gogoproto.jsontag. + * @member {string} .gogoproto.jsontag + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.jsontag"] = ""; + + /** + * FieldOptions .gogoproto.moretags. + * @member {string} .gogoproto.moretags + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.moretags"] = ""; + + /** + * FieldOptions .gogoproto.casttype. + * @member {string} .gogoproto.casttype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.casttype"] = ""; + + /** + * FieldOptions .gogoproto.castkey. + * @member {string} .gogoproto.castkey + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.castkey"] = ""; + + /** + * FieldOptions .gogoproto.castvalue. + * @member {string} .gogoproto.castvalue + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.castvalue"] = ""; + + /** + * FieldOptions .gogoproto.stdtime. + * @member {boolean} .gogoproto.stdtime + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.stdtime"] = false; + + /** + * FieldOptions .gogoproto.stdduration. + * @member {boolean} .gogoproto.stdduration + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.stdduration"] = false; + + /** + * FieldOptions .gogoproto.wktpointer. + * @member {boolean} .gogoproto.wktpointer + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.wktpointer"] = false; + + /** + * FieldOptions .gogoproto.castrepeated. + * @member {string} .gogoproto.castrepeated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".gogoproto.castrepeated"] = ""; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".gogoproto.nullable"] != null && Object.hasOwnProperty.call(message, ".gogoproto.nullable")) + writer.uint32(/* id 65001, wireType 0 =*/520008).bool(message[".gogoproto.nullable"]); + if (message[".gogoproto.embed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.embed")) + writer.uint32(/* id 65002, wireType 0 =*/520016).bool(message[".gogoproto.embed"]); + if (message[".gogoproto.customtype"] != null && Object.hasOwnProperty.call(message, ".gogoproto.customtype")) + writer.uint32(/* id 65003, wireType 2 =*/520026).string(message[".gogoproto.customtype"]); + if (message[".gogoproto.customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.customname")) + writer.uint32(/* id 65004, wireType 2 =*/520034).string(message[".gogoproto.customname"]); + if (message[".gogoproto.jsontag"] != null && Object.hasOwnProperty.call(message, ".gogoproto.jsontag")) + writer.uint32(/* id 65005, wireType 2 =*/520042).string(message[".gogoproto.jsontag"]); + if (message[".gogoproto.moretags"] != null && Object.hasOwnProperty.call(message, ".gogoproto.moretags")) + writer.uint32(/* id 65006, wireType 2 =*/520050).string(message[".gogoproto.moretags"]); + if (message[".gogoproto.casttype"] != null && Object.hasOwnProperty.call(message, ".gogoproto.casttype")) + writer.uint32(/* id 65007, wireType 2 =*/520058).string(message[".gogoproto.casttype"]); + if (message[".gogoproto.castkey"] != null && Object.hasOwnProperty.call(message, ".gogoproto.castkey")) + writer.uint32(/* id 65008, wireType 2 =*/520066).string(message[".gogoproto.castkey"]); + if (message[".gogoproto.castvalue"] != null && Object.hasOwnProperty.call(message, ".gogoproto.castvalue")) + writer.uint32(/* id 65009, wireType 2 =*/520074).string(message[".gogoproto.castvalue"]); + if (message[".gogoproto.stdtime"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stdtime")) + writer.uint32(/* id 65010, wireType 0 =*/520080).bool(message[".gogoproto.stdtime"]); + if (message[".gogoproto.stdduration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stdduration")) + writer.uint32(/* id 65011, wireType 0 =*/520088).bool(message[".gogoproto.stdduration"]); + if (message[".gogoproto.wktpointer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.wktpointer")) + writer.uint32(/* id 65012, wireType 0 =*/520096).bool(message[".gogoproto.wktpointer"]); + if (message[".gogoproto.castrepeated"] != null && Object.hasOwnProperty.call(message, ".gogoproto.castrepeated")) + writer.uint32(/* id 65013, wireType 2 =*/520106).string(message[".gogoproto.castrepeated"]); + if (message[".cosmos_proto.acceptsInterface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.acceptsInterface")) + writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.acceptsInterface"]); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.ctype = reader.int32(); + break; + case 2: + message.packed = reader.bool(); + break; + case 6: + message.jstype = reader.int32(); + break; + case 5: + message.lazy = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 10: + message.weak = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 93001: + message[".cosmos_proto.acceptsInterface"] = reader.string(); + break; + case 65001: + message[".gogoproto.nullable"] = reader.bool(); + break; + case 65002: + message[".gogoproto.embed"] = reader.bool(); + break; + case 65003: + message[".gogoproto.customtype"] = reader.string(); + break; + case 65004: + message[".gogoproto.customname"] = reader.string(); + break; + case 65005: + message[".gogoproto.jsontag"] = reader.string(); + break; + case 65006: + message[".gogoproto.moretags"] = reader.string(); + break; + case 65007: + message[".gogoproto.casttype"] = reader.string(); + break; + case 65008: + message[".gogoproto.castkey"] = reader.string(); + break; + case 65009: + message[".gogoproto.castvalue"] = reader.string(); + break; + case 65010: + message[".gogoproto.stdtime"] = reader.bool(); + break; + case 65011: + message[".gogoproto.stdduration"] = reader.bool(); + break; + case 65012: + message[".gogoproto.wktpointer"] = reader.bool(); + break; + case 65013: + message[".gogoproto.castrepeated"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".cosmos_proto.acceptsInterface"] != null && message.hasOwnProperty(".cosmos_proto.acceptsInterface")) + if (!$util.isString(message[".cosmos_proto.acceptsInterface"])) + return ".cosmos_proto.acceptsInterface: string expected"; + if (message[".gogoproto.nullable"] != null && message.hasOwnProperty(".gogoproto.nullable")) + if (typeof message[".gogoproto.nullable"] !== "boolean") + return ".gogoproto.nullable: boolean expected"; + if (message[".gogoproto.embed"] != null && message.hasOwnProperty(".gogoproto.embed")) + if (typeof message[".gogoproto.embed"] !== "boolean") + return ".gogoproto.embed: boolean expected"; + if (message[".gogoproto.customtype"] != null && message.hasOwnProperty(".gogoproto.customtype")) + if (!$util.isString(message[".gogoproto.customtype"])) + return ".gogoproto.customtype: string expected"; + if (message[".gogoproto.customname"] != null && message.hasOwnProperty(".gogoproto.customname")) + if (!$util.isString(message[".gogoproto.customname"])) + return ".gogoproto.customname: string expected"; + if (message[".gogoproto.jsontag"] != null && message.hasOwnProperty(".gogoproto.jsontag")) + if (!$util.isString(message[".gogoproto.jsontag"])) + return ".gogoproto.jsontag: string expected"; + if (message[".gogoproto.moretags"] != null && message.hasOwnProperty(".gogoproto.moretags")) + if (!$util.isString(message[".gogoproto.moretags"])) + return ".gogoproto.moretags: string expected"; + if (message[".gogoproto.casttype"] != null && message.hasOwnProperty(".gogoproto.casttype")) + if (!$util.isString(message[".gogoproto.casttype"])) + return ".gogoproto.casttype: string expected"; + if (message[".gogoproto.castkey"] != null && message.hasOwnProperty(".gogoproto.castkey")) + if (!$util.isString(message[".gogoproto.castkey"])) + return ".gogoproto.castkey: string expected"; + if (message[".gogoproto.castvalue"] != null && message.hasOwnProperty(".gogoproto.castvalue")) + if (!$util.isString(message[".gogoproto.castvalue"])) + return ".gogoproto.castvalue: string expected"; + if (message[".gogoproto.stdtime"] != null && message.hasOwnProperty(".gogoproto.stdtime")) + if (typeof message[".gogoproto.stdtime"] !== "boolean") + return ".gogoproto.stdtime: boolean expected"; + if (message[".gogoproto.stdduration"] != null && message.hasOwnProperty(".gogoproto.stdduration")) + if (typeof message[".gogoproto.stdduration"] !== "boolean") + return ".gogoproto.stdduration: boolean expected"; + if (message[".gogoproto.wktpointer"] != null && message.hasOwnProperty(".gogoproto.wktpointer")) + if (typeof message[".gogoproto.wktpointer"] !== "boolean") + return ".gogoproto.wktpointer: boolean expected"; + if (message[".gogoproto.castrepeated"] != null && message.hasOwnProperty(".gogoproto.castrepeated")) + if (!$util.isString(message[".gogoproto.castrepeated"])) + return ".gogoproto.castrepeated: string expected"; + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".cosmos_proto.acceptsInterface"] != null) + message[".cosmos_proto.acceptsInterface"] = String(object[".cosmos_proto.acceptsInterface"]); + if (object[".gogoproto.nullable"] != null) + message[".gogoproto.nullable"] = Boolean(object[".gogoproto.nullable"]); + if (object[".gogoproto.embed"] != null) + message[".gogoproto.embed"] = Boolean(object[".gogoproto.embed"]); + if (object[".gogoproto.customtype"] != null) + message[".gogoproto.customtype"] = String(object[".gogoproto.customtype"]); + if (object[".gogoproto.customname"] != null) + message[".gogoproto.customname"] = String(object[".gogoproto.customname"]); + if (object[".gogoproto.jsontag"] != null) + message[".gogoproto.jsontag"] = String(object[".gogoproto.jsontag"]); + if (object[".gogoproto.moretags"] != null) + message[".gogoproto.moretags"] = String(object[".gogoproto.moretags"]); + if (object[".gogoproto.casttype"] != null) + message[".gogoproto.casttype"] = String(object[".gogoproto.casttype"]); + if (object[".gogoproto.castkey"] != null) + message[".gogoproto.castkey"] = String(object[".gogoproto.castkey"]); + if (object[".gogoproto.castvalue"] != null) + message[".gogoproto.castvalue"] = String(object[".gogoproto.castvalue"]); + if (object[".gogoproto.stdtime"] != null) + message[".gogoproto.stdtime"] = Boolean(object[".gogoproto.stdtime"]); + if (object[".gogoproto.stdduration"] != null) + message[".gogoproto.stdduration"] = Boolean(object[".gogoproto.stdduration"]); + if (object[".gogoproto.wktpointer"] != null) + message[".gogoproto.wktpointer"] = Boolean(object[".gogoproto.wktpointer"]); + if (object[".gogoproto.castrepeated"] != null) + message[".gogoproto.castrepeated"] = String(object[".gogoproto.castrepeated"]); + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object[".gogoproto.nullable"] = false; + object[".gogoproto.embed"] = false; + object[".gogoproto.customtype"] = ""; + object[".gogoproto.customname"] = ""; + object[".gogoproto.jsontag"] = ""; + object[".gogoproto.moretags"] = ""; + object[".gogoproto.casttype"] = ""; + object[".gogoproto.castkey"] = ""; + object[".gogoproto.castvalue"] = ""; + object[".gogoproto.stdtime"] = false; + object[".gogoproto.stdduration"] = false; + object[".gogoproto.wktpointer"] = false; + object[".gogoproto.castrepeated"] = ""; + object[".cosmos_proto.acceptsInterface"] = ""; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".gogoproto.nullable"] != null && message.hasOwnProperty(".gogoproto.nullable")) + object[".gogoproto.nullable"] = message[".gogoproto.nullable"]; + if (message[".gogoproto.embed"] != null && message.hasOwnProperty(".gogoproto.embed")) + object[".gogoproto.embed"] = message[".gogoproto.embed"]; + if (message[".gogoproto.customtype"] != null && message.hasOwnProperty(".gogoproto.customtype")) + object[".gogoproto.customtype"] = message[".gogoproto.customtype"]; + if (message[".gogoproto.customname"] != null && message.hasOwnProperty(".gogoproto.customname")) + object[".gogoproto.customname"] = message[".gogoproto.customname"]; + if (message[".gogoproto.jsontag"] != null && message.hasOwnProperty(".gogoproto.jsontag")) + object[".gogoproto.jsontag"] = message[".gogoproto.jsontag"]; + if (message[".gogoproto.moretags"] != null && message.hasOwnProperty(".gogoproto.moretags")) + object[".gogoproto.moretags"] = message[".gogoproto.moretags"]; + if (message[".gogoproto.casttype"] != null && message.hasOwnProperty(".gogoproto.casttype")) + object[".gogoproto.casttype"] = message[".gogoproto.casttype"]; + if (message[".gogoproto.castkey"] != null && message.hasOwnProperty(".gogoproto.castkey")) + object[".gogoproto.castkey"] = message[".gogoproto.castkey"]; + if (message[".gogoproto.castvalue"] != null && message.hasOwnProperty(".gogoproto.castvalue")) + object[".gogoproto.castvalue"] = message[".gogoproto.castvalue"]; + if (message[".gogoproto.stdtime"] != null && message.hasOwnProperty(".gogoproto.stdtime")) + object[".gogoproto.stdtime"] = message[".gogoproto.stdtime"]; + if (message[".gogoproto.stdduration"] != null && message.hasOwnProperty(".gogoproto.stdduration")) + object[".gogoproto.stdduration"] = message[".gogoproto.stdduration"]; + if (message[".gogoproto.wktpointer"] != null && message.hasOwnProperty(".gogoproto.wktpointer")) + object[".gogoproto.wktpointer"] = message[".gogoproto.wktpointer"]; + if (message[".gogoproto.castrepeated"] != null && message.hasOwnProperty(".gogoproto.castrepeated")) + object[".gogoproto.castrepeated"] = message[".gogoproto.castrepeated"]; + if (message[".cosmos_proto.acceptsInterface"] != null && message.hasOwnProperty(".cosmos_proto.acceptsInterface")) + object[".cosmos_proto.acceptsInterface"] = message[".cosmos_proto.acceptsInterface"]; + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + * @property {boolean|null} [".gogoproto.goprotoEnumPrefix"] EnumOptions .gogoproto.goprotoEnumPrefix + * @property {boolean|null} [".gogoproto.goprotoEnumStringer"] EnumOptions .gogoproto.goprotoEnumStringer + * @property {boolean|null} [".gogoproto.enumStringer"] EnumOptions .gogoproto.enumStringer + * @property {string|null} [".gogoproto.enumCustomname"] EnumOptions .gogoproto.enumCustomname + * @property {boolean|null} [".gogoproto.enumdecl"] EnumOptions .gogoproto.enumdecl + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * EnumOptions .gogoproto.goprotoEnumPrefix. + * @member {boolean} .gogoproto.goprotoEnumPrefix + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype[".gogoproto.goprotoEnumPrefix"] = false; + + /** + * EnumOptions .gogoproto.goprotoEnumStringer. + * @member {boolean} .gogoproto.goprotoEnumStringer + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype[".gogoproto.goprotoEnumStringer"] = false; + + /** + * EnumOptions .gogoproto.enumStringer. + * @member {boolean} .gogoproto.enumStringer + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype[".gogoproto.enumStringer"] = false; + + /** + * EnumOptions .gogoproto.enumCustomname. + * @member {string} .gogoproto.enumCustomname + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype[".gogoproto.enumCustomname"] = ""; + + /** + * EnumOptions .gogoproto.enumdecl. + * @member {boolean} .gogoproto.enumdecl + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype[".gogoproto.enumdecl"] = false; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".gogoproto.goprotoEnumPrefix"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoEnumPrefix")) + writer.uint32(/* id 62001, wireType 0 =*/496008).bool(message[".gogoproto.goprotoEnumPrefix"]); + if (message[".gogoproto.goprotoEnumStringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoEnumStringer")) + writer.uint32(/* id 62021, wireType 0 =*/496168).bool(message[".gogoproto.goprotoEnumStringer"]); + if (message[".gogoproto.enumStringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumStringer")) + writer.uint32(/* id 62022, wireType 0 =*/496176).bool(message[".gogoproto.enumStringer"]); + if (message[".gogoproto.enumCustomname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumCustomname")) + writer.uint32(/* id 62023, wireType 2 =*/496186).string(message[".gogoproto.enumCustomname"]); + if (message[".gogoproto.enumdecl"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdecl")) + writer.uint32(/* id 62024, wireType 0 =*/496192).bool(message[".gogoproto.enumdecl"]); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.allowAlias = reader.bool(); + break; + case 3: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 62001: + message[".gogoproto.goprotoEnumPrefix"] = reader.bool(); + break; + case 62021: + message[".gogoproto.goprotoEnumStringer"] = reader.bool(); + break; + case 62022: + message[".gogoproto.enumStringer"] = reader.bool(); + break; + case 62023: + message[".gogoproto.enumCustomname"] = reader.string(); + break; + case 62024: + message[".gogoproto.enumdecl"] = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".gogoproto.goprotoEnumPrefix"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumPrefix")) + if (typeof message[".gogoproto.goprotoEnumPrefix"] !== "boolean") + return ".gogoproto.goprotoEnumPrefix: boolean expected"; + if (message[".gogoproto.goprotoEnumStringer"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumStringer")) + if (typeof message[".gogoproto.goprotoEnumStringer"] !== "boolean") + return ".gogoproto.goprotoEnumStringer: boolean expected"; + if (message[".gogoproto.enumStringer"] != null && message.hasOwnProperty(".gogoproto.enumStringer")) + if (typeof message[".gogoproto.enumStringer"] !== "boolean") + return ".gogoproto.enumStringer: boolean expected"; + if (message[".gogoproto.enumCustomname"] != null && message.hasOwnProperty(".gogoproto.enumCustomname")) + if (!$util.isString(message[".gogoproto.enumCustomname"])) + return ".gogoproto.enumCustomname: string expected"; + if (message[".gogoproto.enumdecl"] != null && message.hasOwnProperty(".gogoproto.enumdecl")) + if (typeof message[".gogoproto.enumdecl"] !== "boolean") + return ".gogoproto.enumdecl: boolean expected"; + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".gogoproto.goprotoEnumPrefix"] != null) + message[".gogoproto.goprotoEnumPrefix"] = Boolean(object[".gogoproto.goprotoEnumPrefix"]); + if (object[".gogoproto.goprotoEnumStringer"] != null) + message[".gogoproto.goprotoEnumStringer"] = Boolean(object[".gogoproto.goprotoEnumStringer"]); + if (object[".gogoproto.enumStringer"] != null) + message[".gogoproto.enumStringer"] = Boolean(object[".gogoproto.enumStringer"]); + if (object[".gogoproto.enumCustomname"] != null) + message[".gogoproto.enumCustomname"] = String(object[".gogoproto.enumCustomname"]); + if (object[".gogoproto.enumdecl"] != null) + message[".gogoproto.enumdecl"] = Boolean(object[".gogoproto.enumdecl"]); + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object[".gogoproto.goprotoEnumPrefix"] = false; + object[".gogoproto.goprotoEnumStringer"] = false; + object[".gogoproto.enumStringer"] = false; + object[".gogoproto.enumCustomname"] = ""; + object[".gogoproto.enumdecl"] = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".gogoproto.goprotoEnumPrefix"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumPrefix")) + object[".gogoproto.goprotoEnumPrefix"] = message[".gogoproto.goprotoEnumPrefix"]; + if (message[".gogoproto.goprotoEnumStringer"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumStringer")) + object[".gogoproto.goprotoEnumStringer"] = message[".gogoproto.goprotoEnumStringer"]; + if (message[".gogoproto.enumStringer"] != null && message.hasOwnProperty(".gogoproto.enumStringer")) + object[".gogoproto.enumStringer"] = message[".gogoproto.enumStringer"]; + if (message[".gogoproto.enumCustomname"] != null && message.hasOwnProperty(".gogoproto.enumCustomname")) + object[".gogoproto.enumCustomname"] = message[".gogoproto.enumCustomname"]; + if (message[".gogoproto.enumdecl"] != null && message.hasOwnProperty(".gogoproto.enumdecl")) + object[".gogoproto.enumdecl"] = message[".gogoproto.enumdecl"]; + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + * @property {string|null} [".gogoproto.enumvalueCustomname"] EnumValueOptions .gogoproto.enumvalueCustomname + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * EnumValueOptions .gogoproto.enumvalueCustomname. + * @member {string} .gogoproto.enumvalueCustomname + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype[".gogoproto.enumvalueCustomname"] = ""; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".gogoproto.enumvalueCustomname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumvalueCustomname")) + writer.uint32(/* id 66001, wireType 2 =*/528010).string(message[".gogoproto.enumvalueCustomname"]); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + case 66001: + message[".gogoproto.enumvalueCustomname"] = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".gogoproto.enumvalueCustomname"] != null && message.hasOwnProperty(".gogoproto.enumvalueCustomname")) + if (!$util.isString(message[".gogoproto.enumvalueCustomname"])) + return ".gogoproto.enumvalueCustomname: string expected"; + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".gogoproto.enumvalueCustomname"] != null) + message[".gogoproto.enumvalueCustomname"] = String(object[".gogoproto.enumvalueCustomname"]); + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".gogoproto.enumvalueCustomname"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".gogoproto.enumvalueCustomname"] != null && message.hasOwnProperty(".gogoproto.enumvalueCustomname")) + object[".gogoproto.enumvalueCustomname"] = message[".gogoproto.enumvalueCustomname"]; + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: + message.deprecated = reader.bool(); + break; + case 999: + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + case 3: + message.identifierValue = reader.string(); + break; + case 4: + message.positiveIntValue = reader.uint64(); + break; + case 5: + message.negativeIntValue = reader.int64(); + break; + case 6: + message.doubleValue = reader.double(); + break; + case 7: + message.stringValue = reader.bytes(); + break; + case 8: + message.aggregateValue = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.namePart = reader.string(); + break; + case 2: + message.isExtension = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + case 3: + message.leadingComments = reader.string(); + break; + case 4: + message.trailingComments = reader.string(); + break; + case 6: + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + case 2: + message.sourceFile = reader.string(); + break; + case 3: + message.begin = reader.int32(); + break; + case 4: + message.end = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Timestamp; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.seconds = reader.int64(); + break; + case 2: + message.nanos = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return Duration; + })(); + + return protobuf; + })(); + + return google; +})(); + +module.exports = $root; From 8a8473e3f0e607ec58cd587dfa19097b7b8dd917 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 11:29:53 +0100 Subject: [PATCH 06/41] protobuf-demo: Add placeholder src files --- packages/protobuf-demo/src/demo.spec.ts | 5 +++++ packages/protobuf-demo/src/demo.ts | 0 packages/protobuf-demo/types/demo.d.ts | 0 3 files changed, 5 insertions(+) create mode 100644 packages/protobuf-demo/src/demo.spec.ts create mode 100644 packages/protobuf-demo/src/demo.ts create mode 100644 packages/protobuf-demo/types/demo.d.ts diff --git a/packages/protobuf-demo/src/demo.spec.ts b/packages/protobuf-demo/src/demo.spec.ts new file mode 100644 index 00000000..d1da48ef --- /dev/null +++ b/packages/protobuf-demo/src/demo.spec.ts @@ -0,0 +1,5 @@ +describe("demo", () => { + it("runs", () => { + expect(true).toEqual(false); + }); +}); diff --git a/packages/protobuf-demo/src/demo.ts b/packages/protobuf-demo/src/demo.ts new file mode 100644 index 00000000..e69de29b diff --git a/packages/protobuf-demo/types/demo.d.ts b/packages/protobuf-demo/types/demo.d.ts new file mode 100644 index 00000000..e69de29b From 62e599940adfaf19afb1653e74cfce195ace9430 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 12:27:57 +0100 Subject: [PATCH 07/41] protobuf-demo: Update build script --- packages/protobuf-demo/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/protobuf-demo/package.json b/packages/protobuf-demo/package.json index cdb1a478..c46178f3 100644 --- a/packages/protobuf-demo/package.json +++ b/packages/protobuf-demo/package.json @@ -25,7 +25,7 @@ "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 && yarn move-types && yarn format-types", + "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", From 64af531b957b1afb6c1f4a9b124b86afabb3bdf5 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 12:53:10 +0100 Subject: [PATCH 08/41] protobuf-demo: Add @cosmjs/utils dependency --- packages/protobuf-demo/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/protobuf-demo/package.json b/packages/protobuf-demo/package.json index c46178f3..442bfdf2 100644 --- a/packages/protobuf-demo/package.json +++ b/packages/protobuf-demo/package.json @@ -38,6 +38,7 @@ "define-proto": "pbts src/generated/codecimpl.js -o src/generated/codecimpl.d.ts" }, "devDependencies": { + "@cosmjs/utils": "^0.20.0", "protobufjs": "^6.9.0" } } From 2c2d637ae48f4c249fe3af0622f346e3a8945a1b Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 13:45:04 +0100 Subject: [PATCH 09/41] protobuf-demo: Add generated types --- .../types/generated/codecimpl.d.ts | 25439 ++++++++++++++++ 1 file changed, 25439 insertions(+) create mode 100644 packages/protobuf-demo/types/generated/codecimpl.d.ts diff --git a/packages/protobuf-demo/types/generated/codecimpl.d.ts b/packages/protobuf-demo/types/generated/codecimpl.d.ts new file mode 100644 index 00000000..15ba3fec --- /dev/null +++ b/packages/protobuf-demo/types/generated/codecimpl.d.ts @@ -0,0 +1,25439 @@ +import * as $protobuf from "protobufjs"; +/** Namespace cosmos_sdk. */ +export namespace cosmos_sdk { + /** Namespace codec. */ + namespace codec { + /** Namespace v1. */ + namespace v1 { + /** Properties of a Dog. */ + interface IDog { + /** Dog size */ + size?: string | null; + + /** Dog name */ + name?: string | null; + } + + /** Represents a Dog. */ + class Dog implements IDog { + /** + * Constructs a new Dog. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IDog); + + /** Dog size. */ + public size: string; + + /** Dog name. */ + public name: string; + + /** + * Creates a new Dog instance using the specified properties. + * @param [properties] Properties to set + * @returns Dog instance + */ + public static create(properties?: cosmos_sdk.codec.v1.IDog): cosmos_sdk.codec.v1.Dog; + + /** + * Encodes the specified Dog message. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. + * @param message Dog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.IDog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dog message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. + * @param message Dog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.codec.v1.IDog, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Dog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.codec.v1.Dog; + + /** + * Decodes a Dog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.codec.v1.Dog; + + /** + * Verifies a Dog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Dog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dog + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.Dog; + + /** + * Creates a plain object from a Dog message. Also converts values to other types if specified. + * @param message Dog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.codec.v1.Dog, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Dog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Cat. */ + interface ICat { + /** Cat moniker */ + moniker?: string | null; + + /** Cat lives */ + lives?: number | null; + } + + /** Represents a Cat. */ + class Cat implements ICat { + /** + * Constructs a new Cat. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.ICat); + + /** Cat moniker. */ + public moniker: string; + + /** Cat lives. */ + public lives: number; + + /** + * Creates a new Cat instance using the specified properties. + * @param [properties] Properties to set + * @returns Cat instance + */ + public static create(properties?: cosmos_sdk.codec.v1.ICat): cosmos_sdk.codec.v1.Cat; + + /** + * Encodes the specified Cat message. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. + * @param message Cat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.codec.v1.ICat, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Cat message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. + * @param message Cat message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.codec.v1.ICat, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Cat message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Cat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.codec.v1.Cat; + + /** + * Decodes a Cat message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Cat + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.codec.v1.Cat; + + /** + * Verifies a Cat message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Cat message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Cat + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.Cat; + + /** + * Creates a plain object from a Cat message. Also converts values to other types if specified. + * @param message Cat + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.codec.v1.Cat, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Cat to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HasAnimal. */ + interface IHasAnimal { + /** HasAnimal animal */ + animal?: google.protobuf.IAny | null; + + /** HasAnimal x */ + x?: number | Long | null; + } + + /** Represents a HasAnimal. */ + class HasAnimal implements IHasAnimal { + /** + * Constructs a new HasAnimal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IHasAnimal); + + /** HasAnimal animal. */ + public animal?: google.protobuf.IAny | null; + + /** HasAnimal x. */ + public x: number | Long; + + /** + * Creates a new HasAnimal instance using the specified properties. + * @param [properties] Properties to set + * @returns HasAnimal instance + */ + public static create(properties?: cosmos_sdk.codec.v1.IHasAnimal): cosmos_sdk.codec.v1.HasAnimal; + + /** + * Encodes the specified HasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. + * @param message HasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.codec.v1.IHasAnimal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified HasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. + * @param message HasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.codec.v1.IHasAnimal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a HasAnimal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.codec.v1.HasAnimal; + + /** + * Decodes a HasAnimal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.codec.v1.HasAnimal; + + /** + * Verifies a HasAnimal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a HasAnimal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HasAnimal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasAnimal; + + /** + * Creates a plain object from a HasAnimal message. Also converts values to other types if specified. + * @param message HasAnimal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.codec.v1.HasAnimal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this HasAnimal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HasHasAnimal. */ + interface IHasHasAnimal { + /** HasHasAnimal hasAnimal */ + hasAnimal?: google.protobuf.IAny | null; + } + + /** Represents a HasHasAnimal. */ + class HasHasAnimal implements IHasHasAnimal { + /** + * Constructs a new HasHasAnimal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IHasHasAnimal); + + /** HasHasAnimal hasAnimal. */ + public hasAnimal?: google.protobuf.IAny | null; + + /** + * Creates a new HasHasAnimal instance using the specified properties. + * @param [properties] Properties to set + * @returns HasHasAnimal instance + */ + public static create( + properties?: cosmos_sdk.codec.v1.IHasHasAnimal, + ): cosmos_sdk.codec.v1.HasHasAnimal; + + /** + * Encodes the specified HasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. + * @param message HasHasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.codec.v1.IHasHasAnimal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified HasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. + * @param message HasHasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.codec.v1.IHasHasAnimal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a HasHasAnimal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.codec.v1.HasHasAnimal; + + /** + * Decodes a HasHasAnimal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.codec.v1.HasHasAnimal; + + /** + * Verifies a HasHasAnimal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a HasHasAnimal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HasHasAnimal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasHasAnimal; + + /** + * Creates a plain object from a HasHasAnimal message. Also converts values to other types if specified. + * @param message HasHasAnimal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.codec.v1.HasHasAnimal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this HasHasAnimal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HasHasHasAnimal. */ + interface IHasHasHasAnimal { + /** HasHasHasAnimal hasHasAnimal */ + hasHasAnimal?: google.protobuf.IAny | null; + } + + /** Represents a HasHasHasAnimal. */ + class HasHasHasAnimal implements IHasHasHasAnimal { + /** + * Constructs a new HasHasHasAnimal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IHasHasHasAnimal); + + /** HasHasHasAnimal hasHasAnimal. */ + public hasHasAnimal?: google.protobuf.IAny | null; + + /** + * Creates a new HasHasHasAnimal instance using the specified properties. + * @param [properties] Properties to set + * @returns HasHasHasAnimal instance + */ + public static create( + properties?: cosmos_sdk.codec.v1.IHasHasHasAnimal, + ): cosmos_sdk.codec.v1.HasHasHasAnimal; + + /** + * Encodes the specified HasHasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. + * @param message HasHasHasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.codec.v1.IHasHasHasAnimal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified HasHasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. + * @param message HasHasHasAnimal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.codec.v1.IHasHasHasAnimal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a HasHasHasAnimal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HasHasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.codec.v1.HasHasHasAnimal; + + /** + * Decodes a HasHasHasAnimal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HasHasHasAnimal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.codec.v1.HasHasHasAnimal; + + /** + * Verifies a HasHasHasAnimal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a HasHasHasAnimal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HasHasHasAnimal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasHasHasAnimal; + + /** + * Creates a plain object from a HasHasHasAnimal message. Also converts values to other types if specified. + * @param message HasHasHasAnimal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.codec.v1.HasHasHasAnimal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this HasHasHasAnimal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Represents a TestService */ + class TestService extends $protobuf.rpc.Service { + /** + * Constructs a new TestService 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 TestService 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, + ): TestService; + + /** + * Calls Echo. + * @param request EchoRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EchoResponse + */ + public echo( + request: cosmos_sdk.codec.v1.IEchoRequest, + callback: cosmos_sdk.codec.v1.TestService.EchoCallback, + ): void; + + /** + * Calls Echo. + * @param request EchoRequest message or plain object + * @returns Promise + */ + public echo(request: cosmos_sdk.codec.v1.IEchoRequest): Promise; + + /** + * Calls SayHello. + * @param request SayHelloRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SayHelloResponse + */ + public sayHello( + request: cosmos_sdk.codec.v1.ISayHelloRequest, + callback: cosmos_sdk.codec.v1.TestService.SayHelloCallback, + ): void; + + /** + * Calls SayHello. + * @param request SayHelloRequest message or plain object + * @returns Promise + */ + public sayHello( + request: cosmos_sdk.codec.v1.ISayHelloRequest, + ): Promise; + } + + namespace TestService { + /** + * Callback as used by {@link cosmos_sdk.codec.v1.TestService#echo}. + * @param error Error, if any + * @param [response] EchoResponse + */ + type EchoCallback = (error: Error | null, response?: cosmos_sdk.codec.v1.EchoResponse) => void; + + /** + * Callback as used by {@link cosmos_sdk.codec.v1.TestService#sayHello}. + * @param error Error, if any + * @param [response] SayHelloResponse + */ + type SayHelloCallback = ( + error: Error | null, + response?: cosmos_sdk.codec.v1.SayHelloResponse, + ) => void; + } + + /** Properties of an EchoRequest. */ + interface IEchoRequest { + /** EchoRequest message */ + message?: string | null; + } + + /** Represents an EchoRequest. */ + class EchoRequest implements IEchoRequest { + /** + * Constructs a new EchoRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IEchoRequest); + + /** EchoRequest message. */ + public message: string; + + /** + * Creates a new EchoRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns EchoRequest instance + */ + public static create(properties?: cosmos_sdk.codec.v1.IEchoRequest): cosmos_sdk.codec.v1.EchoRequest; + + /** + * Encodes the specified EchoRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. + * @param message EchoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.codec.v1.IEchoRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified EchoRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. + * @param message EchoRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.codec.v1.IEchoRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an EchoRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EchoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.codec.v1.EchoRequest; + + /** + * Decodes an EchoRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EchoRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.codec.v1.EchoRequest; + + /** + * Verifies an EchoRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an EchoRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EchoRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.EchoRequest; + + /** + * Creates a plain object from an EchoRequest message. Also converts values to other types if specified. + * @param message EchoRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.codec.v1.EchoRequest, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this EchoRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EchoResponse. */ + interface IEchoResponse { + /** EchoResponse message */ + message?: string | null; + } + + /** Represents an EchoResponse. */ + class EchoResponse implements IEchoResponse { + /** + * Constructs a new EchoResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.IEchoResponse); + + /** EchoResponse message. */ + public message: string; + + /** + * Creates a new EchoResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns EchoResponse instance + */ + public static create( + properties?: cosmos_sdk.codec.v1.IEchoResponse, + ): cosmos_sdk.codec.v1.EchoResponse; + + /** + * Encodes the specified EchoResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. + * @param message EchoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.codec.v1.IEchoResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified EchoResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. + * @param message EchoResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.codec.v1.IEchoResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an EchoResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EchoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.codec.v1.EchoResponse; + + /** + * Decodes an EchoResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EchoResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.codec.v1.EchoResponse; + + /** + * Verifies an EchoResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an EchoResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EchoResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.EchoResponse; + + /** + * Creates a plain object from an EchoResponse message. Also converts values to other types if specified. + * @param message EchoResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.codec.v1.EchoResponse, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this EchoResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SayHelloRequest. */ + interface ISayHelloRequest { + /** SayHelloRequest name */ + name?: string | null; + } + + /** Represents a SayHelloRequest. */ + class SayHelloRequest implements ISayHelloRequest { + /** + * Constructs a new SayHelloRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.ISayHelloRequest); + + /** SayHelloRequest name. */ + public name: string; + + /** + * Creates a new SayHelloRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SayHelloRequest instance + */ + public static create( + properties?: cosmos_sdk.codec.v1.ISayHelloRequest, + ): cosmos_sdk.codec.v1.SayHelloRequest; + + /** + * Encodes the specified SayHelloRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. + * @param message SayHelloRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.codec.v1.ISayHelloRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SayHelloRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. + * @param message SayHelloRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.codec.v1.ISayHelloRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SayHelloRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SayHelloRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.codec.v1.SayHelloRequest; + + /** + * Decodes a SayHelloRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SayHelloRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.codec.v1.SayHelloRequest; + + /** + * Verifies a SayHelloRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a SayHelloRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SayHelloRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.SayHelloRequest; + + /** + * Creates a plain object from a SayHelloRequest message. Also converts values to other types if specified. + * @param message SayHelloRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.codec.v1.SayHelloRequest, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SayHelloRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SayHelloResponse. */ + interface ISayHelloResponse { + /** SayHelloResponse greeting */ + greeting?: string | null; + } + + /** Represents a SayHelloResponse. */ + class SayHelloResponse implements ISayHelloResponse { + /** + * Constructs a new SayHelloResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.codec.v1.ISayHelloResponse); + + /** SayHelloResponse greeting. */ + public greeting: string; + + /** + * Creates a new SayHelloResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SayHelloResponse instance + */ + public static create( + properties?: cosmos_sdk.codec.v1.ISayHelloResponse, + ): cosmos_sdk.codec.v1.SayHelloResponse; + + /** + * Encodes the specified SayHelloResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. + * @param message SayHelloResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.codec.v1.ISayHelloResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SayHelloResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. + * @param message SayHelloResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.codec.v1.ISayHelloResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SayHelloResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SayHelloResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.codec.v1.SayHelloResponse; + + /** + * Decodes a SayHelloResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SayHelloResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.codec.v1.SayHelloResponse; + + /** + * Verifies a SayHelloResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a SayHelloResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SayHelloResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.SayHelloResponse; + + /** + * Creates a plain object from a SayHelloResponse message. Also converts values to other types if specified. + * @param message SayHelloResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.codec.v1.SayHelloResponse, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SayHelloResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.crypto.v1.IPublicKey, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. + * @param message PublicKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.crypto.v1.IPublicKey, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.crypto.v1.PublicKey; + + /** + * Decodes a PublicKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.crypto.v1.PublicKey; + + /** + * Verifies a PublicKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublicKey + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.PublicKey; + + /** + * Creates a plain object from a PublicKey message. Also converts values to other types if specified. + * @param message PublicKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.crypto.v1.PublicKey, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this PublicKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PubKeyMultisigThreshold. */ + interface IPubKeyMultisigThreshold { + /** PubKeyMultisigThreshold threshold */ + threshold?: number | null; + + /** PubKeyMultisigThreshold pubkeys */ + pubkeys?: cosmos_sdk.crypto.v1.IPublicKey[] | null; + } + + /** Represents a PubKeyMultisigThreshold. */ + class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** + * Constructs a new PubKeyMultisigThreshold. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + + /** PubKeyMultisigThreshold threshold. */ + public threshold: number; + + /** PubKeyMultisigThreshold pubkeys. */ + public pubkeys: 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 message PubKeyMultisigThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified PubKeyMultisigThreshold message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. + * @param message PubKeyMultisigThreshold message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + + /** + * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + + /** + * Verifies a PubKeyMultisigThreshold message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a PubKeyMultisigThreshold message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubKeyMultisigThreshold + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; + + /** + * Creates a plain object from a PubKeyMultisigThreshold message. Also converts values to other types if specified. + * @param message PubKeyMultisigThreshold + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.crypto.v1.PubKeyMultisigThreshold, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this PubKeyMultisigThreshold to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MultiSignature. */ + interface IMultiSignature { + /** MultiSignature sigs */ + sigs?: Uint8Array[] | null; + } + + /** Represents a MultiSignature. */ + class MultiSignature implements IMultiSignature { + /** + * Constructs a new MultiSignature. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.crypto.v1.IMultiSignature); + + /** MultiSignature sigs. */ + public sigs: 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 message MultiSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.crypto.v1.IMultiSignature, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MultiSignature message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. + * @param message MultiSignature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.crypto.v1.IMultiSignature, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MultiSignature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.crypto.v1.MultiSignature; + + /** + * Decodes a MultiSignature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.crypto.v1.MultiSignature; + + /** + * Verifies a MultiSignature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MultiSignature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MultiSignature + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.MultiSignature; + + /** + * Creates a plain object from a MultiSignature message. Also converts values to other types if specified. + * @param message MultiSignature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.crypto.v1.MultiSignature, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MultiSignature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message CompactBitArray message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.crypto.v1.ICompactBitArray, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified CompactBitArray message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. + * @param message CompactBitArray message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.crypto.v1.ICompactBitArray, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.crypto.v1.CompactBitArray; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.crypto.v1.CompactBitArray; + + /** + * Verifies a CompactBitArray message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a CompactBitArray message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompactBitArray + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.CompactBitArray; + + /** + * Creates a plain object from a CompactBitArray message. Also converts values to other types if specified. + * @param message CompactBitArray + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.crypto.v1.CompactBitArray, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this CompactBitArray to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Tx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.ITx, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tx message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. + * @param message Tx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.tx.v1.ITx, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Tx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.tx.v1.Tx; + + /** + * Decodes a Tx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.Tx; + + /** + * Verifies a Tx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Tx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tx + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.Tx; + + /** + * Creates a plain object from a Tx message. Also converts values to other types if specified. + * @param message Tx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.tx.v1.Tx, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Tx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message SignDoc message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.ISignDoc, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SignDoc message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. + * @param message SignDoc message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.tx.v1.ISignDoc, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SignDoc message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.tx.v1.SignDoc; + + /** + * Decodes a SignDoc message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.SignDoc; + + /** + * Verifies a SignDoc message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a SignDoc message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SignDoc + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.SignDoc; + + /** + * Creates a plain object from a SignDoc message. Also converts values to other types if specified. + * @param message SignDoc + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.tx.v1.SignDoc, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SignDoc to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message TxBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.ITxBody, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TxBody message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. + * @param message TxBody message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.tx.v1.ITxBody, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a TxBody message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.tx.v1.TxBody; + + /** + * Decodes a TxBody message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.TxBody; + + /** + * Verifies a TxBody message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a TxBody message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TxBody + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.TxBody; + + /** + * Creates a plain object from a TxBody message. Also converts values to other types if specified. + * @param message TxBody + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.tx.v1.TxBody, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this TxBody to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message AuthInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.tx.v1.IAuthInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified AuthInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. + * @param message AuthInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.tx.v1.IAuthInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an AuthInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.tx.v1.AuthInfo; + + /** + * Decodes an AuthInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.AuthInfo; + + /** + * Verifies an AuthInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an AuthInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuthInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.AuthInfo; + + /** + * Creates a plain object from an AuthInfo message. Also converts values to other types if specified. + * @param message AuthInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.tx.v1.AuthInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this AuthInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message SignerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.tx.v1.ISignerInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SignerInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. + * @param message SignerInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.tx.v1.ISignerInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SignerInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.tx.v1.SignerInfo; + + /** + * Decodes a SignerInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.SignerInfo; + + /** + * Verifies a SignerInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a SignerInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SignerInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.SignerInfo; + + /** + * Creates a plain object from a SignerInfo message. Also converts values to other types if specified. + * @param message SignerInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.tx.v1.SignerInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SignerInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ModeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.tx.v1.IModeInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ModeInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. + * @param message ModeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.tx.v1.IModeInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ModeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.tx.v1.ModeInfo; + + /** + * Decodes a ModeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.ModeInfo; + + /** + * Verifies a ModeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ModeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModeInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo; + + /** + * Creates a plain object from a ModeInfo message. Also converts values to other types if specified. + * @param message ModeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.tx.v1.ModeInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ModeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace ModeInfo { + /** Properties of a Single. */ + interface ISingle { + /** Single mode */ + mode?: cosmos_sdk.tx.v1.SignMode | null; + } + + /** Represents a Single. */ + class Single implements ISingle { + /** + * Constructs a new Single. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.tx.v1.ModeInfo.ISingle); + + /** Single mode. */ + public mode: cosmos_sdk.tx.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 message Single message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.tx.v1.ModeInfo.ISingle, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. + * @param message Single message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.tx.v1.ModeInfo.ISingle, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Single message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.tx.v1.ModeInfo.Single; + + /** + * Decodes a Single message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.tx.v1.ModeInfo.Single; + + /** + * Verifies a Single message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Single message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Single + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo.Single; + + /** + * Creates a plain object from a Single message. Also converts values to other types if specified. + * @param message Single + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.tx.v1.ModeInfo.Single, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Single to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Multi message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.tx.v1.ModeInfo.IMulti, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. + * @param message Multi message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.tx.v1.ModeInfo.IMulti, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Multi message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.tx.v1.ModeInfo.Multi; + + /** + * Decodes a Multi message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.tx.v1.ModeInfo.Multi; + + /** + * Verifies a Multi message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Multi message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Multi + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo.Multi; + + /** + * Creates a plain object from a Multi message. Also converts values to other types if specified. + * @param message Multi + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.tx.v1.ModeInfo.Multi, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Multi to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** SignMode enum. */ + enum SignMode { + SIGN_MODE_UNSPECIFIED = 0, + SIGN_MODE_DIRECT = 1, + SIGN_MODE_TEXTUAL = 2, + SIGN_MODE_LEGACY_AMINO_JSON = 127, + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Fee message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.tx.v1.IFee, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Fee message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. + * @param message Fee message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.tx.v1.IFee, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Fee message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.tx.v1.Fee; + + /** + * Decodes a Fee message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.Fee; + + /** + * Verifies a Fee message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Fee message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Fee + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.Fee; + + /** + * Creates a plain object from a Fee message. Also converts values to other types if specified. + * @param message Fee + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.tx.v1.Fee, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Fee to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Coin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.ICoin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. + * @param message Coin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.ICoin, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.Coin; + + /** + * Decodes a Coin message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.Coin; + + /** + * Verifies a Coin message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Coin message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Coin + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.Coin; + + /** + * Creates a plain object from a Coin message. Also converts values to other types if specified. + * @param message Coin + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.Coin, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Coin to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message DecCoin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IDecCoin, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. + * @param message DecCoin message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.IDecCoin, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.DecCoin; + + /** + * Decodes a DecCoin message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.DecCoin; + + /** + * Verifies a DecCoin message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DecCoin + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.DecCoin; + + /** + * Creates a plain object from a DecCoin message. Also converts values to other types if specified. + * @param message DecCoin + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.DecCoin, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DecCoin to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an IntProto. */ + interface IIntProto { + /** IntProto int */ + int?: string | null; + } + + /** Represents an IntProto. */ + class IntProto implements IIntProto { + /** + * Constructs a new IntProto. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message IntProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IIntProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. + * @param message IntProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.IIntProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.IntProto; + + /** + * Decodes an IntProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.IntProto; + + /** + * Verifies an IntProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an IntProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IntProto + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.IntProto; + + /** + * Creates a plain object from an IntProto message. Also converts values to other types if specified. + * @param message IntProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.IntProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this IntProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DecProto. */ + interface IDecProto { + /** DecProto dec */ + dec?: string | null; + } + + /** Represents a DecProto. */ + class DecProto implements IDecProto { + /** + * Constructs a new DecProto. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message DecProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IDecProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. + * @param message DecProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.IDecProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.DecProto; + + /** + * Decodes a DecProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.DecProto; + + /** + * Verifies a DecProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a DecProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DecProto + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.DecProto; + + /** + * Creates a plain object from a DecProto message. Also converts values to other types if specified. + * @param message DecProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.DecProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DecProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValAddresses. */ + interface IValAddresses { + /** ValAddresses addresses */ + addresses?: Uint8Array[] | null; + } + + /** Represents a ValAddresses. */ + class ValAddresses implements IValAddresses { + /** + * Constructs a new ValAddresses. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ValAddresses message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IValAddresses, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValAddresses message, length delimited. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. + * @param message ValAddresses message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.IValAddresses, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValAddresses message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.v1.ValAddresses; + + /** + * Decodes a ValAddresses message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.ValAddresses; + + /** + * Verifies a ValAddresses message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValAddresses message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValAddresses + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.ValAddresses; + + /** + * Creates a plain object from a ValAddresses message. Also converts values to other types if specified. + * @param message ValAddresses + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.ValAddresses, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValAddresses to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message GasInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IGasInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GasInfo message, length delimited. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. + * @param message GasInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.IGasInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GasInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.GasInfo; + + /** + * Decodes a GasInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.GasInfo; + + /** + * Verifies a GasInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a GasInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GasInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.GasInfo; + + /** + * Creates a plain object from a GasInfo message. Also converts values to other types if specified. + * @param message GasInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.GasInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GasInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.IResult, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Result message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.Result; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.Result; + + /** + * Verifies a Result message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Result + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.Result; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @param message Result + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.Result, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Result to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message SimulationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.v1.ISimulationResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SimulationResponse message, length delimited. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. + * @param message SimulationResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.ISimulationResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.v1.SimulationResponse; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.SimulationResponse; + + /** + * Verifies a SimulationResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a SimulationResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SimulationResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.SimulationResponse; + + /** + * Creates a plain object from a SimulationResponse message. Also converts values to other types if specified. + * @param message SimulationResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.SimulationResponse, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SimulationResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message MsgData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.IMsgData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MsgData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. + * @param message MsgData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.IMsgData, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.MsgData; + + /** + * Decodes a MsgData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.MsgData; + + /** + * Verifies a MsgData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgData + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.MsgData; + + /** + * Creates a plain object from a MsgData message. Also converts values to other types if specified. + * @param message MsgData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.MsgData, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message TxData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: cosmos_sdk.v1.ITxData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TxData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. + * @param message TxData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.v1.ITxData, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a TxData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.TxData; + + /** + * Decodes a TxData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.TxData; + + /** + * Verifies a TxData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a TxData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TxData + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.TxData; + + /** + * Creates a plain object from a TxData message. Also converts values to other types if specified. + * @param message TxData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.v1.TxData, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this TxData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace x. */ + namespace x { + /** Namespace auth. */ + namespace auth { + /** Namespace v1. */ + namespace v1 { + /** Properties of a BaseAccount. */ + interface IBaseAccount { + /** BaseAccount address */ + address?: Uint8Array | null; + + /** BaseAccount pubKey */ + pubKey?: Uint8Array | null; + + /** BaseAccount accountNumber */ + accountNumber?: number | Long | null; + + /** BaseAccount sequence */ + sequence?: number | Long | null; + } + + /** Represents a BaseAccount. */ + class BaseAccount implements IBaseAccount { + /** + * Constructs a new BaseAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.v1.IBaseAccount); + + /** BaseAccount address. */ + public address: Uint8Array; + + /** BaseAccount pubKey. */ + public pubKey: Uint8Array; + + /** BaseAccount accountNumber. */ + public accountNumber: number | Long; + + /** BaseAccount sequence. */ + public sequence: number | Long; + + /** + * Creates a new BaseAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns BaseAccount instance + */ + public static create( + properties?: cosmos_sdk.x.auth.v1.IBaseAccount, + ): cosmos_sdk.x.auth.v1.BaseAccount; + + /** + * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. + * @param message BaseAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.auth.v1.IBaseAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. + * @param message BaseAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.auth.v1.IBaseAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a BaseAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BaseAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.auth.v1.BaseAccount; + + /** + * Decodes a BaseAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BaseAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.auth.v1.BaseAccount; + + /** + * Verifies a BaseAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BaseAccount + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.BaseAccount; + + /** + * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. + * @param message BaseAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.auth.v1.BaseAccount, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this BaseAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ModuleAccount. */ + interface IModuleAccount { + /** ModuleAccount baseAccount */ + baseAccount?: cosmos_sdk.x.auth.v1.IBaseAccount | null; + + /** ModuleAccount name */ + name?: string | null; + + /** ModuleAccount permissions */ + permissions?: string[] | null; + } + + /** Represents a ModuleAccount. */ + class ModuleAccount implements IModuleAccount { + /** + * Constructs a new ModuleAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.v1.IModuleAccount); + + /** ModuleAccount baseAccount. */ + public baseAccount?: cosmos_sdk.x.auth.v1.IBaseAccount | null; + + /** ModuleAccount name. */ + public name: string; + + /** ModuleAccount permissions. */ + public permissions: string[]; + + /** + * Creates a new ModuleAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ModuleAccount instance + */ + public static create( + properties?: cosmos_sdk.x.auth.v1.IModuleAccount, + ): cosmos_sdk.x.auth.v1.ModuleAccount; + + /** + * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. + * @param message ModuleAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.auth.v1.IModuleAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. + * @param message ModuleAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.auth.v1.IModuleAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ModuleAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModuleAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.auth.v1.ModuleAccount; + + /** + * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModuleAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.auth.v1.ModuleAccount; + + /** + * Verifies a ModuleAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ModuleAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModuleAccount + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.ModuleAccount; + + /** + * Creates a plain object from a ModuleAccount message. Also converts values to other types if specified. + * @param message ModuleAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.auth.v1.ModuleAccount, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ModuleAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Params. */ + interface IParams { + /** Params maxMemoCharacters */ + maxMemoCharacters?: number | Long | null; + + /** Params txSigLimit */ + txSigLimit?: number | Long | null; + + /** Params txSizeCostPerByte */ + txSizeCostPerByte?: number | Long | null; + + /** Params sigVerifyCostEd25519 */ + sigVerifyCostEd25519?: number | Long | null; + + /** Params sigVerifyCostSecp256k1 */ + sigVerifyCostSecp256k1?: number | Long | null; + } + + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.v1.IParams); + + /** Params maxMemoCharacters. */ + public maxMemoCharacters: number | Long; + + /** Params txSigLimit. */ + public txSigLimit: number | Long; + + /** Params txSizeCostPerByte. */ + public txSizeCostPerByte: number | Long; + + /** Params sigVerifyCostEd25519. */ + public sigVerifyCostEd25519: number | Long; + + /** Params sigVerifyCostSecp256k1. */ + public sigVerifyCostSecp256k1: number | Long; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: cosmos_sdk.x.auth.v1.IParams): cosmos_sdk.x.auth.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.auth.v1.IParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.auth.v1.IParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.auth.v1.Params; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.auth.v1.Params; + + /** + * Verifies a Params message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Params + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.Params; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @param message Params + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.auth.v1.Params, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Params to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Namespace vesting. */ + namespace vesting { + /** Namespace v1. */ + namespace v1 { + /** Properties of a BaseVestingAccount. */ + interface IBaseVestingAccount { + /** BaseVestingAccount baseAccount */ + baseAccount?: cosmos_sdk.x.auth.v1.IBaseAccount | null; + + /** BaseVestingAccount originalVesting */ + originalVesting?: cosmos_sdk.v1.ICoin[] | null; + + /** BaseVestingAccount delegatedFree */ + delegatedFree?: cosmos_sdk.v1.ICoin[] | null; + + /** BaseVestingAccount delegatedVesting */ + delegatedVesting?: cosmos_sdk.v1.ICoin[] | null; + + /** BaseVestingAccount endTime */ + endTime?: number | Long | null; + } + + /** Represents a BaseVestingAccount. */ + class BaseVestingAccount implements IBaseVestingAccount { + /** + * Constructs a new BaseVestingAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount); + + /** BaseVestingAccount baseAccount. */ + public baseAccount?: cosmos_sdk.x.auth.v1.IBaseAccount | null; + + /** BaseVestingAccount originalVesting. */ + public originalVesting: cosmos_sdk.v1.ICoin[]; + + /** BaseVestingAccount delegatedFree. */ + public delegatedFree: cosmos_sdk.v1.ICoin[]; + + /** BaseVestingAccount delegatedVesting. */ + public delegatedVesting: cosmos_sdk.v1.ICoin[]; + + /** BaseVestingAccount endTime. */ + public endTime: number | Long; + + /** + * Creates a new BaseVestingAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns BaseVestingAccount instance + */ + public static create( + properties?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, + ): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; + + /** + * Encodes the specified BaseVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. + * @param message BaseVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified BaseVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. + * @param message BaseVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a BaseVestingAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BaseVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; + + /** + * Decodes a BaseVestingAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BaseVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; + + /** + * Verifies a BaseVestingAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a BaseVestingAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BaseVestingAccount + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; + + /** + * Creates a plain object from a BaseVestingAccount message. Also converts values to other types if specified. + * @param message BaseVestingAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this BaseVestingAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ContinuousVestingAccount. */ + interface IContinuousVestingAccount { + /** ContinuousVestingAccount baseVestingAccount */ + baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; + + /** ContinuousVestingAccount startTime */ + startTime?: number | Long | null; + } + + /** Represents a ContinuousVestingAccount. */ + class ContinuousVestingAccount implements IContinuousVestingAccount { + /** + * Constructs a new ContinuousVestingAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount); + + /** ContinuousVestingAccount baseVestingAccount. */ + public baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; + + /** ContinuousVestingAccount startTime. */ + public startTime: number | Long; + + /** + * Creates a new ContinuousVestingAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns ContinuousVestingAccount instance + */ + public static create( + properties?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, + ): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; + + /** + * Encodes the specified ContinuousVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. + * @param message ContinuousVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ContinuousVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. + * @param message ContinuousVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ContinuousVestingAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContinuousVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; + + /** + * Decodes a ContinuousVestingAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContinuousVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; + + /** + * Verifies a ContinuousVestingAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ContinuousVestingAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContinuousVestingAccount + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; + + /** + * Creates a plain object from a ContinuousVestingAccount message. Also converts values to other types if specified. + * @param message ContinuousVestingAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ContinuousVestingAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DelayedVestingAccount. */ + interface IDelayedVestingAccount { + /** DelayedVestingAccount baseVestingAccount */ + baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; + } + + /** Represents a DelayedVestingAccount. */ + class DelayedVestingAccount implements IDelayedVestingAccount { + /** + * Constructs a new DelayedVestingAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount); + + /** DelayedVestingAccount baseVestingAccount. */ + public baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; + + /** + * Creates a new DelayedVestingAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns DelayedVestingAccount instance + */ + public static create( + properties?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, + ): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; + + /** + * Encodes the specified DelayedVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. + * @param message DelayedVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DelayedVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. + * @param message DelayedVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DelayedVestingAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DelayedVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; + + /** + * Decodes a DelayedVestingAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DelayedVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; + + /** + * Verifies a DelayedVestingAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a DelayedVestingAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DelayedVestingAccount + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; + + /** + * Creates a plain object from a DelayedVestingAccount message. Also converts values to other types if specified. + * @param message DelayedVestingAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DelayedVestingAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Period. */ + interface IPeriod { + /** Period length */ + length?: number | Long | null; + + /** Period amount */ + amount?: cosmos_sdk.v1.ICoin[] | null; + } + + /** Represents a Period. */ + class Period implements IPeriod { + /** + * Constructs a new Period. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriod); + + /** Period length. */ + public length: number | Long; + + /** Period amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new Period instance using the specified properties. + * @param [properties] Properties to set + * @returns Period instance + */ + public static create( + properties?: cosmos_sdk.x.auth.vesting.v1.IPeriod, + ): cosmos_sdk.x.auth.vesting.v1.Period; + + /** + * Encodes the specified Period message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. + * @param message Period message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.auth.vesting.v1.IPeriod, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Period message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. + * @param message Period message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.auth.vesting.v1.IPeriod, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Period message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.auth.vesting.v1.Period; + + /** + * Decodes a Period message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Period + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.auth.vesting.v1.Period; + + /** + * Verifies a Period message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Period message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Period + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.Period; + + /** + * Creates a plain object from a Period message. Also converts values to other types if specified. + * @param message Period + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.auth.vesting.v1.Period, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Period to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PeriodicVestingAccount. */ + interface IPeriodicVestingAccount { + /** PeriodicVestingAccount baseVestingAccount */ + baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; + + /** PeriodicVestingAccount startTime */ + startTime?: number | Long | null; + + /** PeriodicVestingAccount vestingPeriods */ + vestingPeriods?: cosmos_sdk.x.auth.vesting.v1.IPeriod[] | null; + } + + /** Represents a PeriodicVestingAccount. */ + class PeriodicVestingAccount implements IPeriodicVestingAccount { + /** + * Constructs a new PeriodicVestingAccount. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount); + + /** PeriodicVestingAccount baseVestingAccount. */ + public baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; + + /** PeriodicVestingAccount startTime. */ + public startTime: number | Long; + + /** PeriodicVestingAccount vestingPeriods. */ + public vestingPeriods: cosmos_sdk.x.auth.vesting.v1.IPeriod[]; + + /** + * Creates a new PeriodicVestingAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns PeriodicVestingAccount instance + */ + public static create( + properties?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, + ): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; + + /** + * Encodes the specified PeriodicVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. + * @param message PeriodicVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified PeriodicVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. + * @param message PeriodicVestingAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a PeriodicVestingAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PeriodicVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; + + /** + * Decodes a PeriodicVestingAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PeriodicVestingAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; + + /** + * Verifies a PeriodicVestingAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a PeriodicVestingAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PeriodicVestingAccount + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; + + /** + * Creates a plain object from a PeriodicVestingAccount message. Also converts values to other types if specified. + * @param message PeriodicVestingAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this PeriodicVestingAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace bank. */ + namespace bank { + /** Namespace v1. */ + namespace v1 { + /** Represents a Query */ + class Query extends $protobuf.rpc.Service { + /** + * Constructs a new Query 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 Query 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, + ): Query; + + /** + * Calls Balance. + * @param request QueryBalanceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryBalanceResponse + */ + public balance( + request: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, + callback: cosmos_sdk.x.bank.v1.Query.BalanceCallback, + ): void; + + /** + * Calls Balance. + * @param request QueryBalanceRequest message or plain object + * @returns Promise + */ + public balance( + request: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, + ): Promise; + + /** + * Calls AllBalances. + * @param request QueryAllBalancesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryAllBalancesResponse + */ + public allBalances( + request: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, + callback: cosmos_sdk.x.bank.v1.Query.AllBalancesCallback, + ): void; + + /** + * Calls AllBalances. + * @param request QueryAllBalancesRequest message or plain object + * @returns Promise + */ + public allBalances( + request: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, + ): Promise; + + /** + * Calls TotalSupply. + * @param request QueryTotalSupplyRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QueryTotalSupplyResponse + */ + public totalSupply( + request: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, + callback: cosmos_sdk.x.bank.v1.Query.TotalSupplyCallback, + ): void; + + /** + * Calls TotalSupply. + * @param request QueryTotalSupplyRequest message or plain object + * @returns Promise + */ + public totalSupply( + request: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, + ): Promise; + + /** + * Calls SupplyOf. + * @param request QuerySupplyOfRequest message or plain object + * @param callback Node-style callback called with the error, if any, and QuerySupplyOfResponse + */ + public supplyOf( + request: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, + callback: cosmos_sdk.x.bank.v1.Query.SupplyOfCallback, + ): void; + + /** + * Calls SupplyOf. + * @param request QuerySupplyOfRequest message or plain object + * @returns Promise + */ + public supplyOf( + request: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, + ): Promise; + } + + namespace Query { + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#balance}. + * @param error Error, if any + * @param [response] QueryBalanceResponse + */ + type BalanceCallback = ( + error: Error | null, + response?: cosmos_sdk.x.bank.v1.QueryBalanceResponse, + ) => void; + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#allBalances}. + * @param error Error, if any + * @param [response] QueryAllBalancesResponse + */ + type AllBalancesCallback = ( + error: Error | null, + response?: cosmos_sdk.x.bank.v1.QueryAllBalancesResponse, + ) => void; + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#totalSupply}. + * @param error Error, if any + * @param [response] QueryTotalSupplyResponse + */ + type TotalSupplyCallback = ( + error: Error | null, + response?: cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse, + ) => void; + + /** + * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#supplyOf}. + * @param error Error, if any + * @param [response] QuerySupplyOfResponse + */ + type SupplyOfCallback = ( + error: Error | null, + response?: cosmos_sdk.x.bank.v1.QuerySupplyOfResponse, + ) => void; + } + + /** Properties of a QueryBalanceRequest. */ + interface IQueryBalanceRequest { + /** QueryBalanceRequest address */ + address?: Uint8Array | null; + + /** QueryBalanceRequest denom */ + denom?: string | null; + } + + /** Represents a QueryBalanceRequest. */ + class QueryBalanceRequest implements IQueryBalanceRequest { + /** + * Constructs a new QueryBalanceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest); + + /** QueryBalanceRequest address. */ + public address: Uint8Array; + + /** QueryBalanceRequest denom. */ + public denom: string; + + /** + * Creates a new QueryBalanceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryBalanceRequest instance + */ + public static create( + properties?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, + ): cosmos_sdk.x.bank.v1.QueryBalanceRequest; + + /** + * Encodes the specified QueryBalanceRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. + * @param message QueryBalanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified QueryBalanceRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. + * @param message QueryBalanceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryBalanceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.QueryBalanceRequest; + + /** + * Decodes a QueryBalanceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryBalanceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.bank.v1.QueryBalanceRequest; + + /** + * Verifies a QueryBalanceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a QueryBalanceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryBalanceRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryBalanceRequest; + + /** + * Creates a plain object from a QueryBalanceRequest message. Also converts values to other types if specified. + * @param message QueryBalanceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.QueryBalanceRequest, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this QueryBalanceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryBalanceResponse. */ + interface IQueryBalanceResponse { + /** QueryBalanceResponse balance */ + balance?: cosmos_sdk.v1.ICoin | null; + } + + /** Represents a QueryBalanceResponse. */ + class QueryBalanceResponse implements IQueryBalanceResponse { + /** + * Constructs a new QueryBalanceResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse); + + /** QueryBalanceResponse balance. */ + public balance?: cosmos_sdk.v1.ICoin | null; + + /** + * Creates a new QueryBalanceResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryBalanceResponse instance + */ + public static create( + properties?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, + ): cosmos_sdk.x.bank.v1.QueryBalanceResponse; + + /** + * Encodes the specified QueryBalanceResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. + * @param message QueryBalanceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified QueryBalanceResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. + * @param message QueryBalanceResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryBalanceResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryBalanceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.QueryBalanceResponse; + + /** + * Decodes a QueryBalanceResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryBalanceResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.bank.v1.QueryBalanceResponse; + + /** + * Verifies a QueryBalanceResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a QueryBalanceResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryBalanceResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryBalanceResponse; + + /** + * Creates a plain object from a QueryBalanceResponse message. Also converts values to other types if specified. + * @param message QueryBalanceResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.QueryBalanceResponse, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this QueryBalanceResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryAllBalancesRequest. */ + interface IQueryAllBalancesRequest { + /** QueryAllBalancesRequest address */ + address?: Uint8Array | null; + } + + /** Represents a QueryAllBalancesRequest. */ + class QueryAllBalancesRequest implements IQueryAllBalancesRequest { + /** + * Constructs a new QueryAllBalancesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest); + + /** QueryAllBalancesRequest address. */ + public address: Uint8Array; + + /** + * Creates a new QueryAllBalancesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAllBalancesRequest instance + */ + public static create( + properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, + ): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; + + /** + * Encodes the specified QueryAllBalancesRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. + * @param message QueryAllBalancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified QueryAllBalancesRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. + * @param message QueryAllBalancesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryAllBalancesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAllBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; + + /** + * Decodes a QueryAllBalancesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAllBalancesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; + + /** + * Verifies a QueryAllBalancesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a QueryAllBalancesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAllBalancesRequest + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; + + /** + * Creates a plain object from a QueryAllBalancesRequest message. Also converts values to other types if specified. + * @param message QueryAllBalancesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.QueryAllBalancesRequest, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this QueryAllBalancesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryAllBalancesResponse. */ + interface IQueryAllBalancesResponse { + /** QueryAllBalancesResponse balances */ + balances?: cosmos_sdk.v1.ICoin[] | null; + } + + /** Represents a QueryAllBalancesResponse. */ + class QueryAllBalancesResponse implements IQueryAllBalancesResponse { + /** + * Constructs a new QueryAllBalancesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse); + + /** QueryAllBalancesResponse balances. */ + public balances: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new QueryAllBalancesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryAllBalancesResponse instance + */ + public static create( + properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, + ): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; + + /** + * Encodes the specified QueryAllBalancesResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. + * @param message QueryAllBalancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified QueryAllBalancesResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. + * @param message QueryAllBalancesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryAllBalancesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryAllBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; + + /** + * Decodes a QueryAllBalancesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryAllBalancesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; + + /** + * Verifies a QueryAllBalancesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a QueryAllBalancesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryAllBalancesResponse + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; + + /** + * Creates a plain object from a QueryAllBalancesResponse message. Also converts values to other types if specified. + * @param message QueryAllBalancesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.QueryAllBalancesResponse, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this QueryAllBalancesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryTotalSupplyRequest. */ + interface IQueryTotalSupplyRequest {} + + /** Represents a QueryTotalSupplyRequest. */ + class QueryTotalSupplyRequest implements IQueryTotalSupplyRequest { + /** + * Constructs a new QueryTotalSupplyRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest); + + /** + * Creates a new QueryTotalSupplyRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryTotalSupplyRequest instance + */ + public static create( + properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, + ): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; + + /** + * Encodes the specified QueryTotalSupplyRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. + * @param message QueryTotalSupplyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified QueryTotalSupplyRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. + * @param message QueryTotalSupplyRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; + + /** + * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryTotalSupplyRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; + + /** + * Verifies a QueryTotalSupplyRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a QueryTotalSupplyRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryTotalSupplyRequest + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; + + /** + * Creates a plain object from a QueryTotalSupplyRequest message. Also converts values to other types if specified. + * @param message QueryTotalSupplyRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this QueryTotalSupplyRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QueryTotalSupplyResponse. */ + interface IQueryTotalSupplyResponse { + /** QueryTotalSupplyResponse supply */ + supply?: cosmos_sdk.v1.ICoin[] | null; + } + + /** Represents a QueryTotalSupplyResponse. */ + class QueryTotalSupplyResponse implements IQueryTotalSupplyResponse { + /** + * Constructs a new QueryTotalSupplyResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse); + + /** QueryTotalSupplyResponse supply. */ + public supply: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new QueryTotalSupplyResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QueryTotalSupplyResponse instance + */ + public static create( + properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, + ): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; + + /** + * Encodes the specified QueryTotalSupplyResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. + * @param message QueryTotalSupplyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified QueryTotalSupplyResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. + * @param message QueryTotalSupplyResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QueryTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; + + /** + * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QueryTotalSupplyResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; + + /** + * Verifies a QueryTotalSupplyResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a QueryTotalSupplyResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QueryTotalSupplyResponse + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; + + /** + * Creates a plain object from a QueryTotalSupplyResponse message. Also converts values to other types if specified. + * @param message QueryTotalSupplyResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this QueryTotalSupplyResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QuerySupplyOfRequest. */ + interface IQuerySupplyOfRequest { + /** QuerySupplyOfRequest denom */ + denom?: string | null; + } + + /** Represents a QuerySupplyOfRequest. */ + class QuerySupplyOfRequest implements IQuerySupplyOfRequest { + /** + * Constructs a new QuerySupplyOfRequest. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest); + + /** QuerySupplyOfRequest denom. */ + public denom: string; + + /** + * Creates a new QuerySupplyOfRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns QuerySupplyOfRequest instance + */ + public static create( + properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, + ): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; + + /** + * Encodes the specified QuerySupplyOfRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. + * @param message QuerySupplyOfRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified QuerySupplyOfRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. + * @param message QuerySupplyOfRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QuerySupplyOfRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuerySupplyOfRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; + + /** + * Decodes a QuerySupplyOfRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuerySupplyOfRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; + + /** + * Verifies a QuerySupplyOfRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a QuerySupplyOfRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuerySupplyOfRequest + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; + + /** + * Creates a plain object from a QuerySupplyOfRequest message. Also converts values to other types if specified. + * @param message QuerySupplyOfRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.QuerySupplyOfRequest, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this QuerySupplyOfRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a QuerySupplyOfResponse. */ + interface IQuerySupplyOfResponse { + /** QuerySupplyOfResponse amount */ + amount?: string | null; + } + + /** Represents a QuerySupplyOfResponse. */ + class QuerySupplyOfResponse implements IQuerySupplyOfResponse { + /** + * Constructs a new QuerySupplyOfResponse. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse); + + /** QuerySupplyOfResponse amount. */ + public amount: string; + + /** + * Creates a new QuerySupplyOfResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns QuerySupplyOfResponse instance + */ + public static create( + properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, + ): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; + + /** + * Encodes the specified QuerySupplyOfResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. + * @param message QuerySupplyOfResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified QuerySupplyOfResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. + * @param message QuerySupplyOfResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a QuerySupplyOfResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuerySupplyOfResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; + + /** + * Decodes a QuerySupplyOfResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuerySupplyOfResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; + + /** + * Verifies a QuerySupplyOfResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a QuerySupplyOfResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuerySupplyOfResponse + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; + + /** + * Creates a plain object from a QuerySupplyOfResponse message. Also converts values to other types if specified. + * @param message QuerySupplyOfResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.QuerySupplyOfResponse, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this QuerySupplyOfResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message MsgSend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IMsgSend, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. + * @param message MsgSend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IMsgSend, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgSend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.MsgSend; + + /** + * Decodes a MsgSend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.bank.v1.MsgSend; + + /** + * Verifies a MsgSend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgSend + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.MsgSend; + + /** + * Creates a plain object from a MsgSend message. Also converts values to other types if specified. + * @param message MsgSend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.MsgSend, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgSend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Input message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IInput, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. + * @param message Input message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IInput, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an Input message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.Input; + + /** + * Decodes an Input message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.bank.v1.Input; + + /** + * Verifies an Input message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an Input message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Input + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Input; + + /** + * Creates a plain object from an Input message. Also converts values to other types if specified. + * @param message Input + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.Input, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Input to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Output message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IOutput, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. + * @param message Output message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IOutput, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an Output message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.Output; + + /** + * Decodes an Output message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.bank.v1.Output; + + /** + * Verifies an Output message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an Output message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Output + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Output; + + /** + * Creates a plain object from an Output message. Also converts values to other types if specified. + * @param message Output + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.Output, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Output to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message MsgMultiSend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.IMsgMultiSend, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. + * @param message MsgMultiSend message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.IMsgMultiSend, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.MsgMultiSend; + + /** + * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.bank.v1.MsgMultiSend; + + /** + * Verifies a MsgMultiSend message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgMultiSend + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.MsgMultiSend; + + /** + * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. + * @param message MsgMultiSend + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.MsgMultiSend, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgMultiSend to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Supply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.bank.v1.ISupply, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. + * @param message Supply message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.bank.v1.ISupply, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Supply message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.bank.v1.Supply; + + /** + * Decodes a Supply message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.bank.v1.Supply; + + /** + * Verifies a Supply message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Supply message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Supply + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Supply; + + /** + * Creates a plain object from a Supply message. Also converts values to other types if specified. + * @param message Supply + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.bank.v1.Supply, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Supply to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace capability. */ + namespace capability { + /** Namespace v1. */ + namespace v1 { + /** Properties of a Capability. */ + interface ICapability { + /** Capability index */ + index?: number | Long | null; + } + + /** Represents a Capability. */ + class Capability implements ICapability { + /** + * Constructs a new Capability. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.capability.v1.ICapability); + + /** Capability index. */ + public index: number | Long; + + /** + * Creates a new Capability instance using the specified properties. + * @param [properties] Properties to set + * @returns Capability instance + */ + public static create( + properties?: cosmos_sdk.x.capability.v1.ICapability, + ): cosmos_sdk.x.capability.v1.Capability; + + /** + * Encodes the specified Capability message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. + * @param message Capability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.capability.v1.ICapability, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Capability message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. + * @param message Capability message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.capability.v1.ICapability, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Capability message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Capability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.capability.v1.Capability; + + /** + * Decodes a Capability message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Capability + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.capability.v1.Capability; + + /** + * Verifies a Capability message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Capability message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Capability + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.Capability; + + /** + * Creates a plain object from a Capability message. Also converts values to other types if specified. + * @param message Capability + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.capability.v1.Capability, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Capability to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Owner. */ + interface IOwner { + /** Owner module */ + module?: string | null; + + /** Owner name */ + name?: string | null; + } + + /** Represents an Owner. */ + class Owner implements IOwner { + /** + * Constructs a new Owner. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.capability.v1.IOwner); + + /** Owner module. */ + public module: string; + + /** Owner name. */ + public name: string; + + /** + * Creates a new Owner instance using the specified properties. + * @param [properties] Properties to set + * @returns Owner instance + */ + public static create( + properties?: cosmos_sdk.x.capability.v1.IOwner, + ): cosmos_sdk.x.capability.v1.Owner; + + /** + * Encodes the specified Owner message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. + * @param message Owner message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.capability.v1.IOwner, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Owner message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. + * @param message Owner message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.capability.v1.IOwner, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an Owner message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Owner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.capability.v1.Owner; + + /** + * Decodes an Owner message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Owner + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.capability.v1.Owner; + + /** + * Verifies an Owner message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an Owner message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Owner + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.Owner; + + /** + * Creates a plain object from an Owner message. Also converts values to other types if specified. + * @param message Owner + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.capability.v1.Owner, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Owner to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CapabilityOwners. */ + interface ICapabilityOwners { + /** CapabilityOwners owners */ + owners?: cosmos_sdk.x.capability.v1.IOwner[] | null; + } + + /** Represents a CapabilityOwners. */ + class CapabilityOwners implements ICapabilityOwners { + /** + * Constructs a new CapabilityOwners. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.capability.v1.ICapabilityOwners); + + /** CapabilityOwners owners. */ + public owners: cosmos_sdk.x.capability.v1.IOwner[]; + + /** + * Creates a new CapabilityOwners instance using the specified properties. + * @param [properties] Properties to set + * @returns CapabilityOwners instance + */ + public static create( + properties?: cosmos_sdk.x.capability.v1.ICapabilityOwners, + ): cosmos_sdk.x.capability.v1.CapabilityOwners; + + /** + * Encodes the specified CapabilityOwners message. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. + * @param message CapabilityOwners message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.capability.v1.ICapabilityOwners, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified CapabilityOwners message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. + * @param message CapabilityOwners message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.capability.v1.ICapabilityOwners, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CapabilityOwners message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CapabilityOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.capability.v1.CapabilityOwners; + + /** + * Decodes a CapabilityOwners message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CapabilityOwners + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.capability.v1.CapabilityOwners; + + /** + * Verifies a CapabilityOwners message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a CapabilityOwners message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CapabilityOwners + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.CapabilityOwners; + + /** + * Creates a plain object from a CapabilityOwners message. Also converts values to other types if specified. + * @param message CapabilityOwners + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.capability.v1.CapabilityOwners, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this CapabilityOwners to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace crisis. */ + namespace crisis { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgVerifyInvariant. */ + interface IMsgVerifyInvariant { + /** MsgVerifyInvariant sender */ + sender?: Uint8Array | null; + + /** MsgVerifyInvariant invariantModuleName */ + invariantModuleName?: string | null; + + /** MsgVerifyInvariant invariantRoute */ + invariantRoute?: string | null; + } + + /** Represents a MsgVerifyInvariant. */ + class MsgVerifyInvariant implements IMsgVerifyInvariant { + /** + * Constructs a new MsgVerifyInvariant. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant); + + /** MsgVerifyInvariant sender. */ + public sender: Uint8Array; + + /** MsgVerifyInvariant invariantModuleName. */ + public invariantModuleName: string; + + /** MsgVerifyInvariant invariantRoute. */ + public invariantRoute: string; + + /** + * Creates a new MsgVerifyInvariant instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgVerifyInvariant instance + */ + public static create( + properties?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, + ): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; + + /** + * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. + * @param message MsgVerifyInvariant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgVerifyInvariant message, length delimited. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. + * @param message MsgVerifyInvariant message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; + + /** + * Decodes a MsgVerifyInvariant message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgVerifyInvariant + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; + + /** + * Verifies a MsgVerifyInvariant message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgVerifyInvariant message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgVerifyInvariant + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; + + /** + * Creates a plain object from a MsgVerifyInvariant message. Also converts values to other types if specified. + * @param message MsgVerifyInvariant + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.crisis.v1.MsgVerifyInvariant, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgVerifyInvariant to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace distribution. */ + namespace distribution { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgSetWithdrawAddress. */ + interface IMsgSetWithdrawAddress { + /** MsgSetWithdrawAddress delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** MsgSetWithdrawAddress withdrawAddress */ + withdrawAddress?: Uint8Array | null; + } + + /** Represents a MsgSetWithdrawAddress. */ + class MsgSetWithdrawAddress implements IMsgSetWithdrawAddress { + /** + * Constructs a new MsgSetWithdrawAddress. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress); + + /** MsgSetWithdrawAddress delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgSetWithdrawAddress withdrawAddress. */ + public withdrawAddress: Uint8Array; + + /** + * Creates a new MsgSetWithdrawAddress instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSetWithdrawAddress instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, + ): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; + + /** + * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. + * @param message MsgSetWithdrawAddress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgSetWithdrawAddress message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. + * @param message MsgSetWithdrawAddress message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; + + /** + * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgSetWithdrawAddress + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; + + /** + * Verifies a MsgSetWithdrawAddress message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgSetWithdrawAddress message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgSetWithdrawAddress + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; + + /** + * Creates a plain object from a MsgSetWithdrawAddress message. Also converts values to other types if specified. + * @param message MsgSetWithdrawAddress + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgSetWithdrawAddress to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgWithdrawDelegatorReward. */ + interface IMsgWithdrawDelegatorReward { + /** MsgWithdrawDelegatorReward delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** MsgWithdrawDelegatorReward validatorAddress */ + validatorAddress?: Uint8Array | null; + } + + /** Represents a MsgWithdrawDelegatorReward. */ + class MsgWithdrawDelegatorReward implements IMsgWithdrawDelegatorReward { + /** + * Constructs a new MsgWithdrawDelegatorReward. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward); + + /** MsgWithdrawDelegatorReward delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgWithdrawDelegatorReward validatorAddress. */ + public validatorAddress: Uint8Array; + + /** + * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawDelegatorReward instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, + ): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @param message MsgWithdrawDelegatorReward message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgWithdrawDelegatorReward message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. + * @param message MsgWithdrawDelegatorReward message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; + + /** + * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgWithdrawDelegatorReward + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; + + /** + * Verifies a MsgWithdrawDelegatorReward message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgWithdrawDelegatorReward message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgWithdrawDelegatorReward + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; + + /** + * Creates a plain object from a MsgWithdrawDelegatorReward message. Also converts values to other types if specified. + * @param message MsgWithdrawDelegatorReward + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgWithdrawDelegatorReward to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgWithdrawValidatorCommission. */ + interface IMsgWithdrawValidatorCommission { + /** MsgWithdrawValidatorCommission validatorAddress */ + validatorAddress?: Uint8Array | null; + } + + /** Represents a MsgWithdrawValidatorCommission. */ + class MsgWithdrawValidatorCommission implements IMsgWithdrawValidatorCommission { + /** + * Constructs a new MsgWithdrawValidatorCommission. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission); + + /** MsgWithdrawValidatorCommission validatorAddress. */ + public validatorAddress: Uint8Array; + + /** + * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgWithdrawValidatorCommission instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, + ): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @param message MsgWithdrawValidatorCommission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgWithdrawValidatorCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. + * @param message MsgWithdrawValidatorCommission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; + + /** + * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgWithdrawValidatorCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; + + /** + * Verifies a MsgWithdrawValidatorCommission message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgWithdrawValidatorCommission message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgWithdrawValidatorCommission + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; + + /** + * Creates a plain object from a MsgWithdrawValidatorCommission message. Also converts values to other types if specified. + * @param message MsgWithdrawValidatorCommission + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgWithdrawValidatorCommission to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgFundCommunityPool. */ + interface IMsgFundCommunityPool { + /** MsgFundCommunityPool amount */ + amount?: cosmos_sdk.v1.ICoin[] | null; + + /** MsgFundCommunityPool depositor */ + depositor?: Uint8Array | null; + } + + /** Represents a MsgFundCommunityPool. */ + class MsgFundCommunityPool implements IMsgFundCommunityPool { + /** + * Constructs a new MsgFundCommunityPool. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool); + + /** MsgFundCommunityPool amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** MsgFundCommunityPool depositor. */ + public depositor: Uint8Array; + + /** + * Creates a new MsgFundCommunityPool instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgFundCommunityPool instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, + ): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; + + /** + * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. + * @param message MsgFundCommunityPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgFundCommunityPool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. + * @param message MsgFundCommunityPool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; + + /** + * Decodes a MsgFundCommunityPool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgFundCommunityPool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; + + /** + * Verifies a MsgFundCommunityPool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgFundCommunityPool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgFundCommunityPool + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; + + /** + * Creates a plain object from a MsgFundCommunityPool message. Also converts values to other types if specified. + * @param message MsgFundCommunityPool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.MsgFundCommunityPool, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgFundCommunityPool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Params. */ + interface IParams { + /** Params communityTax */ + communityTax?: string | null; + + /** Params baseProposerReward */ + baseProposerReward?: string | null; + + /** Params bonusProposerReward */ + bonusProposerReward?: string | null; + + /** Params withdrawAddrEnabled */ + withdrawAddrEnabled?: boolean | null; + } + + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IParams); + + /** Params communityTax. */ + public communityTax: string; + + /** Params baseProposerReward. */ + public baseProposerReward: string; + + /** Params bonusProposerReward. */ + public bonusProposerReward: string; + + /** Params withdrawAddrEnabled. */ + public withdrawAddrEnabled: boolean; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IParams, + ): cosmos_sdk.x.distribution.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.Params; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.Params; + + /** + * Verifies a Params message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Params + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.Params; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @param message Params + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.Params, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Params to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorHistoricalRewards. */ + interface IValidatorHistoricalRewards { + /** ValidatorHistoricalRewards cumulativeRewardRatio */ + cumulativeRewardRatio?: cosmos_sdk.v1.IDecCoin[] | null; + + /** ValidatorHistoricalRewards referenceCount */ + referenceCount?: number | null; + } + + /** Represents a ValidatorHistoricalRewards. */ + class ValidatorHistoricalRewards implements IValidatorHistoricalRewards { + /** + * Constructs a new ValidatorHistoricalRewards. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards); + + /** ValidatorHistoricalRewards cumulativeRewardRatio. */ + public cumulativeRewardRatio: cosmos_sdk.v1.IDecCoin[]; + + /** ValidatorHistoricalRewards referenceCount. */ + public referenceCount: number; + + /** + * Creates a new ValidatorHistoricalRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorHistoricalRewards instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, + ): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; + + /** + * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. + * @param message ValidatorHistoricalRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ValidatorHistoricalRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. + * @param message ValidatorHistoricalRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; + + /** + * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorHistoricalRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; + + /** + * Verifies a ValidatorHistoricalRewards message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValidatorHistoricalRewards message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorHistoricalRewards + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; + + /** + * Creates a plain object from a ValidatorHistoricalRewards message. Also converts values to other types if specified. + * @param message ValidatorHistoricalRewards + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValidatorHistoricalRewards to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorCurrentRewards. */ + interface IValidatorCurrentRewards { + /** ValidatorCurrentRewards rewards */ + rewards?: cosmos_sdk.v1.IDecCoin[] | null; + + /** ValidatorCurrentRewards period */ + period?: number | Long | null; + } + + /** Represents a ValidatorCurrentRewards. */ + class ValidatorCurrentRewards implements IValidatorCurrentRewards { + /** + * Constructs a new ValidatorCurrentRewards. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards); + + /** ValidatorCurrentRewards rewards. */ + public rewards: cosmos_sdk.v1.IDecCoin[]; + + /** ValidatorCurrentRewards period. */ + public period: number | Long; + + /** + * Creates a new ValidatorCurrentRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorCurrentRewards instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, + ): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; + + /** + * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. + * @param message ValidatorCurrentRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ValidatorCurrentRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. + * @param message ValidatorCurrentRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; + + /** + * Decodes a ValidatorCurrentRewards message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorCurrentRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; + + /** + * Verifies a ValidatorCurrentRewards message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValidatorCurrentRewards message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorCurrentRewards + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; + + /** + * Creates a plain object from a ValidatorCurrentRewards message. Also converts values to other types if specified. + * @param message ValidatorCurrentRewards + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValidatorCurrentRewards to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorAccumulatedCommission. */ + interface IValidatorAccumulatedCommission { + /** ValidatorAccumulatedCommission commission */ + commission?: cosmos_sdk.v1.IDecCoin[] | null; + } + + /** Represents a ValidatorAccumulatedCommission. */ + class ValidatorAccumulatedCommission implements IValidatorAccumulatedCommission { + /** + * Constructs a new ValidatorAccumulatedCommission. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission); + + /** ValidatorAccumulatedCommission commission. */ + public commission: cosmos_sdk.v1.IDecCoin[]; + + /** + * Creates a new ValidatorAccumulatedCommission instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorAccumulatedCommission instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, + ): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; + + /** + * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. + * @param message ValidatorAccumulatedCommission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ValidatorAccumulatedCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. + * @param message ValidatorAccumulatedCommission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; + + /** + * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorAccumulatedCommission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; + + /** + * Verifies a ValidatorAccumulatedCommission message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValidatorAccumulatedCommission message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorAccumulatedCommission + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; + + /** + * Creates a plain object from a ValidatorAccumulatedCommission message. Also converts values to other types if specified. + * @param message ValidatorAccumulatedCommission + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValidatorAccumulatedCommission to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorOutstandingRewards. */ + interface IValidatorOutstandingRewards { + /** ValidatorOutstandingRewards rewards */ + rewards?: cosmos_sdk.v1.IDecCoin[] | null; + } + + /** Represents a ValidatorOutstandingRewards. */ + class ValidatorOutstandingRewards implements IValidatorOutstandingRewards { + /** + * Constructs a new ValidatorOutstandingRewards. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards); + + /** ValidatorOutstandingRewards rewards. */ + public rewards: cosmos_sdk.v1.IDecCoin[]; + + /** + * Creates a new ValidatorOutstandingRewards instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorOutstandingRewards instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, + ): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; + + /** + * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. + * @param message ValidatorOutstandingRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ValidatorOutstandingRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. + * @param message ValidatorOutstandingRewards message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; + + /** + * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorOutstandingRewards + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; + + /** + * Verifies a ValidatorOutstandingRewards message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValidatorOutstandingRewards message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorOutstandingRewards + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; + + /** + * Creates a plain object from a ValidatorOutstandingRewards message. Also converts values to other types if specified. + * @param message ValidatorOutstandingRewards + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValidatorOutstandingRewards to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorSlashEvent. */ + interface IValidatorSlashEvent { + /** ValidatorSlashEvent validatorPeriod */ + validatorPeriod?: number | Long | null; + + /** ValidatorSlashEvent fraction */ + fraction?: string | null; + } + + /** Represents a ValidatorSlashEvent. */ + class ValidatorSlashEvent implements IValidatorSlashEvent { + /** + * Constructs a new ValidatorSlashEvent. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent); + + /** ValidatorSlashEvent validatorPeriod. */ + public validatorPeriod: number | Long; + + /** ValidatorSlashEvent fraction. */ + public fraction: string; + + /** + * Creates a new ValidatorSlashEvent instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSlashEvent instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, + ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; + + /** + * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. + * @param message ValidatorSlashEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ValidatorSlashEvent message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. + * @param message ValidatorSlashEvent message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; + + /** + * Decodes a ValidatorSlashEvent message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorSlashEvent + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; + + /** + * Verifies a ValidatorSlashEvent message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValidatorSlashEvent message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorSlashEvent + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; + + /** + * Creates a plain object from a ValidatorSlashEvent message. Also converts values to other types if specified. + * @param message ValidatorSlashEvent + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.ValidatorSlashEvent, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValidatorSlashEvent to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorSlashEvents. */ + interface IValidatorSlashEvents { + /** ValidatorSlashEvents validatorSlashEvents */ + validatorSlashEvents?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent[] | null; + } + + /** Represents a ValidatorSlashEvents. */ + class ValidatorSlashEvents implements IValidatorSlashEvents { + /** + * Constructs a new ValidatorSlashEvents. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents); + + /** ValidatorSlashEvents validatorSlashEvents. */ + public validatorSlashEvents: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent[]; + + /** + * Creates a new ValidatorSlashEvents instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSlashEvents instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, + ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; + + /** + * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. + * @param message ValidatorSlashEvents message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ValidatorSlashEvents message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. + * @param message ValidatorSlashEvents message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; + + /** + * Decodes a ValidatorSlashEvents message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorSlashEvents + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; + + /** + * Verifies a ValidatorSlashEvents message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValidatorSlashEvents message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorSlashEvents + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; + + /** + * Creates a plain object from a ValidatorSlashEvents message. Also converts values to other types if specified. + * @param message ValidatorSlashEvents + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.ValidatorSlashEvents, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValidatorSlashEvents to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FeePool. */ + interface IFeePool { + /** FeePool communityPool */ + communityPool?: cosmos_sdk.v1.IDecCoin[] | null; + } + + /** Represents a FeePool. */ + class FeePool implements IFeePool { + /** + * Constructs a new FeePool. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IFeePool); + + /** FeePool communityPool. */ + public communityPool: cosmos_sdk.v1.IDecCoin[]; + + /** + * Creates a new FeePool instance using the specified properties. + * @param [properties] Properties to set + * @returns FeePool instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IFeePool, + ): cosmos_sdk.x.distribution.v1.FeePool; + + /** + * Encodes the specified FeePool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. + * @param message FeePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IFeePool, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FeePool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. + * @param message FeePool message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IFeePool, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FeePool message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.FeePool; + + /** + * Decodes a FeePool message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeePool + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.FeePool; + + /** + * Verifies a FeePool message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a FeePool message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeePool + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.FeePool; + + /** + * Creates a plain object from a FeePool message. Also converts values to other types if specified. + * @param message FeePool + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.FeePool, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FeePool to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommunityPoolSpendProposal. */ + interface ICommunityPoolSpendProposal { + /** CommunityPoolSpendProposal title */ + title?: string | null; + + /** CommunityPoolSpendProposal description */ + description?: string | null; + + /** CommunityPoolSpendProposal recipient */ + recipient?: Uint8Array | null; + + /** CommunityPoolSpendProposal amount */ + amount?: cosmos_sdk.v1.ICoin[] | null; + } + + /** Represents a CommunityPoolSpendProposal. */ + class CommunityPoolSpendProposal implements ICommunityPoolSpendProposal { + /** + * Constructs a new CommunityPoolSpendProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal); + + /** CommunityPoolSpendProposal title. */ + public title: string; + + /** CommunityPoolSpendProposal description. */ + public description: string; + + /** CommunityPoolSpendProposal recipient. */ + public recipient: Uint8Array; + + /** CommunityPoolSpendProposal amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new CommunityPoolSpendProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns CommunityPoolSpendProposal instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, + ): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; + + /** + * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. + * @param message CommunityPoolSpendProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified CommunityPoolSpendProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. + * @param message CommunityPoolSpendProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; + + /** + * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommunityPoolSpendProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; + + /** + * Verifies a CommunityPoolSpendProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a CommunityPoolSpendProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommunityPoolSpendProposal + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; + + /** + * Creates a plain object from a CommunityPoolSpendProposal message. Also converts values to other types if specified. + * @param message CommunityPoolSpendProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this CommunityPoolSpendProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DelegatorStartingInfo. */ + interface IDelegatorStartingInfo { + /** DelegatorStartingInfo previousPeriod */ + previousPeriod?: number | Long | null; + + /** DelegatorStartingInfo stake */ + stake?: string | null; + + /** DelegatorStartingInfo height */ + height?: number | Long | null; + } + + /** Represents a DelegatorStartingInfo. */ + class DelegatorStartingInfo implements IDelegatorStartingInfo { + /** + * Constructs a new DelegatorStartingInfo. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo); + + /** DelegatorStartingInfo previousPeriod. */ + public previousPeriod: number | Long; + + /** DelegatorStartingInfo stake. */ + public stake: string; + + /** DelegatorStartingInfo height. */ + public height: number | Long; + + /** + * Creates a new DelegatorStartingInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DelegatorStartingInfo instance + */ + public static create( + properties?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, + ): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; + + /** + * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. + * @param message DelegatorStartingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DelegatorStartingInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. + * @param message DelegatorStartingInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; + + /** + * Decodes a DelegatorStartingInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DelegatorStartingInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; + + /** + * Verifies a DelegatorStartingInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a DelegatorStartingInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DelegatorStartingInfo + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; + + /** + * Creates a plain object from a DelegatorStartingInfo message. Also converts values to other types if specified. + * @param message DelegatorStartingInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.distribution.v1.DelegatorStartingInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DelegatorStartingInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace evidence. */ + namespace evidence { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgSubmitEvidence. */ + interface IMsgSubmitEvidence { + /** MsgSubmitEvidence submitter */ + submitter?: Uint8Array | null; + + /** MsgSubmitEvidence evidence */ + evidence?: google.protobuf.IAny | null; + } + + /** Represents a MsgSubmitEvidence. */ + class MsgSubmitEvidence implements IMsgSubmitEvidence { + /** + * Constructs a new MsgSubmitEvidence. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence); + + /** MsgSubmitEvidence submitter. */ + public submitter: Uint8Array; + + /** MsgSubmitEvidence evidence. */ + public evidence?: google.protobuf.IAny | null; + + /** + * Creates a new MsgSubmitEvidence instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSubmitEvidence instance + */ + public static create( + properties?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, + ): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; + + /** + * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. + * @param message MsgSubmitEvidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgSubmitEvidence message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. + * @param message MsgSubmitEvidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; + + /** + * Decodes a MsgSubmitEvidence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgSubmitEvidence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; + + /** + * Verifies a MsgSubmitEvidence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgSubmitEvidence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgSubmitEvidence + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; + + /** + * Creates a plain object from a MsgSubmitEvidence message. Also converts values to other types if specified. + * @param message MsgSubmitEvidence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.evidence.v1.MsgSubmitEvidence, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgSubmitEvidence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an Equivocation. */ + interface IEquivocation { + /** Equivocation height */ + height?: number | Long | null; + + /** Equivocation time */ + time?: google.protobuf.ITimestamp | null; + + /** Equivocation power */ + power?: number | Long | null; + + /** Equivocation consensusAddress */ + consensusAddress?: Uint8Array | null; + } + + /** Represents an Equivocation. */ + class Equivocation implements IEquivocation { + /** + * Constructs a new Equivocation. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.evidence.v1.IEquivocation); + + /** Equivocation height. */ + public height: number | Long; + + /** Equivocation time. */ + public time?: google.protobuf.ITimestamp | null; + + /** Equivocation power. */ + public power: number | Long; + + /** Equivocation consensusAddress. */ + public consensusAddress: Uint8Array; + + /** + * Creates a new Equivocation instance using the specified properties. + * @param [properties] Properties to set + * @returns Equivocation instance + */ + public static create( + properties?: cosmos_sdk.x.evidence.v1.IEquivocation, + ): cosmos_sdk.x.evidence.v1.Equivocation; + + /** + * Encodes the specified Equivocation message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. + * @param message Equivocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.evidence.v1.IEquivocation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Equivocation message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. + * @param message Equivocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.evidence.v1.IEquivocation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an Equivocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Equivocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.evidence.v1.Equivocation; + + /** + * Decodes an Equivocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Equivocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.evidence.v1.Equivocation; + + /** + * Verifies an Equivocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an Equivocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Equivocation + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.evidence.v1.Equivocation; + + /** + * Creates a plain object from an Equivocation message. Also converts values to other types if specified. + * @param message Equivocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.evidence.v1.Equivocation, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Equivocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace gov. */ + namespace gov { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgSubmitProposal. */ + interface IMsgSubmitProposal { + /** MsgSubmitProposal content */ + content?: google.protobuf.IAny | null; + + /** MsgSubmitProposal initialDeposit */ + initialDeposit?: cosmos_sdk.v1.ICoin[] | null; + + /** MsgSubmitProposal proposer */ + proposer?: Uint8Array | null; + } + + /** Represents a MsgSubmitProposal. */ + class MsgSubmitProposal implements IMsgSubmitProposal { + /** + * Constructs a new MsgSubmitProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal); + + /** MsgSubmitProposal content. */ + public content?: google.protobuf.IAny | null; + + /** MsgSubmitProposal initialDeposit. */ + public initialDeposit: cosmos_sdk.v1.ICoin[]; + + /** MsgSubmitProposal proposer. */ + public proposer: Uint8Array; + + /** + * Creates a new MsgSubmitProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgSubmitProposal instance + */ + public static create( + properties?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, + ): cosmos_sdk.x.gov.v1.MsgSubmitProposal; + + /** + * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. + * @param message MsgSubmitProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. + * @param message MsgSubmitProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.gov.v1.MsgSubmitProposal; + + /** + * Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgSubmitProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.gov.v1.MsgSubmitProposal; + + /** + * Verifies a MsgSubmitProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgSubmitProposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgSubmitProposal; + + /** + * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. + * @param message MsgSubmitProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.gov.v1.MsgSubmitProposal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgSubmitProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgVote. */ + interface IMsgVote { + /** MsgVote proposalId */ + proposalId?: number | Long | null; + + /** MsgVote voter */ + voter?: Uint8Array | null; + + /** MsgVote option */ + option?: cosmos_sdk.x.gov.v1.VoteOption | null; + } + + /** Represents a MsgVote. */ + class MsgVote implements IMsgVote { + /** + * Constructs a new MsgVote. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IMsgVote); + + /** MsgVote proposalId. */ + public proposalId: number | Long; + + /** MsgVote voter. */ + public voter: Uint8Array; + + /** MsgVote option. */ + public option: cosmos_sdk.x.gov.v1.VoteOption; + + /** + * Creates a new MsgVote instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgVote instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IMsgVote): cosmos_sdk.x.gov.v1.MsgVote; + + /** + * Encodes the specified MsgVote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. + * @param message MsgVote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.gov.v1.IMsgVote, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgVote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. + * @param message MsgVote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.gov.v1.IMsgVote, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgVote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.gov.v1.MsgVote; + + /** + * Decodes a MsgVote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgVote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.gov.v1.MsgVote; + + /** + * Verifies a MsgVote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgVote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgVote + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgVote; + + /** + * Creates a plain object from a MsgVote message. Also converts values to other types if specified. + * @param message MsgVote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.gov.v1.MsgVote, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgVote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgDeposit. */ + interface IMsgDeposit { + /** MsgDeposit proposalId */ + proposalId?: number | Long | null; + + /** MsgDeposit depositor */ + depositor?: Uint8Array | null; + + /** MsgDeposit amount */ + amount?: cosmos_sdk.v1.ICoin[] | null; + } + + /** Represents a MsgDeposit. */ + class MsgDeposit implements IMsgDeposit { + /** + * Constructs a new MsgDeposit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IMsgDeposit); + + /** MsgDeposit proposalId. */ + public proposalId: number | Long; + + /** MsgDeposit depositor. */ + public depositor: Uint8Array; + + /** MsgDeposit amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new MsgDeposit instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgDeposit instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IMsgDeposit): cosmos_sdk.x.gov.v1.MsgDeposit; + + /** + * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. + * @param message MsgDeposit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.gov.v1.IMsgDeposit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgDeposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. + * @param message MsgDeposit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.gov.v1.IMsgDeposit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.gov.v1.MsgDeposit; + + /** + * Decodes a MsgDeposit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgDeposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.gov.v1.MsgDeposit; + + /** + * Verifies a MsgDeposit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgDeposit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgDeposit + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgDeposit; + + /** + * Creates a plain object from a MsgDeposit message. Also converts values to other types if specified. + * @param message MsgDeposit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.gov.v1.MsgDeposit, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgDeposit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** VoteOption enum. */ + enum VoteOption { + VOTE_OPTION_UNSPECIFIED = 0, + VOTE_OPTION_YES = 1, + VOTE_OPTION_ABSTAIN = 2, + VOTE_OPTION_NO = 3, + VOTE_OPTION_NO_WITH_VETO = 4, + } + + /** Properties of a TextProposal. */ + interface ITextProposal { + /** TextProposal title */ + title?: string | null; + + /** TextProposal description */ + description?: string | null; + } + + /** Represents a TextProposal. */ + class TextProposal implements ITextProposal { + /** + * Constructs a new TextProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.ITextProposal); + + /** TextProposal title. */ + public title: string; + + /** TextProposal description. */ + public description: string; + + /** + * Creates a new TextProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns TextProposal instance + */ + public static create( + properties?: cosmos_sdk.x.gov.v1.ITextProposal, + ): cosmos_sdk.x.gov.v1.TextProposal; + + /** + * Encodes the specified TextProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. + * @param message TextProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.gov.v1.ITextProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. + * @param message TextProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.gov.v1.ITextProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a TextProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.gov.v1.TextProposal; + + /** + * Decodes a TextProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TextProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.gov.v1.TextProposal; + + /** + * Verifies a TextProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a TextProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TextProposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.TextProposal; + + /** + * Creates a plain object from a TextProposal message. Also converts values to other types if specified. + * @param message TextProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.gov.v1.TextProposal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this TextProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Deposit. */ + interface IDeposit { + /** Deposit proposalId */ + proposalId?: number | Long | null; + + /** Deposit depositor */ + depositor?: Uint8Array | null; + + /** Deposit amount */ + amount?: cosmos_sdk.v1.ICoin[] | null; + } + + /** Represents a Deposit. */ + class Deposit implements IDeposit { + /** + * Constructs a new Deposit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IDeposit); + + /** Deposit proposalId. */ + public proposalId: number | Long; + + /** Deposit depositor. */ + public depositor: Uint8Array; + + /** Deposit amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** + * Creates a new Deposit instance using the specified properties. + * @param [properties] Properties to set + * @returns Deposit instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IDeposit): cosmos_sdk.x.gov.v1.Deposit; + + /** + * Encodes the specified Deposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. + * @param message Deposit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.gov.v1.IDeposit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. + * @param message Deposit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.gov.v1.IDeposit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Deposit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.gov.v1.Deposit; + + /** + * Decodes a Deposit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deposit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.gov.v1.Deposit; + + /** + * Verifies a Deposit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Deposit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deposit + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Deposit; + + /** + * Creates a plain object from a Deposit message. Also converts values to other types if specified. + * @param message Deposit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.gov.v1.Deposit, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Deposit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Proposal. */ + interface IProposal { + /** Proposal proposalId */ + proposalId?: number | Long | null; + + /** Proposal content */ + content?: google.protobuf.IAny | null; + + /** Proposal status */ + status?: cosmos_sdk.x.gov.v1.ProposalStatus | null; + + /** Proposal finalTallyResult */ + finalTallyResult?: cosmos_sdk.x.gov.v1.ITallyResult | null; + + /** Proposal submitTime */ + submitTime?: google.protobuf.ITimestamp | null; + + /** Proposal depositEndTime */ + depositEndTime?: google.protobuf.ITimestamp | null; + + /** Proposal totalDeposit */ + totalDeposit?: cosmos_sdk.v1.ICoin[] | null; + + /** Proposal votingStartTime */ + votingStartTime?: google.protobuf.ITimestamp | null; + + /** Proposal votingEndTime */ + votingEndTime?: google.protobuf.ITimestamp | null; + } + + /** Represents a Proposal. */ + class Proposal implements IProposal { + /** + * Constructs a new Proposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IProposal); + + /** Proposal proposalId. */ + public proposalId: number | Long; + + /** Proposal content. */ + public content?: google.protobuf.IAny | null; + + /** Proposal status. */ + public status: cosmos_sdk.x.gov.v1.ProposalStatus; + + /** Proposal finalTallyResult. */ + public finalTallyResult?: cosmos_sdk.x.gov.v1.ITallyResult | null; + + /** Proposal submitTime. */ + public submitTime?: google.protobuf.ITimestamp | null; + + /** Proposal depositEndTime. */ + public depositEndTime?: google.protobuf.ITimestamp | null; + + /** Proposal totalDeposit. */ + public totalDeposit: cosmos_sdk.v1.ICoin[]; + + /** Proposal votingStartTime. */ + public votingStartTime?: google.protobuf.ITimestamp | null; + + /** Proposal votingEndTime. */ + public votingEndTime?: google.protobuf.ITimestamp | null; + + /** + * Creates a new Proposal instance using the specified properties. + * @param [properties] Properties to set + * @returns Proposal instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IProposal): cosmos_sdk.x.gov.v1.Proposal; + + /** + * Encodes the specified Proposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. + * @param message Proposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.gov.v1.IProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. + * @param message Proposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.gov.v1.IProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Proposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.gov.v1.Proposal; + + /** + * Decodes a Proposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Proposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.gov.v1.Proposal; + + /** + * Verifies a Proposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Proposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Proposal + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Proposal; + + /** + * Creates a plain object from a Proposal message. Also converts values to other types if specified. + * @param message Proposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.gov.v1.Proposal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Proposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** ProposalStatus enum. */ + enum ProposalStatus { + PROPOSAL_STATUS_UNSPECIFIED = 0, + PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, + PROPOSAL_STATUS_VOTING_PERIOD = 2, + PROPOSAL_STATUS_PASSED = 3, + PROPOSAL_STATUS_REJECTED = 4, + PROPOSAL_STATUS_FAILED = 5, + } + + /** Properties of a TallyResult. */ + interface ITallyResult { + /** TallyResult yes */ + yes?: string | null; + + /** TallyResult abstain */ + abstain?: string | null; + + /** TallyResult no */ + no?: string | null; + + /** TallyResult noWithVeto */ + noWithVeto?: string | null; + } + + /** Represents a TallyResult. */ + class TallyResult implements ITallyResult { + /** + * Constructs a new TallyResult. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.ITallyResult); + + /** TallyResult yes. */ + public yes: string; + + /** TallyResult abstain. */ + public abstain: string; + + /** TallyResult no. */ + public no: string; + + /** TallyResult noWithVeto. */ + public noWithVeto: string; + + /** + * Creates a new TallyResult instance using the specified properties. + * @param [properties] Properties to set + * @returns TallyResult instance + */ + public static create( + properties?: cosmos_sdk.x.gov.v1.ITallyResult, + ): cosmos_sdk.x.gov.v1.TallyResult; + + /** + * Encodes the specified TallyResult message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. + * @param message TallyResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.gov.v1.ITallyResult, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. + * @param message TallyResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.gov.v1.ITallyResult, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a TallyResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.gov.v1.TallyResult; + + /** + * Decodes a TallyResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TallyResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.gov.v1.TallyResult; + + /** + * Verifies a TallyResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TallyResult + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.TallyResult; + + /** + * Creates a plain object from a TallyResult message. Also converts values to other types if specified. + * @param message TallyResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.gov.v1.TallyResult, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this TallyResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Vote. */ + interface IVote { + /** Vote proposalId */ + proposalId?: number | Long | null; + + /** Vote voter */ + voter?: Uint8Array | null; + + /** Vote option */ + option?: cosmos_sdk.x.gov.v1.VoteOption | null; + } + + /** Represents a Vote. */ + class Vote implements IVote { + /** + * Constructs a new Vote. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.gov.v1.IVote); + + /** Vote proposalId. */ + public proposalId: number | Long; + + /** Vote voter. */ + public voter: Uint8Array; + + /** Vote option. */ + public option: cosmos_sdk.x.gov.v1.VoteOption; + + /** + * Creates a new Vote instance using the specified properties. + * @param [properties] Properties to set + * @returns Vote instance + */ + public static create(properties?: cosmos_sdk.x.gov.v1.IVote): cosmos_sdk.x.gov.v1.Vote; + + /** + * Encodes the specified Vote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. + * @param message Vote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.gov.v1.IVote, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. + * @param message Vote message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.gov.v1.IVote, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Vote message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.gov.v1.Vote; + + /** + * Decodes a Vote message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Vote + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.gov.v1.Vote; + + /** + * Verifies a Vote message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Vote message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Vote + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Vote; + + /** + * Creates a plain object from a Vote message. Also converts values to other types if specified. + * @param message Vote + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.gov.v1.Vote, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Vote to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace transfer. */ + namespace transfer { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgTransfer. */ + interface IMsgTransfer { + /** MsgTransfer sourcePort */ + sourcePort?: string | null; + + /** MsgTransfer sourceChannel */ + sourceChannel?: string | null; + + /** MsgTransfer amount */ + amount?: cosmos_sdk.v1.ICoin[] | null; + + /** MsgTransfer sender */ + sender?: Uint8Array | null; + + /** MsgTransfer receiver */ + receiver?: string | null; + + /** MsgTransfer timeoutHeight */ + timeoutHeight?: number | Long | null; + + /** MsgTransfer timeoutTimestamp */ + timeoutTimestamp?: number | Long | null; + } + + /** Represents a MsgTransfer. */ + class MsgTransfer implements IMsgTransfer { + /** + * Constructs a new MsgTransfer. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.transfer.v1.IMsgTransfer); + + /** MsgTransfer sourcePort. */ + public sourcePort: string; + + /** MsgTransfer sourceChannel. */ + public sourceChannel: string; + + /** MsgTransfer amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** MsgTransfer sender. */ + public sender: Uint8Array; + + /** MsgTransfer receiver. */ + public receiver: string; + + /** MsgTransfer timeoutHeight. */ + public timeoutHeight: number | Long; + + /** MsgTransfer timeoutTimestamp. */ + public timeoutTimestamp: number | Long; + + /** + * Creates a new MsgTransfer instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgTransfer instance + */ + public static create( + properties?: cosmos_sdk.x.transfer.v1.IMsgTransfer, + ): cosmos_sdk.x.transfer.v1.MsgTransfer; + + /** + * Encodes the specified MsgTransfer message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. + * @param message MsgTransfer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.transfer.v1.IMsgTransfer, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. + * @param message MsgTransfer message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.transfer.v1.IMsgTransfer, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.transfer.v1.MsgTransfer; + + /** + * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgTransfer + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.transfer.v1.MsgTransfer; + + /** + * Verifies a MsgTransfer message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgTransfer + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.transfer.v1.MsgTransfer; + + /** + * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. + * @param message MsgTransfer + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.transfer.v1.MsgTransfer, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgTransfer to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FungibleTokenPacketData. */ + interface IFungibleTokenPacketData { + /** FungibleTokenPacketData amount */ + amount?: cosmos_sdk.v1.ICoin[] | null; + + /** FungibleTokenPacketData sender */ + sender?: string | null; + + /** FungibleTokenPacketData receiver */ + receiver?: string | null; + } + + /** Represents a FungibleTokenPacketData. */ + class FungibleTokenPacketData implements IFungibleTokenPacketData { + /** + * Constructs a new FungibleTokenPacketData. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData); + + /** FungibleTokenPacketData amount. */ + public amount: cosmos_sdk.v1.ICoin[]; + + /** FungibleTokenPacketData sender. */ + public sender: string; + + /** FungibleTokenPacketData receiver. */ + public receiver: string; + + /** + * Creates a new FungibleTokenPacketData instance using the specified properties. + * @param [properties] Properties to set + * @returns FungibleTokenPacketData instance + */ + public static create( + properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, + ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; + + /** + * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. + * @param message FungibleTokenPacketData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. + * @param message FungibleTokenPacketData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FungibleTokenPacketData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FungibleTokenPacketData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; + + /** + * Decodes a FungibleTokenPacketData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FungibleTokenPacketData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; + + /** + * Verifies a FungibleTokenPacketData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a FungibleTokenPacketData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FungibleTokenPacketData + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; + + /** + * Creates a plain object from a FungibleTokenPacketData message. Also converts values to other types if specified. + * @param message FungibleTokenPacketData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.transfer.v1.FungibleTokenPacketData, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FungibleTokenPacketData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FungibleTokenPacketAcknowledgement. */ + interface IFungibleTokenPacketAcknowledgement { + /** FungibleTokenPacketAcknowledgement success */ + success?: boolean | null; + + /** FungibleTokenPacketAcknowledgement error */ + error?: string | null; + } + + /** Represents a FungibleTokenPacketAcknowledgement. */ + class FungibleTokenPacketAcknowledgement implements IFungibleTokenPacketAcknowledgement { + /** + * Constructs a new FungibleTokenPacketAcknowledgement. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement); + + /** FungibleTokenPacketAcknowledgement success. */ + public success: boolean; + + /** FungibleTokenPacketAcknowledgement error. */ + public error: string; + + /** + * Creates a new FungibleTokenPacketAcknowledgement instance using the specified properties. + * @param [properties] Properties to set + * @returns FungibleTokenPacketAcknowledgement instance + */ + public static create( + properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, + ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; + + /** + * Encodes the specified FungibleTokenPacketAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. + * @param message FungibleTokenPacketAcknowledgement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FungibleTokenPacketAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. + * @param message FungibleTokenPacketAcknowledgement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FungibleTokenPacketAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; + + /** + * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FungibleTokenPacketAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; + + /** + * Verifies a FungibleTokenPacketAcknowledgement message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a FungibleTokenPacketAcknowledgement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FungibleTokenPacketAcknowledgement + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; + + /** + * Creates a plain object from a FungibleTokenPacketAcknowledgement message. Also converts values to other types if specified. + * @param message FungibleTokenPacketAcknowledgement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FungibleTokenPacketAcknowledgement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace ibc. */ + namespace ibc { + /** Namespace connection. */ + namespace connection { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgConnectionOpenInit. */ + interface IMsgConnectionOpenInit { + /** MsgConnectionOpenInit clientId */ + clientId?: string | null; + + /** MsgConnectionOpenInit connectionId */ + connectionId?: string | null; + + /** MsgConnectionOpenInit counterparty */ + counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; + + /** MsgConnectionOpenInit signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgConnectionOpenInit. */ + class MsgConnectionOpenInit implements IMsgConnectionOpenInit { + /** + * Constructs a new MsgConnectionOpenInit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit); + + /** MsgConnectionOpenInit clientId. */ + public clientId: string; + + /** MsgConnectionOpenInit connectionId. */ + public connectionId: string; + + /** MsgConnectionOpenInit counterparty. */ + public counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; + + /** MsgConnectionOpenInit signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgConnectionOpenInit instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgConnectionOpenInit instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; + + /** + * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. + * @param message MsgConnectionOpenInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. + * @param message MsgConnectionOpenInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgConnectionOpenInit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgConnectionOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; + + /** + * Decodes a MsgConnectionOpenInit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgConnectionOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; + + /** + * Verifies a MsgConnectionOpenInit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgConnectionOpenInit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgConnectionOpenInit + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; + + /** + * Creates a plain object from a MsgConnectionOpenInit message. Also converts values to other types if specified. + * @param message MsgConnectionOpenInit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgConnectionOpenInit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgConnectionOpenTry. */ + interface IMsgConnectionOpenTry { + /** MsgConnectionOpenTry clientId */ + clientId?: string | null; + + /** MsgConnectionOpenTry connectionId */ + connectionId?: string | null; + + /** MsgConnectionOpenTry counterparty */ + counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; + + /** MsgConnectionOpenTry counterpartyVersions */ + counterpartyVersions?: string[] | null; + + /** MsgConnectionOpenTry proofInit */ + proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenTry proofHeight */ + proofHeight?: number | Long | null; + + /** MsgConnectionOpenTry proofConsensus */ + proofConsensus?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenTry consensusHeight */ + consensusHeight?: number | Long | null; + + /** MsgConnectionOpenTry signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgConnectionOpenTry. */ + class MsgConnectionOpenTry implements IMsgConnectionOpenTry { + /** + * Constructs a new MsgConnectionOpenTry. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry); + + /** MsgConnectionOpenTry clientId. */ + public clientId: string; + + /** MsgConnectionOpenTry connectionId. */ + public connectionId: string; + + /** MsgConnectionOpenTry counterparty. */ + public counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; + + /** MsgConnectionOpenTry counterpartyVersions. */ + public counterpartyVersions: string[]; + + /** MsgConnectionOpenTry proofInit. */ + public proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenTry proofHeight. */ + public proofHeight: number | Long; + + /** MsgConnectionOpenTry proofConsensus. */ + public proofConsensus?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenTry consensusHeight. */ + public consensusHeight: number | Long; + + /** MsgConnectionOpenTry signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgConnectionOpenTry instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgConnectionOpenTry instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; + + /** + * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. + * @param message MsgConnectionOpenTry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. + * @param message MsgConnectionOpenTry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgConnectionOpenTry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgConnectionOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; + + /** + * Decodes a MsgConnectionOpenTry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgConnectionOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; + + /** + * Verifies a MsgConnectionOpenTry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgConnectionOpenTry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgConnectionOpenTry + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; + + /** + * Creates a plain object from a MsgConnectionOpenTry message. Also converts values to other types if specified. + * @param message MsgConnectionOpenTry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgConnectionOpenTry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgConnectionOpenAck. */ + interface IMsgConnectionOpenAck { + /** MsgConnectionOpenAck connectionId */ + connectionId?: string | null; + + /** MsgConnectionOpenAck version */ + version?: string | null; + + /** MsgConnectionOpenAck proofTry */ + proofTry?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenAck proofHeight */ + proofHeight?: number | Long | null; + + /** MsgConnectionOpenAck proofConsensus */ + proofConsensus?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenAck consensusHeight */ + consensusHeight?: number | Long | null; + + /** MsgConnectionOpenAck signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgConnectionOpenAck. */ + class MsgConnectionOpenAck implements IMsgConnectionOpenAck { + /** + * Constructs a new MsgConnectionOpenAck. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck); + + /** MsgConnectionOpenAck connectionId. */ + public connectionId: string; + + /** MsgConnectionOpenAck version. */ + public version: string; + + /** MsgConnectionOpenAck proofTry. */ + public proofTry?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenAck proofHeight. */ + public proofHeight: number | Long; + + /** MsgConnectionOpenAck proofConsensus. */ + public proofConsensus?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenAck consensusHeight. */ + public consensusHeight: number | Long; + + /** MsgConnectionOpenAck signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgConnectionOpenAck instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgConnectionOpenAck instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; + + /** + * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. + * @param message MsgConnectionOpenAck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. + * @param message MsgConnectionOpenAck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgConnectionOpenAck message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgConnectionOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; + + /** + * Decodes a MsgConnectionOpenAck message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgConnectionOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; + + /** + * Verifies a MsgConnectionOpenAck message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgConnectionOpenAck message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgConnectionOpenAck + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; + + /** + * Creates a plain object from a MsgConnectionOpenAck message. Also converts values to other types if specified. + * @param message MsgConnectionOpenAck + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgConnectionOpenAck to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgConnectionOpenConfirm. */ + interface IMsgConnectionOpenConfirm { + /** MsgConnectionOpenConfirm connectionId */ + connectionId?: string | null; + + /** MsgConnectionOpenConfirm proofAck */ + proofAck?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenConfirm proofHeight */ + proofHeight?: number | Long | null; + + /** MsgConnectionOpenConfirm signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgConnectionOpenConfirm. */ + class MsgConnectionOpenConfirm implements IMsgConnectionOpenConfirm { + /** + * Constructs a new MsgConnectionOpenConfirm. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm); + + /** MsgConnectionOpenConfirm connectionId. */ + public connectionId: string; + + /** MsgConnectionOpenConfirm proofAck. */ + public proofAck?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgConnectionOpenConfirm proofHeight. */ + public proofHeight: number | Long; + + /** MsgConnectionOpenConfirm signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgConnectionOpenConfirm instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgConnectionOpenConfirm instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; + + /** + * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. + * @param message MsgConnectionOpenConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. + * @param message MsgConnectionOpenConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgConnectionOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; + + /** + * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgConnectionOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; + + /** + * Verifies a MsgConnectionOpenConfirm message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgConnectionOpenConfirm message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgConnectionOpenConfirm + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; + + /** + * Creates a plain object from a MsgConnectionOpenConfirm message. Also converts values to other types if specified. + * @param message MsgConnectionOpenConfirm + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgConnectionOpenConfirm to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ConnectionEnd. */ + interface IConnectionEnd { + /** ConnectionEnd id */ + id?: string | null; + + /** ConnectionEnd clientId */ + clientId?: string | null; + + /** ConnectionEnd versions */ + versions?: string[] | null; + + /** ConnectionEnd state */ + state?: cosmos_sdk.x.ibc.connection.v1.State | null; + + /** ConnectionEnd counterparty */ + counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; + } + + /** Represents a ConnectionEnd. */ + class ConnectionEnd implements IConnectionEnd { + /** + * Constructs a new ConnectionEnd. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd); + + /** ConnectionEnd id. */ + public id: string; + + /** ConnectionEnd clientId. */ + public clientId: string; + + /** ConnectionEnd versions. */ + public versions: string[]; + + /** ConnectionEnd state. */ + public state: cosmos_sdk.x.ibc.connection.v1.State; + + /** ConnectionEnd counterparty. */ + public counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; + + /** + * Creates a new ConnectionEnd instance using the specified properties. + * @param [properties] Properties to set + * @returns ConnectionEnd instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, + ): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; + + /** + * Encodes the specified ConnectionEnd message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. + * @param message ConnectionEnd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. + * @param message ConnectionEnd message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ConnectionEnd message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConnectionEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; + + /** + * Decodes a ConnectionEnd message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConnectionEnd + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; + + /** + * Verifies a ConnectionEnd message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ConnectionEnd message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConnectionEnd + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; + + /** + * Creates a plain object from a ConnectionEnd message. Also converts values to other types if specified. + * @param message ConnectionEnd + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.connection.v1.ConnectionEnd, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ConnectionEnd to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNINITIALIZED_UNSPECIFIED = 0, + STATE_INIT = 1, + STATE_TRYOPEN = 2, + STATE_OPEN = 3, + } + + /** Properties of a Counterparty. */ + interface ICounterparty { + /** Counterparty clientId */ + clientId?: string | null; + + /** Counterparty connectionId */ + connectionId?: string | null; + + /** Counterparty prefix */ + prefix?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix | null; + } + + /** Represents a Counterparty. */ + class Counterparty implements ICounterparty { + /** + * Constructs a new Counterparty. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.ICounterparty); + + /** Counterparty clientId. */ + public clientId: string; + + /** Counterparty connectionId. */ + public connectionId: string; + + /** Counterparty prefix. */ + public prefix?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix | null; + + /** + * Creates a new Counterparty instance using the specified properties. + * @param [properties] Properties to set + * @returns Counterparty instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.connection.v1.ICounterparty, + ): cosmos_sdk.x.ibc.connection.v1.Counterparty; + + /** + * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. + * @param message Counterparty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.connection.v1.ICounterparty, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. + * @param message Counterparty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.connection.v1.ICounterparty, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Counterparty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.connection.v1.Counterparty; + + /** + * Decodes a Counterparty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.connection.v1.Counterparty; + + /** + * Verifies a Counterparty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Counterparty + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.connection.v1.Counterparty; + + /** + * Creates a plain object from a Counterparty message. Also converts values to other types if specified. + * @param message Counterparty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.connection.v1.Counterparty, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Counterparty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClientPaths. */ + interface IClientPaths { + /** ClientPaths paths */ + paths?: string[] | null; + } + + /** Represents a ClientPaths. */ + class ClientPaths implements IClientPaths { + /** + * Constructs a new ClientPaths. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IClientPaths); + + /** ClientPaths paths. */ + public paths: string[]; + + /** + * Creates a new ClientPaths instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientPaths instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.connection.v1.IClientPaths, + ): cosmos_sdk.x.ibc.connection.v1.ClientPaths; + + /** + * Encodes the specified ClientPaths message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. + * @param message ClientPaths message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.connection.v1.IClientPaths, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ClientPaths message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. + * @param message ClientPaths message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.connection.v1.IClientPaths, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ClientPaths message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.connection.v1.ClientPaths; + + /** + * Decodes a ClientPaths message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientPaths + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.connection.v1.ClientPaths; + + /** + * Verifies a ClientPaths message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ClientPaths message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientPaths + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.connection.v1.ClientPaths; + + /** + * Creates a plain object from a ClientPaths message. Also converts values to other types if specified. + * @param message ClientPaths + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.connection.v1.ClientPaths, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ClientPaths to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace channel. */ + namespace channel { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgChannelOpenInit. */ + interface IMsgChannelOpenInit { + /** MsgChannelOpenInit portId */ + portId?: string | null; + + /** MsgChannelOpenInit channelId */ + channelId?: string | null; + + /** MsgChannelOpenInit channel */ + channel?: cosmos_sdk.x.ibc.channel.v1.IChannel | null; + + /** MsgChannelOpenInit signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgChannelOpenInit. */ + class MsgChannelOpenInit implements IMsgChannelOpenInit { + /** + * Constructs a new MsgChannelOpenInit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit); + + /** MsgChannelOpenInit portId. */ + public portId: string; + + /** MsgChannelOpenInit channelId. */ + public channelId: string; + + /** MsgChannelOpenInit channel. */ + public channel?: cosmos_sdk.x.ibc.channel.v1.IChannel | null; + + /** MsgChannelOpenInit signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelOpenInit instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelOpenInit instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; + + /** + * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. + * @param message MsgChannelOpenInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. + * @param message MsgChannelOpenInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgChannelOpenInit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; + + /** + * Decodes a MsgChannelOpenInit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelOpenInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; + + /** + * Verifies a MsgChannelOpenInit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgChannelOpenInit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelOpenInit + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; + + /** + * Creates a plain object from a MsgChannelOpenInit message. Also converts values to other types if specified. + * @param message MsgChannelOpenInit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgChannelOpenInit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelOpenTry. */ + interface IMsgChannelOpenTry { + /** MsgChannelOpenTry portId */ + portId?: string | null; + + /** MsgChannelOpenTry channelId */ + channelId?: string | null; + + /** MsgChannelOpenTry channel */ + channel?: cosmos_sdk.x.ibc.channel.v1.IChannel | null; + + /** MsgChannelOpenTry counterpartyVersion */ + counterpartyVersion?: string | null; + + /** MsgChannelOpenTry proofInit */ + proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgChannelOpenTry proofHeight */ + proofHeight?: number | Long | null; + + /** MsgChannelOpenTry signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgChannelOpenTry. */ + class MsgChannelOpenTry implements IMsgChannelOpenTry { + /** + * Constructs a new MsgChannelOpenTry. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry); + + /** MsgChannelOpenTry portId. */ + public portId: string; + + /** MsgChannelOpenTry channelId. */ + public channelId: string; + + /** MsgChannelOpenTry channel. */ + public channel?: cosmos_sdk.x.ibc.channel.v1.IChannel | null; + + /** MsgChannelOpenTry counterpartyVersion. */ + public counterpartyVersion: string; + + /** MsgChannelOpenTry proofInit. */ + public proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgChannelOpenTry proofHeight. */ + public proofHeight: number | Long; + + /** MsgChannelOpenTry signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelOpenTry instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelOpenTry instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; + + /** + * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. + * @param message MsgChannelOpenTry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. + * @param message MsgChannelOpenTry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgChannelOpenTry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; + + /** + * Decodes a MsgChannelOpenTry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelOpenTry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; + + /** + * Verifies a MsgChannelOpenTry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgChannelOpenTry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelOpenTry + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; + + /** + * Creates a plain object from a MsgChannelOpenTry message. Also converts values to other types if specified. + * @param message MsgChannelOpenTry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgChannelOpenTry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelOpenAck. */ + interface IMsgChannelOpenAck { + /** MsgChannelOpenAck portId */ + portId?: string | null; + + /** MsgChannelOpenAck channelId */ + channelId?: string | null; + + /** MsgChannelOpenAck counterpartyVersion */ + counterpartyVersion?: string | null; + + /** MsgChannelOpenAck proofTry */ + proofTry?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgChannelOpenAck proofHeight */ + proofHeight?: number | Long | null; + + /** MsgChannelOpenAck signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgChannelOpenAck. */ + class MsgChannelOpenAck implements IMsgChannelOpenAck { + /** + * Constructs a new MsgChannelOpenAck. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck); + + /** MsgChannelOpenAck portId. */ + public portId: string; + + /** MsgChannelOpenAck channelId. */ + public channelId: string; + + /** MsgChannelOpenAck counterpartyVersion. */ + public counterpartyVersion: string; + + /** MsgChannelOpenAck proofTry. */ + public proofTry?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgChannelOpenAck proofHeight. */ + public proofHeight: number | Long; + + /** MsgChannelOpenAck signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelOpenAck instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelOpenAck instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; + + /** + * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. + * @param message MsgChannelOpenAck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. + * @param message MsgChannelOpenAck message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgChannelOpenAck message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; + + /** + * Decodes a MsgChannelOpenAck message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelOpenAck + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; + + /** + * Verifies a MsgChannelOpenAck message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgChannelOpenAck message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelOpenAck + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; + + /** + * Creates a plain object from a MsgChannelOpenAck message. Also converts values to other types if specified. + * @param message MsgChannelOpenAck + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgChannelOpenAck to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelOpenConfirm. */ + interface IMsgChannelOpenConfirm { + /** MsgChannelOpenConfirm portId */ + portId?: string | null; + + /** MsgChannelOpenConfirm channelId */ + channelId?: string | null; + + /** MsgChannelOpenConfirm proofAck */ + proofAck?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgChannelOpenConfirm proofHeight */ + proofHeight?: number | Long | null; + + /** MsgChannelOpenConfirm signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgChannelOpenConfirm. */ + class MsgChannelOpenConfirm implements IMsgChannelOpenConfirm { + /** + * Constructs a new MsgChannelOpenConfirm. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm); + + /** MsgChannelOpenConfirm portId. */ + public portId: string; + + /** MsgChannelOpenConfirm channelId. */ + public channelId: string; + + /** MsgChannelOpenConfirm proofAck. */ + public proofAck?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgChannelOpenConfirm proofHeight. */ + public proofHeight: number | Long; + + /** MsgChannelOpenConfirm signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelOpenConfirm instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelOpenConfirm instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; + + /** + * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. + * @param message MsgChannelOpenConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. + * @param message MsgChannelOpenConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; + + /** + * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelOpenConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; + + /** + * Verifies a MsgChannelOpenConfirm message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgChannelOpenConfirm message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelOpenConfirm + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; + + /** + * Creates a plain object from a MsgChannelOpenConfirm message. Also converts values to other types if specified. + * @param message MsgChannelOpenConfirm + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgChannelOpenConfirm to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelCloseInit. */ + interface IMsgChannelCloseInit { + /** MsgChannelCloseInit portId */ + portId?: string | null; + + /** MsgChannelCloseInit channelId */ + channelId?: string | null; + + /** MsgChannelCloseInit signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgChannelCloseInit. */ + class MsgChannelCloseInit implements IMsgChannelCloseInit { + /** + * Constructs a new MsgChannelCloseInit. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit); + + /** MsgChannelCloseInit portId. */ + public portId: string; + + /** MsgChannelCloseInit channelId. */ + public channelId: string; + + /** MsgChannelCloseInit signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelCloseInit instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelCloseInit instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; + + /** + * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. + * @param message MsgChannelCloseInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. + * @param message MsgChannelCloseInit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgChannelCloseInit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelCloseInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; + + /** + * Decodes a MsgChannelCloseInit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelCloseInit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; + + /** + * Verifies a MsgChannelCloseInit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgChannelCloseInit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelCloseInit + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; + + /** + * Creates a plain object from a MsgChannelCloseInit message. Also converts values to other types if specified. + * @param message MsgChannelCloseInit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgChannelCloseInit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgChannelCloseConfirm. */ + interface IMsgChannelCloseConfirm { + /** MsgChannelCloseConfirm portId */ + portId?: string | null; + + /** MsgChannelCloseConfirm channelId */ + channelId?: string | null; + + /** MsgChannelCloseConfirm proofInit */ + proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgChannelCloseConfirm proofHeight */ + proofHeight?: number | Long | null; + + /** MsgChannelCloseConfirm signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgChannelCloseConfirm. */ + class MsgChannelCloseConfirm implements IMsgChannelCloseConfirm { + /** + * Constructs a new MsgChannelCloseConfirm. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm); + + /** MsgChannelCloseConfirm portId. */ + public portId: string; + + /** MsgChannelCloseConfirm channelId. */ + public channelId: string; + + /** MsgChannelCloseConfirm proofInit. */ + public proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgChannelCloseConfirm proofHeight. */ + public proofHeight: number | Long; + + /** MsgChannelCloseConfirm signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgChannelCloseConfirm instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgChannelCloseConfirm instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; + + /** + * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. + * @param message MsgChannelCloseConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. + * @param message MsgChannelCloseConfirm message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgChannelCloseConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; + + /** + * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgChannelCloseConfirm + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; + + /** + * Verifies a MsgChannelCloseConfirm message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgChannelCloseConfirm message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgChannelCloseConfirm + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; + + /** + * Creates a plain object from a MsgChannelCloseConfirm message. Also converts values to other types if specified. + * @param message MsgChannelCloseConfirm + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgChannelCloseConfirm to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgPacket. */ + interface IMsgPacket { + /** MsgPacket packet */ + packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; + + /** MsgPacket proof */ + proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgPacket proofHeight */ + proofHeight?: number | Long | null; + + /** MsgPacket signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgPacket. */ + class MsgPacket implements IMsgPacket { + /** + * Constructs a new MsgPacket. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket); + + /** MsgPacket packet. */ + public packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; + + /** MsgPacket proof. */ + public proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgPacket proofHeight. */ + public proofHeight: number | Long; + + /** MsgPacket signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgPacket instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgPacket instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, + ): cosmos_sdk.x.ibc.channel.v1.MsgPacket; + + /** + * Encodes the specified MsgPacket message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. + * @param message MsgPacket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgPacket message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. + * @param message MsgPacket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgPacket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgPacket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.MsgPacket; + + /** + * Decodes a MsgPacket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgPacket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.MsgPacket; + + /** + * Verifies a MsgPacket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgPacket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgPacket + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgPacket; + + /** + * Creates a plain object from a MsgPacket message. Also converts values to other types if specified. + * @param message MsgPacket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.MsgPacket, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgPacket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgTimeout. */ + interface IMsgTimeout { + /** MsgTimeout packet */ + packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; + + /** MsgTimeout proof */ + proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgTimeout proofHeight */ + proofHeight?: number | Long | null; + + /** MsgTimeout nextSequenceRecv */ + nextSequenceRecv?: number | Long | null; + + /** MsgTimeout signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgTimeout. */ + class MsgTimeout implements IMsgTimeout { + /** + * Constructs a new MsgTimeout. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout); + + /** MsgTimeout packet. */ + public packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; + + /** MsgTimeout proof. */ + public proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgTimeout proofHeight. */ + public proofHeight: number | Long; + + /** MsgTimeout nextSequenceRecv. */ + public nextSequenceRecv: number | Long; + + /** MsgTimeout signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgTimeout instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgTimeout instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, + ): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; + + /** + * Encodes the specified MsgTimeout message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. + * @param message MsgTimeout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. + * @param message MsgTimeout message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgTimeout message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; + + /** + * Decodes a MsgTimeout message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgTimeout + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; + + /** + * Verifies a MsgTimeout message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgTimeout message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgTimeout + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; + + /** + * Creates a plain object from a MsgTimeout message. Also converts values to other types if specified. + * @param message MsgTimeout + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.MsgTimeout, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgTimeout to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgAcknowledgement. */ + interface IMsgAcknowledgement { + /** MsgAcknowledgement packet */ + packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; + + /** MsgAcknowledgement acknowledgement */ + acknowledgement?: Uint8Array | null; + + /** MsgAcknowledgement proof */ + proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgAcknowledgement proofHeight */ + proofHeight?: number | Long | null; + + /** MsgAcknowledgement signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgAcknowledgement. */ + class MsgAcknowledgement implements IMsgAcknowledgement { + /** + * Constructs a new MsgAcknowledgement. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement); + + /** MsgAcknowledgement packet. */ + public packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; + + /** MsgAcknowledgement acknowledgement. */ + public acknowledgement: Uint8Array; + + /** MsgAcknowledgement proof. */ + public proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; + + /** MsgAcknowledgement proofHeight. */ + public proofHeight: number | Long; + + /** MsgAcknowledgement signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgAcknowledgement instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgAcknowledgement instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, + ): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; + + /** + * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. + * @param message MsgAcknowledgement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. + * @param message MsgAcknowledgement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgAcknowledgement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; + + /** + * Decodes a MsgAcknowledgement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgAcknowledgement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; + + /** + * Verifies a MsgAcknowledgement message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgAcknowledgement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgAcknowledgement + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; + + /** + * Creates a plain object from a MsgAcknowledgement message. Also converts values to other types if specified. + * @param message MsgAcknowledgement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgAcknowledgement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Channel. */ + interface IChannel { + /** Channel state */ + state?: cosmos_sdk.x.ibc.channel.v1.State | null; + + /** Channel ordering */ + ordering?: cosmos_sdk.x.ibc.channel.v1.Order | null; + + /** Channel counterparty */ + counterparty?: cosmos_sdk.x.ibc.channel.v1.ICounterparty | null; + + /** Channel connectionHops */ + connectionHops?: string[] | null; + + /** Channel version */ + version?: string | null; + } + + /** Represents a Channel. */ + class Channel implements IChannel { + /** + * Constructs a new Channel. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IChannel); + + /** Channel state. */ + public state: cosmos_sdk.x.ibc.channel.v1.State; + + /** Channel ordering. */ + public ordering: cosmos_sdk.x.ibc.channel.v1.Order; + + /** Channel counterparty. */ + public counterparty?: cosmos_sdk.x.ibc.channel.v1.ICounterparty | null; + + /** Channel connectionHops. */ + public connectionHops: string[]; + + /** Channel version. */ + public version: string; + + /** + * Creates a new Channel instance using the specified properties. + * @param [properties] Properties to set + * @returns Channel instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IChannel, + ): cosmos_sdk.x.ibc.channel.v1.Channel; + + /** + * Encodes the specified Channel message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. + * @param message Channel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IChannel, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Channel message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. + * @param message Channel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IChannel, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Channel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.Channel; + + /** + * Decodes a Channel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Channel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.Channel; + + /** + * Verifies a Channel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Channel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Channel + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Channel; + + /** + * Creates a plain object from a Channel message. Also converts values to other types if specified. + * @param message Channel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.Channel, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Channel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** State enum. */ + enum State { + STATE_UNINITIALIZED_UNSPECIFIED = 0, + STATE_INIT = 1, + STATE_TRYOPEN = 2, + STATE_OPEN = 3, + STATE_CLOSED = 4, + } + + /** Order enum. */ + enum Order { + ORDER_NONE_UNSPECIFIED = 0, + ORDER_UNORDERED = 1, + ORDER_ORDERED = 2, + } + + /** Properties of a Counterparty. */ + interface ICounterparty { + /** Counterparty portId */ + portId?: string | null; + + /** Counterparty channelId */ + channelId?: string | null; + } + + /** Represents a Counterparty. */ + class Counterparty implements ICounterparty { + /** + * Constructs a new Counterparty. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.ICounterparty); + + /** Counterparty portId. */ + public portId: string; + + /** Counterparty channelId. */ + public channelId: string; + + /** + * Creates a new Counterparty instance using the specified properties. + * @param [properties] Properties to set + * @returns Counterparty instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.ICounterparty, + ): cosmos_sdk.x.ibc.channel.v1.Counterparty; + + /** + * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. + * @param message Counterparty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.ICounterparty, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. + * @param message Counterparty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.ICounterparty, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Counterparty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.Counterparty; + + /** + * Decodes a Counterparty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Counterparty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.Counterparty; + + /** + * Verifies a Counterparty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Counterparty + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Counterparty; + + /** + * Creates a plain object from a Counterparty message. Also converts values to other types if specified. + * @param message Counterparty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.Counterparty, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Counterparty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Packet. */ + interface IPacket { + /** Packet sequence */ + sequence?: number | Long | null; + + /** Packet sourcePort */ + sourcePort?: string | null; + + /** Packet sourceChannel */ + sourceChannel?: string | null; + + /** Packet destinationPort */ + destinationPort?: string | null; + + /** Packet destinationChannel */ + destinationChannel?: string | null; + + /** Packet data */ + data?: Uint8Array | null; + + /** Packet timeoutHeight */ + timeoutHeight?: number | Long | null; + + /** Packet timeoutTimestamp */ + timeoutTimestamp?: number | Long | null; + } + + /** Represents a Packet. */ + class Packet implements IPacket { + /** + * Constructs a new Packet. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IPacket); + + /** Packet sequence. */ + public sequence: number | Long; + + /** Packet sourcePort. */ + public sourcePort: string; + + /** Packet sourceChannel. */ + public sourceChannel: string; + + /** Packet destinationPort. */ + public destinationPort: string; + + /** Packet destinationChannel. */ + public destinationChannel: string; + + /** Packet data. */ + public data: Uint8Array; + + /** Packet timeoutHeight. */ + public timeoutHeight: number | Long; + + /** Packet timeoutTimestamp. */ + public timeoutTimestamp: number | Long; + + /** + * Creates a new Packet instance using the specified properties. + * @param [properties] Properties to set + * @returns Packet instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.channel.v1.IPacket, + ): cosmos_sdk.x.ibc.channel.v1.Packet; + + /** + * Encodes the specified Packet message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. + * @param message Packet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.channel.v1.IPacket, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Packet message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. + * @param message Packet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.channel.v1.IPacket, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Packet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Packet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.channel.v1.Packet; + + /** + * Decodes a Packet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Packet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.channel.v1.Packet; + + /** + * Verifies a Packet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Packet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Packet + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Packet; + + /** + * Creates a plain object from a Packet message. Also converts values to other types if specified. + * @param message Packet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.channel.v1.Packet, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Packet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace commitment. */ + namespace commitment { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MerkleRoot. */ + interface IMerkleRoot { + /** MerkleRoot hash */ + hash?: Uint8Array | null; + } + + /** Represents a MerkleRoot. */ + class MerkleRoot implements IMerkleRoot { + /** + * Constructs a new MerkleRoot. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot); + + /** MerkleRoot hash. */ + public hash: Uint8Array; + + /** + * Creates a new MerkleRoot instance using the specified properties. + * @param [properties] Properties to set + * @returns MerkleRoot instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, + ): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; + + /** + * Encodes the specified MerkleRoot message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. + * @param message MerkleRoot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MerkleRoot message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. + * @param message MerkleRoot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MerkleRoot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerkleRoot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; + + /** + * Decodes a MerkleRoot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerkleRoot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; + + /** + * Verifies a MerkleRoot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MerkleRoot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerkleRoot + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; + + /** + * Creates a plain object from a MerkleRoot message. Also converts values to other types if specified. + * @param message MerkleRoot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.commitment.v1.MerkleRoot, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MerkleRoot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MerklePrefix. */ + interface IMerklePrefix { + /** MerklePrefix keyPrefix */ + keyPrefix?: Uint8Array | null; + } + + /** Represents a MerklePrefix. */ + class MerklePrefix implements IMerklePrefix { + /** + * Constructs a new MerklePrefix. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix); + + /** MerklePrefix keyPrefix. */ + public keyPrefix: Uint8Array; + + /** + * Creates a new MerklePrefix instance using the specified properties. + * @param [properties] Properties to set + * @returns MerklePrefix instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, + ): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; + + /** + * Encodes the specified MerklePrefix message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. + * @param message MerklePrefix message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. + * @param message MerklePrefix message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MerklePrefix message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerklePrefix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; + + /** + * Decodes a MerklePrefix message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerklePrefix + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; + + /** + * Verifies a MerklePrefix message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MerklePrefix message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerklePrefix + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; + + /** + * Creates a plain object from a MerklePrefix message. Also converts values to other types if specified. + * @param message MerklePrefix + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.commitment.v1.MerklePrefix, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MerklePrefix to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MerklePath. */ + interface IMerklePath { + /** MerklePath keyPath */ + keyPath?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath | null; + } + + /** Represents a MerklePath. */ + class MerklePath implements IMerklePath { + /** + * Constructs a new MerklePath. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath); + + /** MerklePath keyPath. */ + public keyPath?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath | null; + + /** + * Creates a new MerklePath instance using the specified properties. + * @param [properties] Properties to set + * @returns MerklePath instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, + ): cosmos_sdk.x.ibc.commitment.v1.MerklePath; + + /** + * Encodes the specified MerklePath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. + * @param message MerklePath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. + * @param message MerklePath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MerklePath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerklePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.commitment.v1.MerklePath; + + /** + * Decodes a MerklePath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerklePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.commitment.v1.MerklePath; + + /** + * Verifies a MerklePath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MerklePath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerklePath + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerklePath; + + /** + * Creates a plain object from a MerklePath message. Also converts values to other types if specified. + * @param message MerklePath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.commitment.v1.MerklePath, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MerklePath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MerkleProof. */ + interface IMerkleProof { + /** MerkleProof proof */ + proof?: tendermint.crypto.merkle.IProof | null; + } + + /** Represents a MerkleProof. */ + class MerkleProof implements IMerkleProof { + /** + * Constructs a new MerkleProof. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof); + + /** MerkleProof proof. */ + public proof?: tendermint.crypto.merkle.IProof | null; + + /** + * Creates a new MerkleProof instance using the specified properties. + * @param [properties] Properties to set + * @returns MerkleProof instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, + ): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; + + /** + * Encodes the specified MerkleProof message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. + * @param message MerkleProof message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. + * @param message MerkleProof message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MerkleProof message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MerkleProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; + + /** + * Decodes a MerkleProof message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MerkleProof + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; + + /** + * Verifies a MerkleProof message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MerkleProof message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MerkleProof + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; + + /** + * Creates a plain object from a MerkleProof message. Also converts values to other types if specified. + * @param message MerkleProof + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.commitment.v1.MerkleProof, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MerkleProof to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a KeyPath. */ + interface IKeyPath { + /** KeyPath keys */ + keys?: cosmos_sdk.x.ibc.commitment.v1.IKey[] | null; + } + + /** Represents a KeyPath. */ + class KeyPath implements IKeyPath { + /** + * Constructs a new KeyPath. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath); + + /** KeyPath keys. */ + public keys: cosmos_sdk.x.ibc.commitment.v1.IKey[]; + + /** + * Creates a new KeyPath instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyPath instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, + ): cosmos_sdk.x.ibc.commitment.v1.KeyPath; + + /** + * Encodes the specified KeyPath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. + * @param message KeyPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified KeyPath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. + * @param message KeyPath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a KeyPath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.commitment.v1.KeyPath; + + /** + * Decodes a KeyPath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyPath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.commitment.v1.KeyPath; + + /** + * Verifies a KeyPath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a KeyPath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyPath + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.KeyPath; + + /** + * Creates a plain object from a KeyPath message. Also converts values to other types if specified. + * @param message KeyPath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.commitment.v1.KeyPath, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this KeyPath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Key. */ + interface IKey { + /** Key name */ + name?: Uint8Array | null; + + /** Key enc */ + enc?: cosmos_sdk.x.ibc.commitment.v1.KeyEncoding | null; + } + + /** Represents a Key. */ + class Key implements IKey { + /** + * Constructs a new Key. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IKey); + + /** Key name. */ + public name: Uint8Array; + + /** Key enc. */ + public enc: cosmos_sdk.x.ibc.commitment.v1.KeyEncoding; + + /** + * Creates a new Key instance using the specified properties. + * @param [properties] Properties to set + * @returns Key instance + */ + public static create( + properties?: cosmos_sdk.x.ibc.commitment.v1.IKey, + ): cosmos_sdk.x.ibc.commitment.v1.Key; + + /** + * Encodes the specified Key message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. + * @param message Key message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.ibc.commitment.v1.IKey, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Key message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. + * @param message Key message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.ibc.commitment.v1.IKey, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Key message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.ibc.commitment.v1.Key; + + /** + * Decodes a Key message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.ibc.commitment.v1.Key; + + /** + * Verifies a Key message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Key message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Key + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.Key; + + /** + * Creates a plain object from a Key message. Also converts values to other types if specified. + * @param message Key + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.ibc.commitment.v1.Key, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Key to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** KeyEncoding enum. */ + enum KeyEncoding { + KEY_ENCODING_URL_UNSPECIFIED = 0, + KEY_ENCODING_HEX = 1, + } + } + } + } + + /** Namespace mint. */ + namespace mint { + /** Namespace v1. */ + namespace v1 { + /** Properties of a Minter. */ + interface IMinter { + /** Minter inflation */ + inflation?: string | null; + + /** Minter annualProvisions */ + annualProvisions?: string | null; + } + + /** Represents a Minter. */ + class Minter implements IMinter { + /** + * Constructs a new Minter. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.mint.v1.IMinter); + + /** Minter inflation. */ + public inflation: string; + + /** Minter annualProvisions. */ + public annualProvisions: string; + + /** + * Creates a new Minter instance using the specified properties. + * @param [properties] Properties to set + * @returns Minter instance + */ + public static create(properties?: cosmos_sdk.x.mint.v1.IMinter): cosmos_sdk.x.mint.v1.Minter; + + /** + * Encodes the specified Minter message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. + * @param message Minter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.mint.v1.IMinter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Minter message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. + * @param message Minter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.mint.v1.IMinter, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Minter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Minter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.mint.v1.Minter; + + /** + * Decodes a Minter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Minter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.mint.v1.Minter; + + /** + * Verifies a Minter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Minter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Minter + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.mint.v1.Minter; + + /** + * Creates a plain object from a Minter message. Also converts values to other types if specified. + * @param message Minter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.mint.v1.Minter, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Minter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Params. */ + interface IParams { + /** Params mintDenom */ + mintDenom?: string | null; + + /** Params inflationRateChange */ + inflationRateChange?: string | null; + + /** Params inflationMax */ + inflationMax?: string | null; + + /** Params inflationMin */ + inflationMin?: string | null; + + /** Params goalBonded */ + goalBonded?: string | null; + + /** Params blocksPerYear */ + blocksPerYear?: number | Long | null; + } + + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.mint.v1.IParams); + + /** Params mintDenom. */ + public mintDenom: string; + + /** Params inflationRateChange. */ + public inflationRateChange: string; + + /** Params inflationMax. */ + public inflationMax: string; + + /** Params inflationMin. */ + public inflationMin: string; + + /** Params goalBonded. */ + public goalBonded: string; + + /** Params blocksPerYear. */ + public blocksPerYear: number | Long; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: cosmos_sdk.x.mint.v1.IParams): cosmos_sdk.x.mint.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.mint.v1.IParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.mint.v1.IParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.mint.v1.Params; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.mint.v1.Params; + + /** + * Verifies a Params message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Params + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.mint.v1.Params; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @param message Params + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.mint.v1.Params, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Params to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace params. */ + namespace params { + /** Namespace v1. */ + namespace v1 { + /** Properties of a ParameterChangeProposal. */ + interface IParameterChangeProposal { + /** ParameterChangeProposal title */ + title?: string | null; + + /** ParameterChangeProposal description */ + description?: string | null; + + /** ParameterChangeProposal changes */ + changes?: cosmos_sdk.x.params.v1.IParamChange[] | null; + } + + /** Represents a ParameterChangeProposal. */ + class ParameterChangeProposal implements IParameterChangeProposal { + /** + * Constructs a new ParameterChangeProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.params.v1.IParameterChangeProposal); + + /** ParameterChangeProposal title. */ + public title: string; + + /** ParameterChangeProposal description. */ + public description: string; + + /** ParameterChangeProposal changes. */ + public changes: cosmos_sdk.x.params.v1.IParamChange[]; + + /** + * Creates a new ParameterChangeProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns ParameterChangeProposal instance + */ + public static create( + properties?: cosmos_sdk.x.params.v1.IParameterChangeProposal, + ): cosmos_sdk.x.params.v1.ParameterChangeProposal; + + /** + * Encodes the specified ParameterChangeProposal message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. + * @param message ParameterChangeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.params.v1.IParameterChangeProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ParameterChangeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. + * @param message ParameterChangeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.params.v1.IParameterChangeProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ParameterChangeProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParameterChangeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.params.v1.ParameterChangeProposal; + + /** + * Decodes a ParameterChangeProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParameterChangeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.params.v1.ParameterChangeProposal; + + /** + * Verifies a ParameterChangeProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ParameterChangeProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParameterChangeProposal + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.params.v1.ParameterChangeProposal; + + /** + * Creates a plain object from a ParameterChangeProposal message. Also converts values to other types if specified. + * @param message ParameterChangeProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.params.v1.ParameterChangeProposal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ParameterChangeProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ParamChange. */ + interface IParamChange { + /** ParamChange subspace */ + subspace?: string | null; + + /** ParamChange key */ + key?: string | null; + + /** ParamChange value */ + value?: string | null; + } + + /** Represents a ParamChange. */ + class ParamChange implements IParamChange { + /** + * Constructs a new ParamChange. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.params.v1.IParamChange); + + /** ParamChange subspace. */ + public subspace: string; + + /** ParamChange key. */ + public key: string; + + /** ParamChange value. */ + public value: string; + + /** + * Creates a new ParamChange instance using the specified properties. + * @param [properties] Properties to set + * @returns ParamChange instance + */ + public static create( + properties?: cosmos_sdk.x.params.v1.IParamChange, + ): cosmos_sdk.x.params.v1.ParamChange; + + /** + * Encodes the specified ParamChange message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. + * @param message ParamChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.params.v1.IParamChange, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ParamChange message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. + * @param message ParamChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.params.v1.IParamChange, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ParamChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParamChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.params.v1.ParamChange; + + /** + * Decodes a ParamChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParamChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.params.v1.ParamChange; + + /** + * Verifies a ParamChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ParamChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParamChange + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.params.v1.ParamChange; + + /** + * Creates a plain object from a ParamChange message. Also converts values to other types if specified. + * @param message ParamChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.params.v1.ParamChange, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ParamChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace slashing. */ + namespace slashing { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgUnjail. */ + interface IMsgUnjail { + /** MsgUnjail validatorAddr */ + validatorAddr?: Uint8Array | null; + } + + /** Represents a MsgUnjail. */ + class MsgUnjail implements IMsgUnjail { + /** + * Constructs a new MsgUnjail. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.slashing.v1.IMsgUnjail); + + /** MsgUnjail validatorAddr. */ + public validatorAddr: Uint8Array; + + /** + * Creates a new MsgUnjail instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgUnjail instance + */ + public static create( + properties?: cosmos_sdk.x.slashing.v1.IMsgUnjail, + ): cosmos_sdk.x.slashing.v1.MsgUnjail; + + /** + * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. + * @param message MsgUnjail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.slashing.v1.IMsgUnjail, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgUnjail message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. + * @param message MsgUnjail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.slashing.v1.IMsgUnjail, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.slashing.v1.MsgUnjail; + + /** + * Decodes a MsgUnjail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgUnjail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.slashing.v1.MsgUnjail; + + /** + * Verifies a MsgUnjail message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgUnjail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgUnjail + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.slashing.v1.MsgUnjail; + + /** + * Creates a plain object from a MsgUnjail message. Also converts values to other types if specified. + * @param message MsgUnjail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.slashing.v1.MsgUnjail, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgUnjail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorSigningInfo. */ + interface IValidatorSigningInfo { + /** ValidatorSigningInfo address */ + address?: Uint8Array | null; + + /** ValidatorSigningInfo startHeight */ + startHeight?: number | Long | null; + + /** ValidatorSigningInfo indexOffset */ + indexOffset?: number | Long | null; + + /** ValidatorSigningInfo jailedUntil */ + jailedUntil?: google.protobuf.ITimestamp | null; + + /** ValidatorSigningInfo tombstoned */ + tombstoned?: boolean | null; + + /** ValidatorSigningInfo missedBlocksCounter */ + missedBlocksCounter?: number | Long | null; + } + + /** Represents a ValidatorSigningInfo. */ + class ValidatorSigningInfo implements IValidatorSigningInfo { + /** + * Constructs a new ValidatorSigningInfo. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo); + + /** ValidatorSigningInfo address. */ + public address: Uint8Array; + + /** ValidatorSigningInfo startHeight. */ + public startHeight: number | Long; + + /** ValidatorSigningInfo indexOffset. */ + public indexOffset: number | Long; + + /** ValidatorSigningInfo jailedUntil. */ + public jailedUntil?: google.protobuf.ITimestamp | null; + + /** ValidatorSigningInfo tombstoned. */ + public tombstoned: boolean; + + /** ValidatorSigningInfo missedBlocksCounter. */ + public missedBlocksCounter: number | Long; + + /** + * Creates a new ValidatorSigningInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ValidatorSigningInfo instance + */ + public static create( + properties?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, + ): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; + + /** + * Encodes the specified ValidatorSigningInfo message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. + * @param message ValidatorSigningInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ValidatorSigningInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. + * @param message ValidatorSigningInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorSigningInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValidatorSigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; + + /** + * Decodes a ValidatorSigningInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValidatorSigningInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; + + /** + * Verifies a ValidatorSigningInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValidatorSigningInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorSigningInfo + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; + + /** + * Creates a plain object from a ValidatorSigningInfo message. Also converts values to other types if specified. + * @param message ValidatorSigningInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.slashing.v1.ValidatorSigningInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValidatorSigningInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace staking. */ + namespace staking { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgCreateValidator. */ + interface IMsgCreateValidator { + /** MsgCreateValidator description */ + description?: cosmos_sdk.x.staking.v1.IDescription | null; + + /** MsgCreateValidator commission */ + commission?: cosmos_sdk.x.staking.v1.ICommissionRates | null; + + /** MsgCreateValidator minSelfDelegation */ + minSelfDelegation?: string | null; + + /** MsgCreateValidator delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** MsgCreateValidator validatorAddress */ + validatorAddress?: Uint8Array | null; + + /** MsgCreateValidator pubkey */ + pubkey?: string | null; + + /** MsgCreateValidator value */ + value?: cosmos_sdk.v1.ICoin | null; + } + + /** Represents a MsgCreateValidator. */ + class MsgCreateValidator implements IMsgCreateValidator { + /** + * Constructs a new MsgCreateValidator. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgCreateValidator); + + /** MsgCreateValidator description. */ + public description?: cosmos_sdk.x.staking.v1.IDescription | null; + + /** MsgCreateValidator commission. */ + public commission?: cosmos_sdk.x.staking.v1.ICommissionRates | null; + + /** MsgCreateValidator minSelfDelegation. */ + public minSelfDelegation: string; + + /** MsgCreateValidator delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgCreateValidator validatorAddress. */ + public validatorAddress: Uint8Array; + + /** MsgCreateValidator pubkey. */ + public pubkey: string; + + /** MsgCreateValidator value. */ + public value?: cosmos_sdk.v1.ICoin | null; + + /** + * Creates a new MsgCreateValidator instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgCreateValidator instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IMsgCreateValidator, + ): cosmos_sdk.x.staking.v1.MsgCreateValidator; + + /** + * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. + * @param message MsgCreateValidator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IMsgCreateValidator, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgCreateValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. + * @param message MsgCreateValidator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IMsgCreateValidator, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.MsgCreateValidator; + + /** + * Decodes a MsgCreateValidator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgCreateValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.MsgCreateValidator; + + /** + * Verifies a MsgCreateValidator message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgCreateValidator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgCreateValidator + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgCreateValidator; + + /** + * Creates a plain object from a MsgCreateValidator message. Also converts values to other types if specified. + * @param message MsgCreateValidator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.MsgCreateValidator, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgCreateValidator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgEditValidator. */ + interface IMsgEditValidator { + /** MsgEditValidator description */ + description?: cosmos_sdk.x.staking.v1.IDescription | null; + + /** MsgEditValidator validatorAddress */ + validatorAddress?: Uint8Array | null; + + /** MsgEditValidator commissionRate */ + commissionRate?: string | null; + + /** MsgEditValidator minSelfDelegation */ + minSelfDelegation?: string | null; + } + + /** Represents a MsgEditValidator. */ + class MsgEditValidator implements IMsgEditValidator { + /** + * Constructs a new MsgEditValidator. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgEditValidator); + + /** MsgEditValidator description. */ + public description?: cosmos_sdk.x.staking.v1.IDescription | null; + + /** MsgEditValidator validatorAddress. */ + public validatorAddress: Uint8Array; + + /** MsgEditValidator commissionRate. */ + public commissionRate: string; + + /** MsgEditValidator minSelfDelegation. */ + public minSelfDelegation: string; + + /** + * Creates a new MsgEditValidator instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgEditValidator instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IMsgEditValidator, + ): cosmos_sdk.x.staking.v1.MsgEditValidator; + + /** + * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. + * @param message MsgEditValidator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IMsgEditValidator, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgEditValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. + * @param message MsgEditValidator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IMsgEditValidator, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.MsgEditValidator; + + /** + * Decodes a MsgEditValidator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgEditValidator + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.MsgEditValidator; + + /** + * Verifies a MsgEditValidator message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgEditValidator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgEditValidator + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgEditValidator; + + /** + * Creates a plain object from a MsgEditValidator message. Also converts values to other types if specified. + * @param message MsgEditValidator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.MsgEditValidator, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgEditValidator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgDelegate. */ + interface IMsgDelegate { + /** MsgDelegate delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** MsgDelegate validatorAddress */ + validatorAddress?: Uint8Array | null; + + /** MsgDelegate amount */ + amount?: cosmos_sdk.v1.ICoin | null; + } + + /** Represents a MsgDelegate. */ + class MsgDelegate implements IMsgDelegate { + /** + * Constructs a new MsgDelegate. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgDelegate); + + /** MsgDelegate delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgDelegate validatorAddress. */ + public validatorAddress: Uint8Array; + + /** MsgDelegate amount. */ + public amount?: cosmos_sdk.v1.ICoin | null; + + /** + * Creates a new MsgDelegate instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgDelegate instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IMsgDelegate, + ): cosmos_sdk.x.staking.v1.MsgDelegate; + + /** + * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. + * @param message MsgDelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IMsgDelegate, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgDelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. + * @param message MsgDelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IMsgDelegate, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.MsgDelegate; + + /** + * Decodes a MsgDelegate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgDelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.MsgDelegate; + + /** + * Verifies a MsgDelegate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgDelegate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgDelegate + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgDelegate; + + /** + * Creates a plain object from a MsgDelegate message. Also converts values to other types if specified. + * @param message MsgDelegate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.MsgDelegate, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgDelegate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgBeginRedelegate. */ + interface IMsgBeginRedelegate { + /** MsgBeginRedelegate delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** MsgBeginRedelegate validatorSrcAddress */ + validatorSrcAddress?: Uint8Array | null; + + /** MsgBeginRedelegate validatorDstAddress */ + validatorDstAddress?: Uint8Array | null; + + /** MsgBeginRedelegate amount */ + amount?: cosmos_sdk.v1.ICoin | null; + } + + /** Represents a MsgBeginRedelegate. */ + class MsgBeginRedelegate implements IMsgBeginRedelegate { + /** + * Constructs a new MsgBeginRedelegate. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate); + + /** MsgBeginRedelegate delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgBeginRedelegate validatorSrcAddress. */ + public validatorSrcAddress: Uint8Array; + + /** MsgBeginRedelegate validatorDstAddress. */ + public validatorDstAddress: Uint8Array; + + /** MsgBeginRedelegate amount. */ + public amount?: cosmos_sdk.v1.ICoin | null; + + /** + * Creates a new MsgBeginRedelegate instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgBeginRedelegate instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, + ): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; + + /** + * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. + * @param message MsgBeginRedelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgBeginRedelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. + * @param message MsgBeginRedelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; + + /** + * Decodes a MsgBeginRedelegate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgBeginRedelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; + + /** + * Verifies a MsgBeginRedelegate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgBeginRedelegate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgBeginRedelegate + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; + + /** + * Creates a plain object from a MsgBeginRedelegate message. Also converts values to other types if specified. + * @param message MsgBeginRedelegate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.MsgBeginRedelegate, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgBeginRedelegate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MsgUndelegate. */ + interface IMsgUndelegate { + /** MsgUndelegate delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** MsgUndelegate validatorAddress */ + validatorAddress?: Uint8Array | null; + + /** MsgUndelegate amount */ + amount?: cosmos_sdk.v1.ICoin | null; + } + + /** Represents a MsgUndelegate. */ + class MsgUndelegate implements IMsgUndelegate { + /** + * Constructs a new MsgUndelegate. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IMsgUndelegate); + + /** MsgUndelegate delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** MsgUndelegate validatorAddress. */ + public validatorAddress: Uint8Array; + + /** MsgUndelegate amount. */ + public amount?: cosmos_sdk.v1.ICoin | null; + + /** + * Creates a new MsgUndelegate instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgUndelegate instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IMsgUndelegate, + ): cosmos_sdk.x.staking.v1.MsgUndelegate; + + /** + * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. + * @param message MsgUndelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IMsgUndelegate, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgUndelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. + * @param message MsgUndelegate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IMsgUndelegate, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.MsgUndelegate; + + /** + * Decodes a MsgUndelegate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgUndelegate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.MsgUndelegate; + + /** + * Verifies a MsgUndelegate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgUndelegate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgUndelegate + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgUndelegate; + + /** + * Creates a plain object from a MsgUndelegate message. Also converts values to other types if specified. + * @param message MsgUndelegate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.MsgUndelegate, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgUndelegate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a HistoricalInfo. */ + interface IHistoricalInfo { + /** HistoricalInfo header */ + header?: tendermint.abci.types.IHeader | null; + + /** HistoricalInfo valset */ + valset?: cosmos_sdk.x.staking.v1.IValidator[] | null; + } + + /** Represents a HistoricalInfo. */ + class HistoricalInfo implements IHistoricalInfo { + /** + * Constructs a new HistoricalInfo. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IHistoricalInfo); + + /** HistoricalInfo header. */ + public header?: tendermint.abci.types.IHeader | null; + + /** HistoricalInfo valset. */ + public valset: cosmos_sdk.x.staking.v1.IValidator[]; + + /** + * Creates a new HistoricalInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns HistoricalInfo instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IHistoricalInfo, + ): cosmos_sdk.x.staking.v1.HistoricalInfo; + + /** + * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. + * @param message HistoricalInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IHistoricalInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified HistoricalInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. + * @param message HistoricalInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IHistoricalInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.HistoricalInfo; + + /** + * Decodes a HistoricalInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HistoricalInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.HistoricalInfo; + + /** + * Verifies a HistoricalInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a HistoricalInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HistoricalInfo + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.HistoricalInfo; + + /** + * Creates a plain object from a HistoricalInfo message. Also converts values to other types if specified. + * @param message HistoricalInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.HistoricalInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this HistoricalInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CommissionRates. */ + interface ICommissionRates { + /** CommissionRates rate */ + rate?: string | null; + + /** CommissionRates maxRate */ + maxRate?: string | null; + + /** CommissionRates maxChangeRate */ + maxChangeRate?: string | null; + } + + /** Represents a CommissionRates. */ + class CommissionRates implements ICommissionRates { + /** + * Constructs a new CommissionRates. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.ICommissionRates); + + /** CommissionRates rate. */ + public rate: string; + + /** CommissionRates maxRate. */ + public maxRate: string; + + /** CommissionRates maxChangeRate. */ + public maxChangeRate: string; + + /** + * Creates a new CommissionRates instance using the specified properties. + * @param [properties] Properties to set + * @returns CommissionRates instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.ICommissionRates, + ): cosmos_sdk.x.staking.v1.CommissionRates; + + /** + * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. + * @param message CommissionRates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.ICommissionRates, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified CommissionRates message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. + * @param message CommissionRates message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.ICommissionRates, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CommissionRates message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.CommissionRates; + + /** + * Decodes a CommissionRates message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommissionRates + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.CommissionRates; + + /** + * Verifies a CommissionRates message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a CommissionRates message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommissionRates + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.CommissionRates; + + /** + * Creates a plain object from a CommissionRates message. Also converts values to other types if specified. + * @param message CommissionRates + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.CommissionRates, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this CommissionRates to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Commission. */ + interface ICommission { + /** Commission commissionRates */ + commissionRates?: cosmos_sdk.x.staking.v1.ICommissionRates | null; + + /** Commission updateTime */ + updateTime?: google.protobuf.ITimestamp | null; + } + + /** Represents a Commission. */ + class Commission implements ICommission { + /** + * Constructs a new Commission. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.ICommission); + + /** Commission commissionRates. */ + public commissionRates?: cosmos_sdk.x.staking.v1.ICommissionRates | null; + + /** Commission updateTime. */ + public updateTime?: google.protobuf.ITimestamp | null; + + /** + * Creates a new Commission instance using the specified properties. + * @param [properties] Properties to set + * @returns Commission instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.ICommission, + ): cosmos_sdk.x.staking.v1.Commission; + + /** + * Encodes the specified Commission message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. + * @param message Commission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.ICommission, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Commission message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. + * @param message Commission message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.ICommission, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Commission message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.Commission; + + /** + * Decodes a Commission message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Commission + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.Commission; + + /** + * Verifies a Commission message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Commission message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Commission + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Commission; + + /** + * Creates a plain object from a Commission message. Also converts values to other types if specified. + * @param message Commission + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.Commission, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Commission to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Description. */ + interface IDescription { + /** Description moniker */ + moniker?: string | null; + + /** Description identity */ + identity?: string | null; + + /** Description website */ + website?: string | null; + + /** Description securityContact */ + securityContact?: string | null; + + /** Description details */ + details?: string | null; + } + + /** Represents a Description. */ + class Description implements IDescription { + /** + * Constructs a new Description. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDescription); + + /** Description moniker. */ + public moniker: string; + + /** Description identity. */ + public identity: string; + + /** Description website. */ + public website: string; + + /** Description securityContact. */ + public securityContact: string; + + /** Description details. */ + public details: string; + + /** + * Creates a new Description instance using the specified properties. + * @param [properties] Properties to set + * @returns Description instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IDescription, + ): cosmos_sdk.x.staking.v1.Description; + + /** + * Encodes the specified Description message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. + * @param message Description message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IDescription, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Description message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. + * @param message Description message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IDescription, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Description message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.Description; + + /** + * Decodes a Description message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Description + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.Description; + + /** + * Verifies a Description message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Description message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Description + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Description; + + /** + * Creates a plain object from a Description message. Also converts values to other types if specified. + * @param message Description + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.Description, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Description to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Validator. */ + interface IValidator { + /** Validator operatorAddress */ + operatorAddress?: Uint8Array | null; + + /** Validator consensusPubkey */ + consensusPubkey?: string | null; + + /** Validator jailed */ + jailed?: boolean | null; + + /** Validator status */ + status?: number | null; + + /** Validator tokens */ + tokens?: string | null; + + /** Validator delegatorShares */ + delegatorShares?: string | null; + + /** Validator description */ + description?: cosmos_sdk.x.staking.v1.IDescription | null; + + /** Validator unbondingHeight */ + unbondingHeight?: number | Long | null; + + /** Validator unbondingTime */ + unbondingTime?: google.protobuf.ITimestamp | null; + + /** Validator commission */ + commission?: cosmos_sdk.x.staking.v1.ICommission | null; + + /** Validator minSelfDelegation */ + minSelfDelegation?: string | null; + } + + /** Represents a Validator. */ + class Validator implements IValidator { + /** + * Constructs a new Validator. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IValidator); + + /** Validator operatorAddress. */ + public operatorAddress: Uint8Array; + + /** Validator consensusPubkey. */ + public consensusPubkey: string; + + /** Validator jailed. */ + public jailed: boolean; + + /** Validator status. */ + public status: number; + + /** Validator tokens. */ + public tokens: string; + + /** Validator delegatorShares. */ + public delegatorShares: string; + + /** Validator description. */ + public description?: cosmos_sdk.x.staking.v1.IDescription | null; + + /** Validator unbondingHeight. */ + public unbondingHeight: number | Long; + + /** Validator unbondingTime. */ + public unbondingTime?: google.protobuf.ITimestamp | null; + + /** Validator commission. */ + public commission?: cosmos_sdk.x.staking.v1.ICommission | null; + + /** Validator minSelfDelegation. */ + public minSelfDelegation: string; + + /** + * Creates a new Validator instance using the specified properties. + * @param [properties] Properties to set + * @returns Validator instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IValidator, + ): cosmos_sdk.x.staking.v1.Validator; + + /** + * Encodes the specified Validator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. + * @param message Validator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IValidator, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. + * @param message Validator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IValidator, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.Validator; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.Validator; + + /** + * Verifies a Validator message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Validator + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Validator; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @param message Validator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.Validator, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Validator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DVPair. */ + interface IDVPair { + /** DVPair delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** DVPair validatorAddress */ + validatorAddress?: Uint8Array | null; + } + + /** Represents a DVPair. */ + class DVPair implements IDVPair { + /** + * Constructs a new DVPair. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDVPair); + + /** DVPair delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** DVPair validatorAddress. */ + public validatorAddress: Uint8Array; + + /** + * Creates a new DVPair instance using the specified properties. + * @param [properties] Properties to set + * @returns DVPair instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IDVPair): cosmos_sdk.x.staking.v1.DVPair; + + /** + * Encodes the specified DVPair message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. + * @param message DVPair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IDVPair, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DVPair message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. + * @param message DVPair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IDVPair, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DVPair message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.DVPair; + + /** + * Decodes a DVPair message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DVPair + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.DVPair; + + /** + * Verifies a DVPair message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a DVPair message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DVPair + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVPair; + + /** + * Creates a plain object from a DVPair message. Also converts values to other types if specified. + * @param message DVPair + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.DVPair, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DVPair to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DVPairs. */ + interface IDVPairs { + /** DVPairs pairs */ + pairs?: cosmos_sdk.x.staking.v1.IDVPair[] | null; + } + + /** Represents a DVPairs. */ + class DVPairs implements IDVPairs { + /** + * Constructs a new DVPairs. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDVPairs); + + /** DVPairs pairs. */ + public pairs: cosmos_sdk.x.staking.v1.IDVPair[]; + + /** + * Creates a new DVPairs instance using the specified properties. + * @param [properties] Properties to set + * @returns DVPairs instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IDVPairs, + ): cosmos_sdk.x.staking.v1.DVPairs; + + /** + * Encodes the specified DVPairs message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. + * @param message DVPairs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IDVPairs, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DVPairs message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. + * @param message DVPairs message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IDVPairs, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DVPairs message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.DVPairs; + + /** + * Decodes a DVPairs message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DVPairs + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.DVPairs; + + /** + * Verifies a DVPairs message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a DVPairs message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DVPairs + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVPairs; + + /** + * Creates a plain object from a DVPairs message. Also converts values to other types if specified. + * @param message DVPairs + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.DVPairs, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DVPairs to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DVVTriplet. */ + interface IDVVTriplet { + /** DVVTriplet delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** DVVTriplet validatorSrcAddress */ + validatorSrcAddress?: Uint8Array | null; + + /** DVVTriplet validatorDstAddress */ + validatorDstAddress?: Uint8Array | null; + } + + /** Represents a DVVTriplet. */ + class DVVTriplet implements IDVVTriplet { + /** + * Constructs a new DVVTriplet. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDVVTriplet); + + /** DVVTriplet delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** DVVTriplet validatorSrcAddress. */ + public validatorSrcAddress: Uint8Array; + + /** DVVTriplet validatorDstAddress. */ + public validatorDstAddress: Uint8Array; + + /** + * Creates a new DVVTriplet instance using the specified properties. + * @param [properties] Properties to set + * @returns DVVTriplet instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IDVVTriplet, + ): cosmos_sdk.x.staking.v1.DVVTriplet; + + /** + * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. + * @param message DVVTriplet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IDVVTriplet, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DVVTriplet message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. + * @param message DVVTriplet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IDVVTriplet, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.DVVTriplet; + + /** + * Decodes a DVVTriplet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DVVTriplet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.DVVTriplet; + + /** + * Verifies a DVVTriplet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a DVVTriplet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DVVTriplet + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVVTriplet; + + /** + * Creates a plain object from a DVVTriplet message. Also converts values to other types if specified. + * @param message DVVTriplet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.DVVTriplet, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DVVTriplet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DVVTriplets. */ + interface IDVVTriplets { + /** DVVTriplets triplets */ + triplets?: cosmos_sdk.x.staking.v1.IDVVTriplet[] | null; + } + + /** Represents a DVVTriplets. */ + class DVVTriplets implements IDVVTriplets { + /** + * Constructs a new DVVTriplets. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDVVTriplets); + + /** DVVTriplets triplets. */ + public triplets: cosmos_sdk.x.staking.v1.IDVVTriplet[]; + + /** + * Creates a new DVVTriplets instance using the specified properties. + * @param [properties] Properties to set + * @returns DVVTriplets instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IDVVTriplets, + ): cosmos_sdk.x.staking.v1.DVVTriplets; + + /** + * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. + * @param message DVVTriplets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IDVVTriplets, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DVVTriplets message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. + * @param message DVVTriplets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IDVVTriplets, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.DVVTriplets; + + /** + * Decodes a DVVTriplets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DVVTriplets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.DVVTriplets; + + /** + * Verifies a DVVTriplets message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a DVVTriplets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DVVTriplets + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVVTriplets; + + /** + * Creates a plain object from a DVVTriplets message. Also converts values to other types if specified. + * @param message DVVTriplets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.DVVTriplets, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DVVTriplets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Delegation. */ + interface IDelegation { + /** Delegation delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** Delegation validatorAddress */ + validatorAddress?: Uint8Array | null; + + /** Delegation shares */ + shares?: string | null; + } + + /** Represents a Delegation. */ + class Delegation implements IDelegation { + /** + * Constructs a new Delegation. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IDelegation); + + /** Delegation delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** Delegation validatorAddress. */ + public validatorAddress: Uint8Array; + + /** Delegation shares. */ + public shares: string; + + /** + * Creates a new Delegation instance using the specified properties. + * @param [properties] Properties to set + * @returns Delegation instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IDelegation, + ): cosmos_sdk.x.staking.v1.Delegation; + + /** + * Encodes the specified Delegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. + * @param message Delegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IDelegation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Delegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. + * @param message Delegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IDelegation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Delegation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.Delegation; + + /** + * Decodes a Delegation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Delegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.Delegation; + + /** + * Verifies a Delegation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Delegation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Delegation + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Delegation; + + /** + * Creates a plain object from a Delegation message. Also converts values to other types if specified. + * @param message Delegation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.Delegation, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Delegation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnbondingDelegation. */ + interface IUnbondingDelegation { + /** UnbondingDelegation delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** UnbondingDelegation validatorAddress */ + validatorAddress?: Uint8Array | null; + + /** UnbondingDelegation entries */ + entries?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry[] | null; + } + + /** Represents an UnbondingDelegation. */ + class UnbondingDelegation implements IUnbondingDelegation { + /** + * Constructs a new UnbondingDelegation. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegation); + + /** UnbondingDelegation delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** UnbondingDelegation validatorAddress. */ + public validatorAddress: Uint8Array; + + /** UnbondingDelegation entries. */ + public entries: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry[]; + + /** + * Creates a new UnbondingDelegation instance using the specified properties. + * @param [properties] Properties to set + * @returns UnbondingDelegation instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegation, + ): cosmos_sdk.x.staking.v1.UnbondingDelegation; + + /** + * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. + * @param message UnbondingDelegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IUnbondingDelegation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UnbondingDelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. + * @param message UnbondingDelegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IUnbondingDelegation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.UnbondingDelegation; + + /** + * Decodes an UnbondingDelegation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnbondingDelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.UnbondingDelegation; + + /** + * Verifies an UnbondingDelegation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an UnbondingDelegation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnbondingDelegation + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.UnbondingDelegation; + + /** + * Creates a plain object from an UnbondingDelegation message. Also converts values to other types if specified. + * @param message UnbondingDelegation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.UnbondingDelegation, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UnbondingDelegation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UnbondingDelegationEntry. */ + interface IUnbondingDelegationEntry { + /** UnbondingDelegationEntry creationHeight */ + creationHeight?: number | Long | null; + + /** UnbondingDelegationEntry completionTime */ + completionTime?: google.protobuf.ITimestamp | null; + + /** UnbondingDelegationEntry initialBalance */ + initialBalance?: string | null; + + /** UnbondingDelegationEntry balance */ + balance?: string | null; + } + + /** Represents an UnbondingDelegationEntry. */ + class UnbondingDelegationEntry implements IUnbondingDelegationEntry { + /** + * Constructs a new UnbondingDelegationEntry. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry); + + /** UnbondingDelegationEntry creationHeight. */ + public creationHeight: number | Long; + + /** UnbondingDelegationEntry completionTime. */ + public completionTime?: google.protobuf.ITimestamp | null; + + /** UnbondingDelegationEntry initialBalance. */ + public initialBalance: string; + + /** UnbondingDelegationEntry balance. */ + public balance: string; + + /** + * Creates a new UnbondingDelegationEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns UnbondingDelegationEntry instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, + ): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; + + /** + * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. + * @param message UnbondingDelegationEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UnbondingDelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. + * @param message UnbondingDelegationEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; + + /** + * Decodes an UnbondingDelegationEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnbondingDelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; + + /** + * Verifies an UnbondingDelegationEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an UnbondingDelegationEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnbondingDelegationEntry + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; + + /** + * Creates a plain object from an UnbondingDelegationEntry message. Also converts values to other types if specified. + * @param message UnbondingDelegationEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.UnbondingDelegationEntry, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UnbondingDelegationEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RedelegationEntry. */ + interface IRedelegationEntry { + /** RedelegationEntry creationHeight */ + creationHeight?: number | Long | null; + + /** RedelegationEntry completionTime */ + completionTime?: google.protobuf.ITimestamp | null; + + /** RedelegationEntry initialBalance */ + initialBalance?: string | null; + + /** RedelegationEntry sharesDst */ + sharesDst?: string | null; + } + + /** Represents a RedelegationEntry. */ + class RedelegationEntry implements IRedelegationEntry { + /** + * Constructs a new RedelegationEntry. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IRedelegationEntry); + + /** RedelegationEntry creationHeight. */ + public creationHeight: number | Long; + + /** RedelegationEntry completionTime. */ + public completionTime?: google.protobuf.ITimestamp | null; + + /** RedelegationEntry initialBalance. */ + public initialBalance: string; + + /** RedelegationEntry sharesDst. */ + public sharesDst: string; + + /** + * Creates a new RedelegationEntry instance using the specified properties. + * @param [properties] Properties to set + * @returns RedelegationEntry instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IRedelegationEntry, + ): cosmos_sdk.x.staking.v1.RedelegationEntry; + + /** + * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. + * @param message RedelegationEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IRedelegationEntry, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RedelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. + * @param message RedelegationEntry message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IRedelegationEntry, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.RedelegationEntry; + + /** + * Decodes a RedelegationEntry message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedelegationEntry + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.RedelegationEntry; + + /** + * Verifies a RedelegationEntry message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RedelegationEntry message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedelegationEntry + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.RedelegationEntry; + + /** + * Creates a plain object from a RedelegationEntry message. Also converts values to other types if specified. + * @param message RedelegationEntry + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.RedelegationEntry, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RedelegationEntry to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Redelegation. */ + interface IRedelegation { + /** Redelegation delegatorAddress */ + delegatorAddress?: Uint8Array | null; + + /** Redelegation validatorSrcAddress */ + validatorSrcAddress?: Uint8Array | null; + + /** Redelegation validatorDstAddress */ + validatorDstAddress?: Uint8Array | null; + + /** Redelegation entries */ + entries?: cosmos_sdk.x.staking.v1.IRedelegationEntry[] | null; + } + + /** Represents a Redelegation. */ + class Redelegation implements IRedelegation { + /** + * Constructs a new Redelegation. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IRedelegation); + + /** Redelegation delegatorAddress. */ + public delegatorAddress: Uint8Array; + + /** Redelegation validatorSrcAddress. */ + public validatorSrcAddress: Uint8Array; + + /** Redelegation validatorDstAddress. */ + public validatorDstAddress: Uint8Array; + + /** Redelegation entries. */ + public entries: cosmos_sdk.x.staking.v1.IRedelegationEntry[]; + + /** + * Creates a new Redelegation instance using the specified properties. + * @param [properties] Properties to set + * @returns Redelegation instance + */ + public static create( + properties?: cosmos_sdk.x.staking.v1.IRedelegation, + ): cosmos_sdk.x.staking.v1.Redelegation; + + /** + * Encodes the specified Redelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. + * @param message Redelegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IRedelegation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Redelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. + * @param message Redelegation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IRedelegation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Redelegation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.Redelegation; + + /** + * Decodes a Redelegation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Redelegation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.Redelegation; + + /** + * Verifies a Redelegation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Redelegation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Redelegation + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Redelegation; + + /** + * Creates a plain object from a Redelegation message. Also converts values to other types if specified. + * @param message Redelegation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.Redelegation, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Redelegation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a Params. */ + interface IParams { + /** Params unbondingTime */ + unbondingTime?: google.protobuf.IDuration | null; + + /** Params maxValidators */ + maxValidators?: number | null; + + /** Params maxEntries */ + maxEntries?: number | null; + + /** Params historicalEntries */ + historicalEntries?: number | null; + + /** Params bondDenom */ + bondDenom?: string | null; + } + + /** Represents a Params. */ + class Params implements IParams { + /** + * Constructs a new Params. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.staking.v1.IParams); + + /** Params unbondingTime. */ + public unbondingTime?: google.protobuf.IDuration | null; + + /** Params maxValidators. */ + public maxValidators: number; + + /** Params maxEntries. */ + public maxEntries: number; + + /** Params historicalEntries. */ + public historicalEntries: number; + + /** Params bondDenom. */ + public bondDenom: string; + + /** + * Creates a new Params instance using the specified properties. + * @param [properties] Properties to set + * @returns Params instance + */ + public static create(properties?: cosmos_sdk.x.staking.v1.IParams): cosmos_sdk.x.staking.v1.Params; + + /** + * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.staking.v1.IParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. + * @param message Params message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.staking.v1.IParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Params message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.staking.v1.Params; + + /** + * Decodes a Params message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Params + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.staking.v1.Params; + + /** + * Verifies a Params message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Params message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Params + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Params; + + /** + * Creates a plain object from a Params message. Also converts values to other types if specified. + * @param message Params + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.staking.v1.Params, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Params to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** Namespace upgrade. */ + namespace upgrade { + /** Namespace v1. */ + namespace v1 { + /** Properties of a Plan. */ + interface IPlan { + /** Plan name */ + name?: string | null; + + /** Plan time */ + time?: google.protobuf.ITimestamp | null; + + /** Plan height */ + height?: number | Long | null; + + /** Plan info */ + info?: string | null; + } + + /** Represents a Plan. */ + class Plan implements IPlan { + /** + * Constructs a new Plan. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.upgrade.v1.IPlan); + + /** Plan name. */ + public name: string; + + /** Plan time. */ + public time?: google.protobuf.ITimestamp | null; + + /** Plan height. */ + public height: number | Long; + + /** Plan info. */ + public info: string; + + /** + * Creates a new Plan instance using the specified properties. + * @param [properties] Properties to set + * @returns Plan instance + */ + public static create(properties?: cosmos_sdk.x.upgrade.v1.IPlan): cosmos_sdk.x.upgrade.v1.Plan; + + /** + * Encodes the specified Plan message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. + * @param message Plan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.upgrade.v1.IPlan, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. + * @param message Plan message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.upgrade.v1.IPlan, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Plan message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.upgrade.v1.Plan; + + /** + * Decodes a Plan message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Plan + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.upgrade.v1.Plan; + + /** + * Verifies a Plan message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Plan message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Plan + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.upgrade.v1.Plan; + + /** + * Creates a plain object from a Plan message. Also converts values to other types if specified. + * @param message Plan + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.upgrade.v1.Plan, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Plan to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a SoftwareUpgradeProposal. */ + interface ISoftwareUpgradeProposal { + /** SoftwareUpgradeProposal title */ + title?: string | null; + + /** SoftwareUpgradeProposal description */ + description?: string | null; + + /** SoftwareUpgradeProposal plan */ + plan?: cosmos_sdk.x.upgrade.v1.IPlan | null; + } + + /** Represents a SoftwareUpgradeProposal. */ + class SoftwareUpgradeProposal implements ISoftwareUpgradeProposal { + /** + * Constructs a new SoftwareUpgradeProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal); + + /** SoftwareUpgradeProposal title. */ + public title: string; + + /** SoftwareUpgradeProposal description. */ + public description: string; + + /** SoftwareUpgradeProposal plan. */ + public plan?: cosmos_sdk.x.upgrade.v1.IPlan | null; + + /** + * Creates a new SoftwareUpgradeProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns SoftwareUpgradeProposal instance + */ + public static create( + properties?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, + ): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; + + /** + * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. + * @param message SoftwareUpgradeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. + * @param message SoftwareUpgradeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; + + /** + * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; + + /** + * Verifies a SoftwareUpgradeProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a SoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoftwareUpgradeProposal + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; + + /** + * Creates a plain object from a SoftwareUpgradeProposal message. Also converts values to other types if specified. + * @param message SoftwareUpgradeProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SoftwareUpgradeProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a CancelSoftwareUpgradeProposal. */ + interface ICancelSoftwareUpgradeProposal { + /** CancelSoftwareUpgradeProposal title */ + title?: string | null; + + /** CancelSoftwareUpgradeProposal description */ + description?: string | null; + } + + /** Represents a CancelSoftwareUpgradeProposal. */ + class CancelSoftwareUpgradeProposal implements ICancelSoftwareUpgradeProposal { + /** + * Constructs a new CancelSoftwareUpgradeProposal. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal); + + /** CancelSoftwareUpgradeProposal title. */ + public title: string; + + /** CancelSoftwareUpgradeProposal description. */ + public description: string; + + /** + * Creates a new CancelSoftwareUpgradeProposal instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelSoftwareUpgradeProposal instance + */ + public static create( + properties?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, + ): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; + + /** + * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. + * @param message CancelSoftwareUpgradeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified CancelSoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. + * @param message CancelSoftwareUpgradeProposal message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelSoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; + + /** + * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelSoftwareUpgradeProposal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; + + /** + * Verifies a CancelSoftwareUpgradeProposal message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a CancelSoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelSoftwareUpgradeProposal + */ + public static fromObject(object: { + [k: string]: any; + }): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; + + /** + * Creates a plain object from a CancelSoftwareUpgradeProposal message. Also converts values to other types if specified. + * @param message CancelSoftwareUpgradeProposal + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this CancelSoftwareUpgradeProposal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } + + /** Namespace ibc. */ + namespace ibc { + /** Namespace localhost. */ + namespace localhost { + /** Namespace v1. */ + namespace v1 { + /** Properties of a MsgCreateClient. */ + interface IMsgCreateClient { + /** MsgCreateClient signer */ + signer?: Uint8Array | null; + } + + /** Represents a MsgCreateClient. */ + class MsgCreateClient implements IMsgCreateClient { + /** + * Constructs a new MsgCreateClient. + * @param [properties] Properties to set + */ + constructor(properties?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient); + + /** MsgCreateClient signer. */ + public signer: Uint8Array; + + /** + * Creates a new MsgCreateClient instance using the specified properties. + * @param [properties] Properties to set + * @returns MsgCreateClient instance + */ + public static create( + properties?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, + ): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; + + /** + * Encodes the specified MsgCreateClient message. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. + * @param message MsgCreateClient message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. + * @param message MsgCreateClient message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; + + /** + * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MsgCreateClient + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; + + /** + * Verifies a MsgCreateClient message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MsgCreateClient + */ + public static fromObject(object: { [k: string]: any }): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; + + /** + * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. + * @param message MsgCreateClient + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: cosmos_sdk.ibc.localhost.v1.MsgCreateClient, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MsgCreateClient to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + } +} + +/** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Request message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. + * @param message Request message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequest, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Request message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.Request; + + /** + * Decodes a Request message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Request; + + /** + * Verifies a Request message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Request message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Request + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Request; + + /** + * Creates a plain object from a Request message. Also converts values to other types if specified. + * @param message Request + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.Request, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Request to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestEcho. */ + interface IRequestEcho { + /** RequestEcho message */ + message?: string | null; + } + + /** Represents a RequestEcho. */ + class RequestEcho implements IRequestEcho { + /** + * Constructs a new RequestEcho. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestEcho message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestEcho, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. + * @param message RequestEcho message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestEcho, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestEcho message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestEcho; + + /** + * Decodes a RequestEcho message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestEcho; + + /** + * Verifies a RequestEcho message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestEcho message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestEcho + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestEcho; + + /** + * Creates a plain object from a RequestEcho message. Also converts values to other types if specified. + * @param message RequestEcho + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestEcho, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestEcho to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestFlush. */ + interface IRequestFlush {} + + /** Represents a RequestFlush. */ + class RequestFlush implements IRequestFlush { + /** + * Constructs a new RequestFlush. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestFlush message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestFlush, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. + * @param message RequestFlush message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestFlush, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestFlush message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestFlush; + + /** + * Decodes a RequestFlush message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestFlush; + + /** + * Verifies a RequestFlush message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestFlush message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestFlush + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestFlush; + + /** + * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. + * @param message RequestFlush + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestFlush, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestFlush to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. + * @param message RequestInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestInfo; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestInfo; + + /** + * Verifies a RequestInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestInfo + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestInfo; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @param message RequestInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestSetOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestSetOption, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. + * @param message RequestSetOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestSetOption, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestSetOption; + + /** + * Decodes a RequestSetOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestSetOption; + + /** + * Verifies a RequestSetOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestSetOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestSetOption + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestSetOption; + + /** + * Creates a plain object from a RequestSetOption message. Also converts values to other types if specified. + * @param message RequestSetOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestSetOption, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestSetOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestInitChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestInitChain, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. + * @param message RequestInitChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestInitChain, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestInitChain; + + /** + * Decodes a RequestInitChain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestInitChain; + + /** + * Verifies a RequestInitChain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestInitChain + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestInitChain; + + /** + * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. + * @param message RequestInitChain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestInitChain, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestInitChain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestQuery, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. + * @param message RequestQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestQuery, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestQuery; + + /** + * Decodes a RequestQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestQuery; + + /** + * Verifies a RequestQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestQuery + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestQuery; + + /** + * Creates a plain object from a RequestQuery message. Also converts values to other types if specified. + * @param message RequestQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestQuery, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestBeginBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestBeginBlock, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. + * @param message RequestBeginBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestBeginBlock, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestBeginBlock; + + /** + * Decodes a RequestBeginBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestBeginBlock; + + /** + * Verifies a RequestBeginBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestBeginBlock + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestBeginBlock; + + /** + * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. + * @param message RequestBeginBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestBeginBlock, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestBeginBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message RequestCheckTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestCheckTx, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. + * @param message RequestCheckTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestCheckTx, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestCheckTx; + + /** + * Decodes a RequestCheckTx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestCheckTx; + + /** + * Verifies a RequestCheckTx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestCheckTx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestCheckTx + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestCheckTx; + + /** + * Creates a plain object from a RequestCheckTx message. Also converts values to other types if specified. + * @param message RequestCheckTx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestCheckTx, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestCheckTx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestDeliverTx. */ + interface IRequestDeliverTx { + /** RequestDeliverTx tx */ + tx?: Uint8Array | null; + } + + /** Represents a RequestDeliverTx. */ + class RequestDeliverTx implements IRequestDeliverTx { + /** + * Constructs a new RequestDeliverTx. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestDeliverTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestDeliverTx, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. + * @param message RequestDeliverTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestDeliverTx, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestDeliverTx; + + /** + * Decodes a RequestDeliverTx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestDeliverTx; + + /** + * Verifies a RequestDeliverTx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestDeliverTx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestDeliverTx + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestDeliverTx; + + /** + * Creates a plain object from a RequestDeliverTx message. Also converts values to other types if specified. + * @param message RequestDeliverTx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestDeliverTx, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestDeliverTx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestEndBlock. */ + interface IRequestEndBlock { + /** RequestEndBlock height */ + height?: number | Long | null; + } + + /** Represents a RequestEndBlock. */ + class RequestEndBlock implements IRequestEndBlock { + /** + * Constructs a new RequestEndBlock. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestEndBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestEndBlock, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. + * @param message RequestEndBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestEndBlock, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestEndBlock; + + /** + * Decodes a RequestEndBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestEndBlock; + + /** + * Verifies a RequestEndBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestEndBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestEndBlock + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestEndBlock; + + /** + * Creates a plain object from a RequestEndBlock message. Also converts values to other types if specified. + * @param message RequestEndBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestEndBlock, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestEndBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a RequestCommit. */ + interface IRequestCommit {} + + /** Represents a RequestCommit. */ + class RequestCommit implements IRequestCommit { + /** + * Constructs a new RequestCommit. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message RequestCommit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IRequestCommit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. + * @param message RequestCommit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IRequestCommit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a RequestCommit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.RequestCommit; + + /** + * Decodes a RequestCommit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.RequestCommit; + + /** + * Verifies a RequestCommit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a RequestCommit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestCommit + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestCommit; + + /** + * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. + * @param message RequestCommit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.RequestCommit, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this RequestCommit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Response message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. + * @param message Response message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponse, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Response message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.Response; + + /** + * Decodes a Response message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Response; + + /** + * Verifies a Response message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Response message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Response + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Response; + + /** + * Creates a plain object from a Response message. Also converts values to other types if specified. + * @param message Response + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.Response, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Response to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResponseException. */ + interface IResponseException { + /** ResponseException error */ + error?: string | null; + } + + /** Represents a ResponseException. */ + class ResponseException implements IResponseException { + /** + * Constructs a new ResponseException. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ResponseException message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseException, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. + * @param message ResponseException message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseException, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseException message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseException; + + /** + * Decodes a ResponseException message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseException; + + /** + * Verifies a ResponseException message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseException message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseException + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseException; + + /** + * Creates a plain object from a ResponseException message. Also converts values to other types if specified. + * @param message ResponseException + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseException, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseException to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResponseEcho. */ + interface IResponseEcho { + /** ResponseEcho message */ + message?: string | null; + } + + /** Represents a ResponseEcho. */ + class ResponseEcho implements IResponseEcho { + /** + * Constructs a new ResponseEcho. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ResponseEcho message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseEcho, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. + * @param message ResponseEcho message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseEcho, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseEcho; + + /** + * Decodes a ResponseEcho message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseEcho; + + /** + * Verifies a ResponseEcho message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseEcho message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseEcho + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseEcho; + + /** + * Creates a plain object from a ResponseEcho message. Also converts values to other types if specified. + * @param message ResponseEcho + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseEcho, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseEcho to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResponseFlush. */ + interface IResponseFlush {} + + /** Represents a ResponseFlush. */ + class ResponseFlush implements IResponseFlush { + /** + * Constructs a new ResponseFlush. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ResponseFlush message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseFlush, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. + * @param message ResponseFlush message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseFlush, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseFlush; + + /** + * Decodes a ResponseFlush message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseFlush; + + /** + * Verifies a ResponseFlush message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseFlush message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseFlush + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseFlush; + + /** + * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. + * @param message ResponseFlush + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseFlush, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseFlush to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. + * @param message ResponseInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseInfo; + + /** + * Decodes a ResponseInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseInfo; + + /** + * Verifies a ResponseInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseInfo + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseInfo; + + /** + * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. + * @param message ResponseInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseSetOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseSetOption, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. + * @param message ResponseSetOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseSetOption, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseSetOption; + + /** + * Decodes a ResponseSetOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseSetOption; + + /** + * Verifies a ResponseSetOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseSetOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseSetOption + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseSetOption; + + /** + * Creates a plain object from a ResponseSetOption message. Also converts values to other types if specified. + * @param message ResponseSetOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseSetOption, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseSetOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseInitChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseInitChain, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. + * @param message ResponseInitChain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseInitChain, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseInitChain; + + /** + * Decodes a ResponseInitChain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseInitChain; + + /** + * Verifies a ResponseInitChain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseInitChain + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseInitChain; + + /** + * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. + * @param message ResponseInitChain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseInitChain, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseInitChain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseQuery, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. + * @param message ResponseQuery message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseQuery, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseQuery; + + /** + * Decodes a ResponseQuery message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseQuery; + + /** + * Verifies a ResponseQuery message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseQuery + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseQuery; + + /** + * Creates a plain object from a ResponseQuery message. Also converts values to other types if specified. + * @param message ResponseQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseQuery, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseBeginBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseBeginBlock, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. + * @param message ResponseBeginBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseBeginBlock, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseBeginBlock; + + /** + * Decodes a ResponseBeginBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseBeginBlock; + + /** + * Verifies a ResponseBeginBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseBeginBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseBeginBlock + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseBeginBlock; + + /** + * Creates a plain object from a ResponseBeginBlock message. Also converts values to other types if specified. + * @param message ResponseBeginBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseBeginBlock, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseBeginBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseCheckTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseCheckTx, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. + * @param message ResponseCheckTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseCheckTx, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseCheckTx; + + /** + * Decodes a ResponseCheckTx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseCheckTx; + + /** + * Verifies a ResponseCheckTx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseCheckTx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseCheckTx + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseCheckTx; + + /** + * Creates a plain object from a ResponseCheckTx message. Also converts values to other types if specified. + * @param message ResponseCheckTx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseCheckTx, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseCheckTx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseDeliverTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseDeliverTx, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. + * @param message ResponseDeliverTx message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseDeliverTx, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseDeliverTx; + + /** + * Decodes a ResponseDeliverTx message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseDeliverTx; + + /** + * Verifies a ResponseDeliverTx message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseDeliverTx message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseDeliverTx + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseDeliverTx; + + /** + * Creates a plain object from a ResponseDeliverTx message. Also converts values to other types if specified. + * @param message ResponseDeliverTx + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseDeliverTx, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseDeliverTx to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ResponseEndBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseEndBlock, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. + * @param message ResponseEndBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseEndBlock, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseEndBlock; + + /** + * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseEndBlock; + + /** + * Verifies a ResponseEndBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseEndBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseEndBlock + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseEndBlock; + + /** + * Creates a plain object from a ResponseEndBlock message. Also converts values to other types if specified. + * @param message ResponseEndBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseEndBlock, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseEndBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ResponseCommit. */ + interface IResponseCommit { + /** ResponseCommit data */ + data?: Uint8Array | null; + } + + /** Represents a ResponseCommit. */ + class ResponseCommit implements IResponseCommit { + /** + * Constructs a new ResponseCommit. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ResponseCommit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IResponseCommit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. + * @param message ResponseCommit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IResponseCommit, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ResponseCommit; + + /** + * Decodes a ResponseCommit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ResponseCommit; + + /** + * Verifies a ResponseCommit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResponseCommit + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseCommit; + + /** + * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. + * @param message ResponseCommit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ResponseCommit, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ResponseCommit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ConsensusParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IConsensusParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. + * @param message ConsensusParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IConsensusParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ConsensusParams; + + /** + * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ConsensusParams; + + /** + * Verifies a ConsensusParams message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConsensusParams + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ConsensusParams; + + /** + * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. + * @param message ConsensusParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ConsensusParams, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ConsensusParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message BlockParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IBlockParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. + * @param message BlockParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IBlockParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a BlockParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.BlockParams; + + /** + * Decodes a BlockParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.BlockParams; + + /** + * Verifies a BlockParams message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlockParams + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.BlockParams; + + /** + * Creates a plain object from a BlockParams message. Also converts values to other types if specified. + * @param message BlockParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.BlockParams, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this BlockParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message EvidenceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IEvidenceParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. + * @param message EvidenceParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IEvidenceParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.EvidenceParams; + + /** + * Decodes an EvidenceParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.EvidenceParams; + + /** + * Verifies an EvidenceParams message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EvidenceParams + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.EvidenceParams; + + /** + * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. + * @param message EvidenceParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.EvidenceParams, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this EvidenceParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ValidatorParams. */ + interface IValidatorParams { + /** ValidatorParams pubKeyTypes */ + pubKeyTypes?: string[] | null; + } + + /** Represents a ValidatorParams. */ + class ValidatorParams implements IValidatorParams { + /** + * Constructs a new ValidatorParams. + * @param [properties] Properties to set + */ + constructor(properties?: 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 message ValidatorParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IValidatorParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. + * @param message ValidatorParams message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IValidatorParams, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ValidatorParams; + + /** + * Decodes a ValidatorParams message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ValidatorParams; + + /** + * Verifies a ValidatorParams message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorParams + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ValidatorParams; + + /** + * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. + * @param message ValidatorParams + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ValidatorParams, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValidatorParams to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message LastCommitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.ILastCommitInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. + * @param message LastCommitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.ILastCommitInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.LastCommitInfo; + + /** + * Decodes a LastCommitInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.LastCommitInfo; + + /** + * Verifies a LastCommitInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a LastCommitInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LastCommitInfo + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.LastCommitInfo; + + /** + * Creates a plain object from a LastCommitInfo message. Also converts values to other types if specified. + * @param message LastCommitInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.LastCommitInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this LastCommitInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Event message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IEvent, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. + * @param message Event message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IEvent, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an Event message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.Event; + + /** + * Decodes an Event message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Event; + + /** + * Verifies an Event message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an Event message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Event + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Event; + + /** + * Creates a plain object from an Event message. Also converts values to other types if specified. + * @param message Event + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.Event, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Event to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Header message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IHeader, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. + * @param message Header message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IHeader, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Header message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.Header; + + /** + * Decodes a Header message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Header; + + /** + * Verifies a Header message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Header message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Header + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Header; + + /** + * Creates a plain object from a Header message. Also converts values to other types if specified. + * @param message Header + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.Header, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Header to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Version message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IVersion, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Version message, length delimited. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. + * @param message Version message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IVersion, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Version message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.Version; + + /** + * Decodes a Version message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Version; + + /** + * Verifies a Version message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Version message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Version + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Version; + + /** + * Creates a plain object from a Version message. Also converts values to other types if specified. + * @param message Version + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.Version, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Version to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message BlockID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IBlockID, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. + * @param message BlockID message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IBlockID, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a BlockID message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.BlockID; + + /** + * Decodes a BlockID message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.BlockID; + + /** + * Verifies a BlockID message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a BlockID message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BlockID + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.BlockID; + + /** + * Creates a plain object from a BlockID message. Also converts values to other types if specified. + * @param message BlockID + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.BlockID, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this BlockID to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message PartSetHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IPartSetHeader, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. + * @param message PartSetHeader message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IPartSetHeader, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.PartSetHeader; + + /** + * Decodes a PartSetHeader message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.PartSetHeader; + + /** + * Verifies a PartSetHeader message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a PartSetHeader message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartSetHeader + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.PartSetHeader; + + /** + * Creates a plain object from a PartSetHeader message. Also converts values to other types if specified. + * @param message PartSetHeader + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.PartSetHeader, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this PartSetHeader to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Validator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IValidator, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. + * @param message Validator message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IValidator, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Validator message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.Validator; + + /** + * Decodes a Validator message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Validator; + + /** + * Verifies a Validator message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Validator message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Validator + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Validator; + + /** + * Creates a plain object from a Validator message. Also converts values to other types if specified. + * @param message Validator + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.Validator, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Validator to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ValidatorUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IValidatorUpdate, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. + * @param message ValidatorUpdate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IValidatorUpdate, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.ValidatorUpdate; + + /** + * Decodes a ValidatorUpdate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.abci.types.ValidatorUpdate; + + /** + * Verifies a ValidatorUpdate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ValidatorUpdate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValidatorUpdate + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ValidatorUpdate; + + /** + * Creates a plain object from a ValidatorUpdate message. Also converts values to other types if specified. + * @param message ValidatorUpdate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.ValidatorUpdate, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ValidatorUpdate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message VoteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IVoteInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. + * @param message VoteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IVoteInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a VoteInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.VoteInfo; + + /** + * Decodes a VoteInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.VoteInfo; + + /** + * Verifies a VoteInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a VoteInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VoteInfo + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.VoteInfo; + + /** + * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. + * @param message VoteInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.VoteInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this VoteInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message PubKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IPubKey, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified PubKey message, length delimited. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. + * @param message PubKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IPubKey, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a PubKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.PubKey; + + /** + * Decodes a PubKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.PubKey; + + /** + * Verifies a PubKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a PubKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubKey + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.PubKey; + + /** + * Creates a plain object from a PubKey message. Also converts values to other types if specified. + * @param message PubKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.PubKey, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this PubKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Evidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.abci.types.IEvidence, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. + * @param message Evidence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.abci.types.IEvidence, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an Evidence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.abci.types.Evidence; + + /** + * Decodes an Evidence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Evidence; + + /** + * Verifies an Evidence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an Evidence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Evidence + */ + public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Evidence; + + /** + * Creates a plain object from an Evidence message. Also converts values to other types if specified. + * @param message Evidence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.abci.types.Evidence, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Evidence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message ProofOp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.crypto.merkle.IProofOp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. + * @param message ProofOp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.crypto.merkle.IProofOp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ProofOp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.crypto.merkle.ProofOp; + + /** + * Decodes a ProofOp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): tendermint.crypto.merkle.ProofOp; + + /** + * Verifies a ProofOp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ProofOp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProofOp + */ + public static fromObject(object: { [k: string]: any }): tendermint.crypto.merkle.ProofOp; + + /** + * Creates a plain object from a ProofOp message. Also converts values to other types if specified. + * @param message ProofOp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.crypto.merkle.ProofOp, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ProofOp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Proof message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.crypto.merkle.IProof, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. + * @param message Proof message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.crypto.merkle.IProof, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Proof message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.crypto.merkle.Proof; + + /** + * Decodes a Proof message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.crypto.merkle.Proof; + + /** + * Verifies a Proof message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Proof message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Proof + */ + public static fromObject(object: { [k: string]: any }): tendermint.crypto.merkle.Proof; + + /** + * Creates a plain object from a Proof message. Also converts values to other types if specified. + * @param message Proof + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.crypto.merkle.Proof, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Proof to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Pair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: tendermint.libs.kv.IPair, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. + * @param message Pair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.libs.kv.IPair, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Pair message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): tendermint.libs.kv.Pair; + + /** + * Decodes a Pair message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.libs.kv.Pair; + + /** + * Verifies a Pair message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Pair message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Pair + */ + public static fromObject(object: { [k: string]: any }): tendermint.libs.kv.Pair; + + /** + * Creates a plain object from a Pair message. Also converts values to other types if specified. + * @param message Pair + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.libs.kv.Pair, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Pair to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message KI64Pair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: tendermint.libs.kv.IKI64Pair, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified KI64Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. + * @param message KI64Pair message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: tendermint.libs.kv.IKI64Pair, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a KI64Pair message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): tendermint.libs.kv.KI64Pair; + + /** + * Decodes a KI64Pair message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.libs.kv.KI64Pair; + + /** + * Verifies a KI64Pair message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a KI64Pair message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KI64Pair + */ + public static fromObject(object: { [k: string]: any }): tendermint.libs.kv.KI64Pair; + + /** + * Creates a plain object from a KI64Pair message. Also converts values to other types if specified. + * @param message KI64Pair + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: tendermint.libs.kv.KI64Pair, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this KI64Pair to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + } +} + +/** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IAny, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Any, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + /** FileDescriptorSet file */ + file?: google.protobuf.IFileDescriptorProto[] | null; + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create( + properties?: google.protobuf.IFileDescriptorSet, + ): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IFileDescriptorSet, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IFileDescriptorSet, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.FileDescriptorSet, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + /** FileDescriptorProto name */ + name?: string | null; + + /** FileDescriptorProto package */ + package?: string | null; + + /** FileDescriptorProto dependency */ + dependency?: string[] | null; + + /** FileDescriptorProto publicDependency */ + publicDependency?: number[] | null; + + /** FileDescriptorProto weakDependency */ + weakDependency?: number[] | null; + + /** FileDescriptorProto messageType */ + messageType?: google.protobuf.IDescriptorProto[] | null; + + /** FileDescriptorProto enumType */ + enumType?: google.protobuf.IEnumDescriptorProto[] | null; + + /** FileDescriptorProto service */ + service?: google.protobuf.IServiceDescriptorProto[] | null; + + /** FileDescriptorProto extension */ + extension?: google.protobuf.IFieldDescriptorProto[] | null; + + /** FileDescriptorProto options */ + options?: google.protobuf.IFileOptions | null; + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: google.protobuf.ISourceCodeInfo | null; + + /** FileDescriptorProto syntax */ + syntax?: string | null; + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: google.protobuf.IFileOptions | null; + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: google.protobuf.ISourceCodeInfo | null; + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create( + properties?: google.protobuf.IFileDescriptorProto, + ): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IFileDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IFileDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.FileDescriptorProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + /** DescriptorProto name */ + name?: string | null; + + /** DescriptorProto field */ + field?: google.protobuf.IFieldDescriptorProto[] | null; + + /** DescriptorProto extension */ + extension?: google.protobuf.IFieldDescriptorProto[] | null; + + /** DescriptorProto nestedType */ + nestedType?: google.protobuf.IDescriptorProto[] | null; + + /** DescriptorProto enumType */ + enumType?: google.protobuf.IEnumDescriptorProto[] | null; + + /** DescriptorProto extensionRange */ + extensionRange?: google.protobuf.DescriptorProto.IExtensionRange[] | null; + + /** DescriptorProto oneofDecl */ + oneofDecl?: google.protobuf.IOneofDescriptorProto[] | null; + + /** DescriptorProto options */ + options?: google.protobuf.IMessageOptions | null; + + /** DescriptorProto reservedRange */ + reservedRange?: google.protobuf.DescriptorProto.IReservedRange[] | null; + + /** DescriptorProto reservedName */ + reservedName?: string[] | null; + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: google.protobuf.IMessageOptions | null; + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.DescriptorProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace DescriptorProto { + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + /** ExtensionRange start */ + start?: number | null; + + /** ExtensionRange end */ + end?: number | null; + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create( + properties?: google.protobuf.DescriptorProto.IExtensionRange, + ): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.DescriptorProto.IExtensionRange, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.DescriptorProto.IExtensionRange, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { + [k: string]: any; + }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.DescriptorProto.ExtensionRange, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + /** ReservedRange start */ + start?: number | null; + + /** ReservedRange end */ + end?: number | null; + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create( + properties?: google.protobuf.DescriptorProto.IReservedRange, + ): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.DescriptorProto.IReservedRange, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.DescriptorProto.IReservedRange, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.DescriptorProto.ReservedRange, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + /** FieldDescriptorProto name */ + name?: string | null; + + /** FieldDescriptorProto number */ + number?: number | null; + + /** FieldDescriptorProto label */ + label?: google.protobuf.FieldDescriptorProto.Label | null; + + /** FieldDescriptorProto type */ + type?: google.protobuf.FieldDescriptorProto.Type | null; + + /** FieldDescriptorProto typeName */ + typeName?: string | null; + + /** FieldDescriptorProto extendee */ + extendee?: string | null; + + /** FieldDescriptorProto defaultValue */ + defaultValue?: string | null; + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: number | null; + + /** FieldDescriptorProto jsonName */ + jsonName?: string | null; + + /** FieldDescriptorProto options */ + options?: google.protobuf.IFieldOptions | null; + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; + + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: google.protobuf.IFieldOptions | null; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create( + properties?: google.protobuf.IFieldDescriptorProto, + ): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IFieldDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IFieldDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.FieldDescriptorProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldDescriptorProto { + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18, + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REQUIRED = 2, + LABEL_REPEATED = 3, + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + /** OneofDescriptorProto name */ + name?: string | null; + + /** OneofDescriptorProto options */ + options?: google.protobuf.IOneofOptions | null; + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: google.protobuf.IOneofOptions | null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create( + properties?: google.protobuf.IOneofDescriptorProto, + ): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IOneofDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IOneofDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.OneofDescriptorProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + /** EnumDescriptorProto name */ + name?: string | null; + + /** EnumDescriptorProto value */ + value?: google.protobuf.IEnumValueDescriptorProto[] | null; + + /** EnumDescriptorProto options */ + options?: google.protobuf.IEnumOptions | null; + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: google.protobuf.IEnumOptions | null; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create( + properties?: google.protobuf.IEnumDescriptorProto, + ): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IEnumDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IEnumDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.EnumDescriptorProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + /** EnumValueDescriptorProto name */ + name?: string | null; + + /** EnumValueDescriptorProto number */ + number?: number | null; + + /** EnumValueDescriptorProto options */ + options?: google.protobuf.IEnumValueOptions | null; + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: google.protobuf.IEnumValueOptions | null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create( + properties?: google.protobuf.IEnumValueDescriptorProto, + ): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IEnumValueDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IEnumValueDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.EnumValueDescriptorProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + /** ServiceDescriptorProto name */ + name?: string | null; + + /** ServiceDescriptorProto method */ + method?: google.protobuf.IMethodDescriptorProto[] | null; + + /** ServiceDescriptorProto options */ + options?: google.protobuf.IServiceOptions | null; + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: google.protobuf.IServiceOptions | null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create( + properties?: google.protobuf.IServiceDescriptorProto, + ): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IServiceDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IServiceDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.ServiceDescriptorProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + /** MethodDescriptorProto name */ + name?: string | null; + + /** MethodDescriptorProto inputType */ + inputType?: string | null; + + /** MethodDescriptorProto outputType */ + outputType?: string | null; + + /** MethodDescriptorProto options */ + options?: google.protobuf.IMethodOptions | null; + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: boolean | null; + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: boolean | null; + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: google.protobuf.IMethodOptions | null; + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create( + properties?: google.protobuf.IMethodDescriptorProto, + ): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IMethodDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IMethodDescriptorProto, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.MethodDescriptorProto, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + /** FileOptions javaPackage */ + javaPackage?: string | null; + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: string | null; + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: boolean | null; + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: boolean | null; + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: boolean | null; + + /** FileOptions optimizeFor */ + optimizeFor?: google.protobuf.FileOptions.OptimizeMode | null; + + /** FileOptions goPackage */ + goPackage?: string | null; + + /** FileOptions ccGenericServices */ + ccGenericServices?: boolean | null; + + /** FileOptions javaGenericServices */ + javaGenericServices?: boolean | null; + + /** FileOptions pyGenericServices */ + pyGenericServices?: boolean | null; + + /** FileOptions deprecated */ + deprecated?: boolean | null; + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: boolean | null; + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: string | null; + + /** FileOptions csharpNamespace */ + csharpNamespace?: string | null; + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; + + /** FileOptions .gogoproto.goprotoGettersAll */ + ".gogoproto.goprotoGettersAll"?: boolean | null; + + /** FileOptions .gogoproto.goprotoEnumPrefixAll */ + ".gogoproto.goprotoEnumPrefixAll"?: boolean | null; + + /** FileOptions .gogoproto.goprotoStringerAll */ + ".gogoproto.goprotoStringerAll"?: boolean | null; + + /** FileOptions .gogoproto.verboseEqualAll */ + ".gogoproto.verboseEqualAll"?: boolean | null; + + /** FileOptions .gogoproto.faceAll */ + ".gogoproto.faceAll"?: boolean | null; + + /** FileOptions .gogoproto.gostringAll */ + ".gogoproto.gostringAll"?: boolean | null; + + /** FileOptions .gogoproto.populateAll */ + ".gogoproto.populateAll"?: boolean | null; + + /** FileOptions .gogoproto.stringerAll */ + ".gogoproto.stringerAll"?: boolean | null; + + /** FileOptions .gogoproto.onlyoneAll */ + ".gogoproto.onlyoneAll"?: boolean | null; + + /** FileOptions .gogoproto.equalAll */ + ".gogoproto.equalAll"?: boolean | null; + + /** FileOptions .gogoproto.descriptionAll */ + ".gogoproto.descriptionAll"?: boolean | null; + + /** FileOptions .gogoproto.testgenAll */ + ".gogoproto.testgenAll"?: boolean | null; + + /** FileOptions .gogoproto.benchgenAll */ + ".gogoproto.benchgenAll"?: boolean | null; + + /** FileOptions .gogoproto.marshalerAll */ + ".gogoproto.marshalerAll"?: boolean | null; + + /** FileOptions .gogoproto.unmarshalerAll */ + ".gogoproto.unmarshalerAll"?: boolean | null; + + /** FileOptions .gogoproto.stableMarshalerAll */ + ".gogoproto.stableMarshalerAll"?: boolean | null; + + /** FileOptions .gogoproto.sizerAll */ + ".gogoproto.sizerAll"?: boolean | null; + + /** FileOptions .gogoproto.goprotoEnumStringerAll */ + ".gogoproto.goprotoEnumStringerAll"?: boolean | null; + + /** FileOptions .gogoproto.enumStringerAll */ + ".gogoproto.enumStringerAll"?: boolean | null; + + /** FileOptions .gogoproto.unsafeMarshalerAll */ + ".gogoproto.unsafeMarshalerAll"?: boolean | null; + + /** FileOptions .gogoproto.unsafeUnmarshalerAll */ + ".gogoproto.unsafeUnmarshalerAll"?: boolean | null; + + /** FileOptions .gogoproto.goprotoExtensionsMapAll */ + ".gogoproto.goprotoExtensionsMapAll"?: boolean | null; + + /** FileOptions .gogoproto.goprotoUnrecognizedAll */ + ".gogoproto.goprotoUnrecognizedAll"?: boolean | null; + + /** FileOptions .gogoproto.gogoprotoImport */ + ".gogoproto.gogoprotoImport"?: boolean | null; + + /** FileOptions .gogoproto.protosizerAll */ + ".gogoproto.protosizerAll"?: boolean | null; + + /** FileOptions .gogoproto.compareAll */ + ".gogoproto.compareAll"?: boolean | null; + + /** FileOptions .gogoproto.typedeclAll */ + ".gogoproto.typedeclAll"?: boolean | null; + + /** FileOptions .gogoproto.enumdeclAll */ + ".gogoproto.enumdeclAll"?: boolean | null; + + /** FileOptions .gogoproto.goprotoRegistration */ + ".gogoproto.goprotoRegistration"?: boolean | null; + + /** FileOptions .gogoproto.messagenameAll */ + ".gogoproto.messagenameAll"?: boolean | null; + + /** FileOptions .gogoproto.goprotoSizecacheAll */ + ".gogoproto.goprotoSizecacheAll"?: boolean | null; + + /** FileOptions .gogoproto.goprotoUnkeyedAll */ + ".gogoproto.goprotoUnkeyedAll"?: boolean | null; + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IFileOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IFileOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.FileOptions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FileOptions { + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3, + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: boolean | null; + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: boolean | null; + + /** MessageOptions deprecated */ + deprecated?: boolean | null; + + /** MessageOptions mapEntry */ + mapEntry?: boolean | null; + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; + + /** MessageOptions .cosmos_proto.interfaceType */ + ".cosmos_proto.interfaceType"?: string | null; + + /** MessageOptions .cosmos_proto.implementsInterface */ + ".cosmos_proto.implementsInterface"?: string | null; + + /** MessageOptions .gogoproto.goprotoGetters */ + ".gogoproto.goprotoGetters"?: boolean | null; + + /** MessageOptions .gogoproto.goprotoStringer */ + ".gogoproto.goprotoStringer"?: boolean | null; + + /** MessageOptions .gogoproto.verboseEqual */ + ".gogoproto.verboseEqual"?: boolean | null; + + /** MessageOptions .gogoproto.face */ + ".gogoproto.face"?: boolean | null; + + /** MessageOptions .gogoproto.gostring */ + ".gogoproto.gostring"?: boolean | null; + + /** MessageOptions .gogoproto.populate */ + ".gogoproto.populate"?: boolean | null; + + /** MessageOptions .gogoproto.stringer */ + ".gogoproto.stringer"?: boolean | null; + + /** MessageOptions .gogoproto.onlyone */ + ".gogoproto.onlyone"?: boolean | null; + + /** MessageOptions .gogoproto.equal */ + ".gogoproto.equal"?: boolean | null; + + /** MessageOptions .gogoproto.description */ + ".gogoproto.description"?: boolean | null; + + /** MessageOptions .gogoproto.testgen */ + ".gogoproto.testgen"?: boolean | null; + + /** MessageOptions .gogoproto.benchgen */ + ".gogoproto.benchgen"?: boolean | null; + + /** MessageOptions .gogoproto.marshaler */ + ".gogoproto.marshaler"?: boolean | null; + + /** MessageOptions .gogoproto.unmarshaler */ + ".gogoproto.unmarshaler"?: boolean | null; + + /** MessageOptions .gogoproto.stableMarshaler */ + ".gogoproto.stableMarshaler"?: boolean | null; + + /** MessageOptions .gogoproto.sizer */ + ".gogoproto.sizer"?: boolean | null; + + /** MessageOptions .gogoproto.unsafeMarshaler */ + ".gogoproto.unsafeMarshaler"?: boolean | null; + + /** MessageOptions .gogoproto.unsafeUnmarshaler */ + ".gogoproto.unsafeUnmarshaler"?: boolean | null; + + /** MessageOptions .gogoproto.goprotoExtensionsMap */ + ".gogoproto.goprotoExtensionsMap"?: boolean | null; + + /** MessageOptions .gogoproto.goprotoUnrecognized */ + ".gogoproto.goprotoUnrecognized"?: boolean | null; + + /** MessageOptions .gogoproto.protosizer */ + ".gogoproto.protosizer"?: boolean | null; + + /** MessageOptions .gogoproto.compare */ + ".gogoproto.compare"?: boolean | null; + + /** MessageOptions .gogoproto.typedecl */ + ".gogoproto.typedecl"?: boolean | null; + + /** MessageOptions .gogoproto.messagename */ + ".gogoproto.messagename"?: boolean | null; + + /** MessageOptions .gogoproto.goprotoSizecache */ + ".gogoproto.goprotoSizecache"?: boolean | null; + + /** MessageOptions .gogoproto.goprotoUnkeyed */ + ".gogoproto.goprotoUnkeyed"?: boolean | null; + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IMessageOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IMessageOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.MessageOptions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + /** FieldOptions ctype */ + ctype?: google.protobuf.FieldOptions.CType | null; + + /** FieldOptions packed */ + packed?: boolean | null; + + /** FieldOptions jstype */ + jstype?: google.protobuf.FieldOptions.JSType | null; + + /** FieldOptions lazy */ + lazy?: boolean | null; + + /** FieldOptions deprecated */ + deprecated?: boolean | null; + + /** FieldOptions weak */ + weak?: boolean | null; + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; + + /** FieldOptions .cosmos_proto.acceptsInterface */ + ".cosmos_proto.acceptsInterface"?: string | null; + + /** FieldOptions .gogoproto.nullable */ + ".gogoproto.nullable"?: boolean | null; + + /** FieldOptions .gogoproto.embed */ + ".gogoproto.embed"?: boolean | null; + + /** FieldOptions .gogoproto.customtype */ + ".gogoproto.customtype"?: string | null; + + /** FieldOptions .gogoproto.customname */ + ".gogoproto.customname"?: string | null; + + /** FieldOptions .gogoproto.jsontag */ + ".gogoproto.jsontag"?: string | null; + + /** FieldOptions .gogoproto.moretags */ + ".gogoproto.moretags"?: string | null; + + /** FieldOptions .gogoproto.casttype */ + ".gogoproto.casttype"?: string | null; + + /** FieldOptions .gogoproto.castkey */ + ".gogoproto.castkey"?: string | null; + + /** FieldOptions .gogoproto.castvalue */ + ".gogoproto.castvalue"?: string | null; + + /** FieldOptions .gogoproto.stdtime */ + ".gogoproto.stdtime"?: boolean | null; + + /** FieldOptions .gogoproto.stdduration */ + ".gogoproto.stdduration"?: boolean | null; + + /** FieldOptions .gogoproto.wktpointer */ + ".gogoproto.wktpointer"?: boolean | null; + + /** FieldOptions .gogoproto.castrepeated */ + ".gogoproto.castrepeated"?: string | null; + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IFieldOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IFieldOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.FieldOptions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace FieldOptions { + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2, + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2, + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IOneofOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IOneofOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.OneofOptions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + /** EnumOptions allowAlias */ + allowAlias?: boolean | null; + + /** EnumOptions deprecated */ + deprecated?: boolean | null; + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; + + /** EnumOptions .gogoproto.goprotoEnumPrefix */ + ".gogoproto.goprotoEnumPrefix"?: boolean | null; + + /** EnumOptions .gogoproto.goprotoEnumStringer */ + ".gogoproto.goprotoEnumStringer"?: boolean | null; + + /** EnumOptions .gogoproto.enumStringer */ + ".gogoproto.enumStringer"?: boolean | null; + + /** EnumOptions .gogoproto.enumCustomname */ + ".gogoproto.enumCustomname"?: string | null; + + /** EnumOptions .gogoproto.enumdecl */ + ".gogoproto.enumdecl"?: boolean | null; + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IEnumOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IEnumOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.EnumOptions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + /** EnumValueOptions deprecated */ + deprecated?: boolean | null; + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; + + /** EnumValueOptions .gogoproto.enumvalueCustomname */ + ".gogoproto.enumvalueCustomname"?: string | null; + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IEnumValueOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IEnumValueOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.EnumValueOptions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + /** ServiceOptions deprecated */ + deprecated?: boolean | null; + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IServiceOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IServiceOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.ServiceOptions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + /** MethodOptions deprecated */ + deprecated?: boolean | null; + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IMethodOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IMethodOptions, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.MethodOptions, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + /** UninterpretedOption name */ + name?: google.protobuf.UninterpretedOption.INamePart[] | null; + + /** UninterpretedOption identifierValue */ + identifierValue?: string | null; + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: number | Long | null; + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: number | Long | null; + + /** UninterpretedOption doubleValue */ + doubleValue?: number | null; + + /** UninterpretedOption stringValue */ + stringValue?: Uint8Array | null; + + /** UninterpretedOption aggregateValue */ + aggregateValue?: string | null; + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: number | Long; + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: number | Long; + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create( + properties?: google.protobuf.IUninterpretedOption, + ): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IUninterpretedOption, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IUninterpretedOption, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.UninterpretedOption, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace UninterpretedOption { + /** Properties of a NamePart. */ + interface INamePart { + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create( + properties?: google.protobuf.UninterpretedOption.INamePart, + ): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.UninterpretedOption.INamePart, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.UninterpretedOption.INamePart, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.UninterpretedOption.NamePart, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + /** SourceCodeInfo location */ + location?: google.protobuf.SourceCodeInfo.ILocation[] | null; + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.ISourceCodeInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.ISourceCodeInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.SourceCodeInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace SourceCodeInfo { + /** Properties of a Location. */ + interface ILocation { + /** Location path */ + path?: number[] | null; + + /** Location span */ + span?: number[] | null; + + /** Location leadingComments */ + leadingComments?: string | null; + + /** Location trailingComments */ + trailingComments?: string | null; + + /** Location leadingDetachedComments */ + leadingDetachedComments?: string[] | null; + } + + /** Represents a Location. */ + class Location implements ILocation { + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create( + properties?: google.protobuf.SourceCodeInfo.ILocation, + ): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.SourceCodeInfo.ILocation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.SourceCodeInfo.ILocation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.SourceCodeInfo.Location, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + /** GeneratedCodeInfo annotation */ + annotation?: google.protobuf.GeneratedCodeInfo.IAnnotation[] | null; + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create( + properties?: google.protobuf.IGeneratedCodeInfo, + ): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.IGeneratedCodeInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IGeneratedCodeInfo, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.GeneratedCodeInfo, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + namespace GeneratedCodeInfo { + /** Properties of an Annotation. */ + interface IAnnotation { + /** Annotation path */ + path?: number[] | null; + + /** Annotation sourceFile */ + sourceFile?: string | null; + + /** Annotation begin */ + begin?: number | null; + + /** Annotation end */ + end?: number | null; + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create( + properties?: google.protobuf.GeneratedCodeInfo.IAnnotation, + ): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode( + message: google.protobuf.GeneratedCodeInfo.IAnnotation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.GeneratedCodeInfo.IAnnotation, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode( + reader: $protobuf.Reader | Uint8Array, + length?: number, + ): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited( + reader: $protobuf.Reader | Uint8Array, + ): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.GeneratedCodeInfo.Annotation, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: 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 [properties] Properties to set + */ + constructor(properties?: 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 message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.ITimestamp, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Timestamp, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** 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 [properties] Properties to set + */ + constructor(properties?: 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 message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited( + message: google.protobuf.IDuration, + writer?: $protobuf.Writer, + ): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): string | null; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject( + message: google.protobuf.Duration, + options?: $protobuf.IConversionOptions, + ): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + } +} From f3fb661f6de2491e683566656830ae9b89a91c8e Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 13:47:36 +0100 Subject: [PATCH 10/41] protobuf-demo: Add demo test --- packages/protobuf-demo/src/demo.spec.ts | 48 +++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/packages/protobuf-demo/src/demo.spec.ts b/packages/protobuf-demo/src/demo.spec.ts index d1da48ef..7a03412b 100644 --- a/packages/protobuf-demo/src/demo.spec.ts +++ b/packages/protobuf-demo/src/demo.spec.ts @@ -1,5 +1,47 @@ -describe("demo", () => { - it("runs", () => { - expect(true).toEqual(false); +import { assert } from "@cosmjs/utils"; + +import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; + +const { Coin } = cosmosSdk.v1; +const { TxBody } = cosmosSdk.tx.v1; +const { MsgSend } = cosmosSdk.x.bank.v1; +const { Any } = google.protobuf; + +describe("protobuf demo", () => { + it("works", () => { + 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], + }); + + // Serialization + const msgSendBytes = MsgSend.encode(msgSend).finish(); + const msgSendWrapped = Any.create({ + // eslint-disable-next-line @typescript-eslint/camelcase + type_url: "xxx", + 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); + assert(txBodyDecoded.messages[0].value); + const msgSendDecoded = MsgSend.decode(txBodyDecoded.messages[0].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); }); }); From e3f3a35dd6f9dd022a5710f9cf97c2dc5eb0ac56 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 11 Jun 2020 13:59:24 +0100 Subject: [PATCH 11/41] demo-protobuf: Rename package for consistency --- packages/{protobuf-demo => demo-protobuf}/.eslintignore | 0 packages/{protobuf-demo => demo-protobuf}/.gitignore | 0 packages/{protobuf-demo => demo-protobuf}/README.md | 0 packages/{protobuf-demo => demo-protobuf}/jasmine-testrunner.js | 0 packages/{protobuf-demo => demo-protobuf}/karma.conf.js | 0 packages/{protobuf-demo => demo-protobuf}/nonces/README.txt | 0 packages/{protobuf-demo => demo-protobuf}/package.json | 2 +- packages/{protobuf-demo => demo-protobuf}/scripts/get-proto.sh | 0 packages/{protobuf-demo => demo-protobuf}/src/demo.spec.ts | 0 packages/{protobuf-demo => demo-protobuf}/src/demo.ts | 0 .../src/generated/codecimpl.d.ts | 0 .../{protobuf-demo => demo-protobuf}/src/generated/codecimpl.js | 0 packages/{protobuf-demo => demo-protobuf}/tsconfig.json | 0 packages/{protobuf-demo => demo-protobuf}/typedoc.js | 0 packages/{protobuf-demo => demo-protobuf}/types/demo.d.ts | 0 .../types/generated/codecimpl.d.ts | 0 packages/{protobuf-demo => demo-protobuf}/webpack.web.config.js | 0 17 files changed, 1 insertion(+), 1 deletion(-) rename packages/{protobuf-demo => demo-protobuf}/.eslintignore (100%) rename packages/{protobuf-demo => demo-protobuf}/.gitignore (100%) rename packages/{protobuf-demo => demo-protobuf}/README.md (100%) rename packages/{protobuf-demo => demo-protobuf}/jasmine-testrunner.js (100%) rename packages/{protobuf-demo => demo-protobuf}/karma.conf.js (100%) rename packages/{protobuf-demo => demo-protobuf}/nonces/README.txt (100%) rename packages/{protobuf-demo => demo-protobuf}/package.json (98%) rename packages/{protobuf-demo => demo-protobuf}/scripts/get-proto.sh (100%) rename packages/{protobuf-demo => demo-protobuf}/src/demo.spec.ts (100%) rename packages/{protobuf-demo => demo-protobuf}/src/demo.ts (100%) rename packages/{protobuf-demo => demo-protobuf}/src/generated/codecimpl.d.ts (100%) rename packages/{protobuf-demo => demo-protobuf}/src/generated/codecimpl.js (100%) rename packages/{protobuf-demo => demo-protobuf}/tsconfig.json (100%) rename packages/{protobuf-demo => demo-protobuf}/typedoc.js (100%) rename packages/{protobuf-demo => demo-protobuf}/types/demo.d.ts (100%) rename packages/{protobuf-demo => demo-protobuf}/types/generated/codecimpl.d.ts (100%) rename packages/{protobuf-demo => demo-protobuf}/webpack.web.config.js (100%) diff --git a/packages/protobuf-demo/.eslintignore b/packages/demo-protobuf/.eslintignore similarity index 100% rename from packages/protobuf-demo/.eslintignore rename to packages/demo-protobuf/.eslintignore diff --git a/packages/protobuf-demo/.gitignore b/packages/demo-protobuf/.gitignore similarity index 100% rename from packages/protobuf-demo/.gitignore rename to packages/demo-protobuf/.gitignore diff --git a/packages/protobuf-demo/README.md b/packages/demo-protobuf/README.md similarity index 100% rename from packages/protobuf-demo/README.md rename to packages/demo-protobuf/README.md diff --git a/packages/protobuf-demo/jasmine-testrunner.js b/packages/demo-protobuf/jasmine-testrunner.js similarity index 100% rename from packages/protobuf-demo/jasmine-testrunner.js rename to packages/demo-protobuf/jasmine-testrunner.js diff --git a/packages/protobuf-demo/karma.conf.js b/packages/demo-protobuf/karma.conf.js similarity index 100% rename from packages/protobuf-demo/karma.conf.js rename to packages/demo-protobuf/karma.conf.js diff --git a/packages/protobuf-demo/nonces/README.txt b/packages/demo-protobuf/nonces/README.txt similarity index 100% rename from packages/protobuf-demo/nonces/README.txt rename to packages/demo-protobuf/nonces/README.txt diff --git a/packages/protobuf-demo/package.json b/packages/demo-protobuf/package.json similarity index 98% rename from packages/protobuf-demo/package.json rename to packages/demo-protobuf/package.json index 442bfdf2..e9b40f98 100644 --- a/packages/protobuf-demo/package.json +++ b/packages/demo-protobuf/package.json @@ -1,5 +1,5 @@ { - "name": "@cosmjs/protobuf-demo", + "name": "@cosmjs/demo-protobuf", "private": true, "version": "0.20.0", "description": "Utilities for Cosmos SDK 0.38", diff --git a/packages/protobuf-demo/scripts/get-proto.sh b/packages/demo-protobuf/scripts/get-proto.sh similarity index 100% rename from packages/protobuf-demo/scripts/get-proto.sh rename to packages/demo-protobuf/scripts/get-proto.sh diff --git a/packages/protobuf-demo/src/demo.spec.ts b/packages/demo-protobuf/src/demo.spec.ts similarity index 100% rename from packages/protobuf-demo/src/demo.spec.ts rename to packages/demo-protobuf/src/demo.spec.ts diff --git a/packages/protobuf-demo/src/demo.ts b/packages/demo-protobuf/src/demo.ts similarity index 100% rename from packages/protobuf-demo/src/demo.ts rename to packages/demo-protobuf/src/demo.ts diff --git a/packages/protobuf-demo/src/generated/codecimpl.d.ts b/packages/demo-protobuf/src/generated/codecimpl.d.ts similarity index 100% rename from packages/protobuf-demo/src/generated/codecimpl.d.ts rename to packages/demo-protobuf/src/generated/codecimpl.d.ts diff --git a/packages/protobuf-demo/src/generated/codecimpl.js b/packages/demo-protobuf/src/generated/codecimpl.js similarity index 100% rename from packages/protobuf-demo/src/generated/codecimpl.js rename to packages/demo-protobuf/src/generated/codecimpl.js diff --git a/packages/protobuf-demo/tsconfig.json b/packages/demo-protobuf/tsconfig.json similarity index 100% rename from packages/protobuf-demo/tsconfig.json rename to packages/demo-protobuf/tsconfig.json diff --git a/packages/protobuf-demo/typedoc.js b/packages/demo-protobuf/typedoc.js similarity index 100% rename from packages/protobuf-demo/typedoc.js rename to packages/demo-protobuf/typedoc.js diff --git a/packages/protobuf-demo/types/demo.d.ts b/packages/demo-protobuf/types/demo.d.ts similarity index 100% rename from packages/protobuf-demo/types/demo.d.ts rename to packages/demo-protobuf/types/demo.d.ts diff --git a/packages/protobuf-demo/types/generated/codecimpl.d.ts b/packages/demo-protobuf/types/generated/codecimpl.d.ts similarity index 100% rename from packages/protobuf-demo/types/generated/codecimpl.d.ts rename to packages/demo-protobuf/types/generated/codecimpl.d.ts diff --git a/packages/protobuf-demo/webpack.web.config.js b/packages/demo-protobuf/webpack.web.config.js similarity index 100% rename from packages/protobuf-demo/webpack.web.config.js rename to packages/demo-protobuf/webpack.web.config.js From 75cb4b92f2895c11d808ba26ebf2cec0dd3142d2 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Mon, 15 Jun 2020 10:56:02 +0100 Subject: [PATCH 12/41] demo-protobuf: Pin protobufjs version Not semver. See https://github.com/protobufjs/protobuf.js/blob/7bacfc8/README.md\#nodejs --- packages/demo-protobuf/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/demo-protobuf/package.json b/packages/demo-protobuf/package.json index e9b40f98..2484419b 100644 --- a/packages/demo-protobuf/package.json +++ b/packages/demo-protobuf/package.json @@ -39,6 +39,6 @@ }, "devDependencies": { "@cosmjs/utils": "^0.20.0", - "protobufjs": "^6.9.0" + "protobufjs": "~6.9.0" } } diff --git a/yarn.lock b/yarn.lock index a79e7f54..1b65a92c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6254,7 +6254,7 @@ 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: +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== From 90d16c61d83112e5993150d96896f34920c63f6b Mon Sep 17 00:00:00 2001 From: willclarktech Date: Mon, 15 Jun 2020 13:38:02 +0100 Subject: [PATCH 13/41] demo-protobuf: Add alternatives to generated static code --- packages/demo-protobuf/src/demo.json | 12 ++ packages/demo-protobuf/src/demo.proto.ts | 8 ++ packages/demo-protobuf/src/demo.spec.ts | 118 +++++++++++++++++-- packages/demo-protobuf/src/demo.ts | 7 ++ packages/demo-protobuf/types/demo.d.ts | 2 + packages/demo-protobuf/types/demo.proto.d.ts | 2 + 6 files changed, 142 insertions(+), 7 deletions(-) create mode 100644 packages/demo-protobuf/src/demo.json create mode 100644 packages/demo-protobuf/src/demo.proto.ts create mode 100644 packages/demo-protobuf/types/demo.proto.d.ts 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..c78a4538 --- /dev/null +++ b/packages/demo-protobuf/src/demo.proto.ts @@ -0,0 +1,8 @@ +export default ` +syntax = "proto3"; +package demo; + +message MsgDemo { + string example = 1; +} +`; diff --git a/packages/demo-protobuf/src/demo.spec.ts b/packages/demo-protobuf/src/demo.spec.ts index 7a03412b..a4ab1151 100644 --- a/packages/demo-protobuf/src/demo.spec.ts +++ b/packages/demo-protobuf/src/demo.spec.ts @@ -1,14 +1,28 @@ +/* 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", () => { + it("works with generated static code", () => { const coin = Coin.create({ denom: "ucosm", amount: "1234567890", @@ -18,12 +32,9 @@ describe("protobuf demo", () => { toAddress: Uint8Array.from(Array.from({ length: 20 }, () => 2)), amount: [coin], }); - - // Serialization const msgSendBytes = MsgSend.encode(msgSend).finish(); const msgSendWrapped = Any.create({ - // eslint-disable-next-line @typescript-eslint/camelcase - type_url: "xxx", + type_url: "cosmos_sdk/cosmos.bank.MsgSend", value: msgSendBytes, }); const txBody = TxBody.create({ @@ -36,12 +47,105 @@ describe("protobuf demo", () => { // Deserialization const txBodyDecoded = TxBody.decode(txBodyBytes); - assert(txBodyDecoded.messages[0].value); - const msgSendDecoded = MsgSend.decode(txBodyDecoded.messages[0].value); + 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/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/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/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 index e69de29b..6f7e31d7 100644 --- a/packages/demo-protobuf/src/demo.ts +++ b/packages/demo-protobuf/src/demo.ts @@ -0,0 +1,7 @@ +import { Field, Root, Type } from "protobufjs"; + +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/types/demo.d.ts b/packages/demo-protobuf/types/demo.d.ts index e69de29b..0b1d1914 100644 --- a/packages/demo-protobuf/types/demo.d.ts +++ b/packages/demo-protobuf/types/demo.d.ts @@ -0,0 +1,2 @@ +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..a08652d5 --- /dev/null +++ b/packages/demo-protobuf/types/demo.proto.d.ts @@ -0,0 +1,2 @@ +declare const _default: '\nsyntax = "proto3";\npackage demo;\n\nmessage MsgDemo {\n string example = 1;\n}\n'; +export default _default; From 9f295a54f11ca962a4578cb839f9b9482756bf32 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Mon, 15 Jun 2020 17:36:11 +0100 Subject: [PATCH 14/41] demo-protobuf: Update type_urls --- packages/demo-protobuf/src/demo.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/demo-protobuf/src/demo.spec.ts b/packages/demo-protobuf/src/demo.spec.ts index a4ab1151..32a0e51f 100644 --- a/packages/demo-protobuf/src/demo.spec.ts +++ b/packages/demo-protobuf/src/demo.spec.ts @@ -34,7 +34,7 @@ describe("protobuf demo", () => { }); const msgSendBytes = MsgSend.encode(msgSend).finish(); const msgSendWrapped = Any.create({ - type_url: "cosmos_sdk/cosmos.bank.MsgSend", + type_url: "/cosmos.bank.MsgSend", value: msgSendBytes, }); const txBody = TxBody.create({ @@ -59,7 +59,7 @@ describe("protobuf demo", () => { it("works with dynamically loaded proto files", () => { const { root } = protobuf.parse(demoProto); - const typeUrl = "demo/demo.MsgDemo"; + const typeUrl = "/demo.MsgDemo"; const encoder = root.lookupType(getTypeName(typeUrl)); const msgDemo = (encoder.create({ example: "Some example text", @@ -90,7 +90,7 @@ describe("protobuf demo", () => { it("works with dynamically loaded json files", () => { const root = protobuf.Root.fromJSON(demoJson); - const typeUrl = "demo/demo.MsgDemo"; + const typeUrl = "/demo.MsgDemo"; const encoder = root.lookupType(getTypeName(typeUrl)); const msgDemo = (encoder.create({ example: "Some example text", @@ -120,7 +120,7 @@ describe("protobuf demo", () => { }); it("works with reflection", () => { - const typeUrl = "demo/demo.MsgDemo"; + const typeUrl = "/demo.MsgDemo"; const encoder = reflectionRoot.lookupType(getTypeName(typeUrl)); const msgDemo = (encoder.create({ example: "Some example text", From 2280bafac7bfb414f6077853789024a6a94b6251 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Mon, 15 Jun 2020 18:45:15 +0100 Subject: [PATCH 15/41] demo-protobuf: Add basic registry example --- packages/demo-protobuf/src/demo.ts | 2 +- packages/demo-protobuf/src/registry.spec.ts | 88 +++++++++++++++++++++ packages/demo-protobuf/src/registry.ts | 21 +++++ packages/demo-protobuf/types/demo.d.ts | 2 + packages/demo-protobuf/types/registry.d.ts | 6 ++ 5 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 packages/demo-protobuf/src/registry.spec.ts create mode 100644 packages/demo-protobuf/src/registry.ts create mode 100644 packages/demo-protobuf/types/registry.d.ts diff --git a/packages/demo-protobuf/src/demo.ts b/packages/demo-protobuf/src/demo.ts index 6f7e31d7..09baa378 100644 --- a/packages/demo-protobuf/src/demo.ts +++ b/packages/demo-protobuf/src/demo.ts @@ -1,6 +1,6 @@ import { Field, Root, Type } from "protobufjs"; -const MsgDemo = new Type("MsgDemo").add(new Field("example", 1, "string")); +export const MsgDemo = new Type("MsgDemo").add(new Field("example", 1, "string")); const root = new Root().define("demo").add(MsgDemo); diff --git a/packages/demo-protobuf/src/registry.spec.ts b/packages/demo-protobuf/src/registry.spec.ts new file mode 100644 index 00000000..bc11581f --- /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) as unknown) as cosmosSdk.tx.v1.TxBody; + 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) as unknown) as cosmosSdk.x.bank.v1.MsgSend; + + // 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", + }) as unknown) as MsgDemo; + const msgDemoBytes = MsgDemo.encode(msgDemo).finish(); + const msgDemoWrapped = Any.create({ + type_url: "/demo.MsgDemo", + 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) as unknown) as cosmosSdk.tx.v1.TxBody; + 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) as unknown) as MsgDemo; + 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..302f67ef --- /dev/null +++ b/packages/demo-protobuf/src/registry.ts @@ -0,0 +1,21 @@ +import protobuf from "protobufjs"; + +import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; + +export class Registry { + private readonly types: Map; + + constructor(customTypes: readonly [string, protobuf.Type][] = []) { + this.types = new Map([ + ["/cosmos.Coin", (cosmosSdk.v1.Coin as unknown) as protobuf.Type], + ["/cosmos.bank.MsgSend", (cosmosSdk.x.bank.v1.MsgSend as unknown) as protobuf.Type], + ["/cosmos.tx.TxBody", (cosmosSdk.tx.v1.TxBody as unknown) as protobuf.Type], + ["/google.protobuf.Any", (google.protobuf.Any as unknown) as protobuf.Type], + ...customTypes, + ]); + } + + public lookupType(name: string): protobuf.Type | undefined { + return this.types.get(name); + } +} diff --git a/packages/demo-protobuf/types/demo.d.ts b/packages/demo-protobuf/types/demo.d.ts index 0b1d1914..3cacd8ff 100644 --- a/packages/demo-protobuf/types/demo.d.ts +++ b/packages/demo-protobuf/types/demo.d.ts @@ -1,2 +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/registry.d.ts b/packages/demo-protobuf/types/registry.d.ts new file mode 100644 index 00000000..9b011609 --- /dev/null +++ b/packages/demo-protobuf/types/registry.d.ts @@ -0,0 +1,6 @@ +import protobuf from "protobufjs"; +export declare class Registry { + private readonly types; + constructor(customTypes?: readonly [string, protobuf.Type][]); + lookupType(name: string): protobuf.Type | undefined; +} From e29118878118cc26d3784da2f7b01c0fd0b3db43 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Mon, 15 Jun 2020 18:51:50 +0100 Subject: [PATCH 16/41] root: Add proto/ to .eslintignore --- .eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintignore b/.eslintignore index 6942c0df..1fe9188b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -6,4 +6,5 @@ dist/ docs/ examples/ generated/ +proto/ types/ From cd65de53f02dc03d6e7b50e586d0722f8920cd39 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 09:12:34 +0100 Subject: [PATCH 17/41] demo-protobuf: Fix name --- packages/demo-protobuf/README.md | 2 +- packages/demo-protobuf/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/demo-protobuf/README.md b/packages/demo-protobuf/README.md index dd72f354..4e07407e 100644 --- a/packages/demo-protobuf/README.md +++ b/packages/demo-protobuf/README.md @@ -1,4 +1,4 @@ -# @cosmjs/protobuf-demo +# @cosmjs/demo-protobuf Demo package for protobufs with Cosmos SDK. diff --git a/packages/demo-protobuf/package.json b/packages/demo-protobuf/package.json index 2484419b..42866e31 100644 --- a/packages/demo-protobuf/package.json +++ b/packages/demo-protobuf/package.json @@ -16,7 +16,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/CosmWasm/cosmjs/tree/master/packages/sdk38" + "url": "https://github.com/CosmWasm/cosmjs/tree/master/packages/demo-protobuf" }, "scripts": { "docs": "shx rm -rf docs && typedoc --options typedoc.js", From 8e83996a3b5f4e8d62484bba6e7030af07e35bef Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 09:47:05 +0100 Subject: [PATCH 18/41] demo-protobuf: Fix type of demo.proto --- packages/demo-protobuf/src/demo.proto.ts | 6 +++++- packages/demo-protobuf/types/demo.proto.d.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/demo-protobuf/src/demo.proto.ts b/packages/demo-protobuf/src/demo.proto.ts index c78a4538..a0050a05 100644 --- a/packages/demo-protobuf/src/demo.proto.ts +++ b/packages/demo-protobuf/src/demo.proto.ts @@ -1,4 +1,6 @@ -export default ` +// 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; @@ -6,3 +8,5 @@ message MsgDemo { string example = 1; } `; + +export default proto; diff --git a/packages/demo-protobuf/types/demo.proto.d.ts b/packages/demo-protobuf/types/demo.proto.d.ts index a08652d5..2cad5e4f 100644 --- a/packages/demo-protobuf/types/demo.proto.d.ts +++ b/packages/demo-protobuf/types/demo.proto.d.ts @@ -1,2 +1,2 @@ -declare const _default: '\nsyntax = "proto3";\npackage demo;\n\nmessage MsgDemo {\n string example = 1;\n}\n'; -export default _default; +declare const proto: string; +export default proto; From 78a96cf06c7a939f927fb2a4280e220e393541b9 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 09:49:00 +0100 Subject: [PATCH 19/41] demo-protobuf: Improve registry types --- packages/demo-protobuf/src/registry.spec.ts | 2 +- packages/demo-protobuf/src/registry.ts | 27 ++++++++++++++------- packages/demo-protobuf/types/registry.d.ts | 16 ++++++++++-- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/packages/demo-protobuf/src/registry.spec.ts b/packages/demo-protobuf/src/registry.spec.ts index bc11581f..bca286d6 100644 --- a/packages/demo-protobuf/src/registry.spec.ts +++ b/packages/demo-protobuf/src/registry.spec.ts @@ -65,7 +65,7 @@ describe("registry demo", () => { }) as unknown) as MsgDemo; const msgDemoBytes = MsgDemo.encode(msgDemo).finish(); const msgDemoWrapped = Any.create({ - type_url: "/demo.MsgDemo", + type_url: typeUrl, value: msgDemoBytes, }); const txBody = TxBody.create({ diff --git a/packages/demo-protobuf/src/registry.ts b/packages/demo-protobuf/src/registry.ts index 302f67ef..844c0907 100644 --- a/packages/demo-protobuf/src/registry.ts +++ b/packages/demo-protobuf/src/registry.ts @@ -2,20 +2,29 @@ import protobuf from "protobufjs"; import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; -export class Registry { - private readonly types: Map; +export type GeneratedType = { + readonly create: (properties?: { [k: string]: any }) => protobuf.Message<{}>; + readonly encode: ( + message: protobuf.Message<{}> | { [k: string]: any }, + writer?: protobuf.Writer, + ) => protobuf.Writer; + readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => protobuf.Message<{}>; +}; - constructor(customTypes: readonly [string, protobuf.Type][] = []) { - this.types = new Map([ - ["/cosmos.Coin", (cosmosSdk.v1.Coin as unknown) as protobuf.Type], - ["/cosmos.bank.MsgSend", (cosmosSdk.x.bank.v1.MsgSend as unknown) as protobuf.Type], - ["/cosmos.tx.TxBody", (cosmosSdk.tx.v1.TxBody as unknown) as protobuf.Type], - ["/google.protobuf.Any", (google.protobuf.Any as unknown) as protobuf.Type], +export class Registry { + private readonly types: Map; + + constructor(customTypes: Iterable<[string, GeneratedType]> = []) { + this.types = new Map([ + ["/cosmos.Coin", (cosmosSdk.v1.Coin as unknown) as GeneratedType], + ["/cosmos.bank.MsgSend", (cosmosSdk.x.bank.v1.MsgSend as unknown) as GeneratedType], + ["/cosmos.tx.TxBody", (cosmosSdk.tx.v1.TxBody as unknown) as GeneratedType], + ["/google.protobuf.Any", (google.protobuf.Any as unknown) as GeneratedType], ...customTypes, ]); } - public lookupType(name: string): protobuf.Type | undefined { + public lookupType(name: string): GeneratedType | undefined { return this.types.get(name); } } diff --git a/packages/demo-protobuf/types/registry.d.ts b/packages/demo-protobuf/types/registry.d.ts index 9b011609..b660a7f7 100644 --- a/packages/demo-protobuf/types/registry.d.ts +++ b/packages/demo-protobuf/types/registry.d.ts @@ -1,6 +1,18 @@ import protobuf from "protobufjs"; +export declare type GeneratedType = { + readonly create: (properties?: { [k: string]: any }) => protobuf.Message<{}>; + readonly encode: ( + message: + | protobuf.Message<{}> + | { + [k: string]: any; + }, + writer?: protobuf.Writer, + ) => protobuf.Writer; + readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => protobuf.Message<{}>; +}; export declare class Registry { private readonly types; - constructor(customTypes?: readonly [string, protobuf.Type][]); - lookupType(name: string): protobuf.Type | undefined; + constructor(customTypes?: Iterable<[string, GeneratedType]>); + lookupType(name: string): GeneratedType | undefined; } From 21e29d1f25379af2f902e98e0b6e94ee96eb71fb Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 10:19:19 +0100 Subject: [PATCH 20/41] demo-protobuf: Add GeneratedType interface --- packages/demo-protobuf/src/registry.ts | 21 +++++++++------------ packages/demo-protobuf/types/registry.d.ts | 11 ++++++----- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/demo-protobuf/src/registry.ts b/packages/demo-protobuf/src/registry.ts index 844c0907..9dbf158e 100644 --- a/packages/demo-protobuf/src/registry.ts +++ b/packages/demo-protobuf/src/registry.ts @@ -2,24 +2,21 @@ import protobuf from "protobufjs"; import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; -export type GeneratedType = { - readonly create: (properties?: { [k: string]: any }) => protobuf.Message<{}>; - readonly encode: ( - message: protobuf.Message<{}> | { [k: string]: any }, - writer?: protobuf.Writer, - ) => protobuf.Writer; - readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => protobuf.Message<{}>; -}; +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 as unknown) as GeneratedType], - ["/cosmos.bank.MsgSend", (cosmosSdk.x.bank.v1.MsgSend as unknown) as GeneratedType], - ["/cosmos.tx.TxBody", (cosmosSdk.tx.v1.TxBody as unknown) as GeneratedType], - ["/google.protobuf.Any", (google.protobuf.Any as unknown) as GeneratedType], + ["/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, ]); } diff --git a/packages/demo-protobuf/types/registry.d.ts b/packages/demo-protobuf/types/registry.d.ts index b660a7f7..4e4a2def 100644 --- a/packages/demo-protobuf/types/registry.d.ts +++ b/packages/demo-protobuf/types/registry.d.ts @@ -1,18 +1,19 @@ import protobuf from "protobufjs"; -export declare type GeneratedType = { - readonly create: (properties?: { [k: string]: any }) => protobuf.Message<{}>; +interface GeneratedType { + readonly create: (properties?: { [k: string]: any }) => any; readonly encode: ( message: - | protobuf.Message<{}> + | any | { [k: string]: any; }, writer?: protobuf.Writer, ) => protobuf.Writer; - readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => protobuf.Message<{}>; -}; + readonly decode: (reader: protobuf.Reader | Uint8Array, length?: number) => any; +} export declare class Registry { private readonly types; constructor(customTypes?: Iterable<[string, GeneratedType]>); lookupType(name: string): GeneratedType | undefined; } +export {}; From e855ae31b16944cb920ce7984443392849160a4e Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 11:46:45 +0100 Subject: [PATCH 21/41] demo-protobuf: Add options to pbjs script --- packages/demo-protobuf/package.json | 2 +- .../src/generated/codecimpl.d.ts | 14400 +---- .../demo-protobuf/src/generated/codecimpl.js | 46215 +++------------- 3 files changed, 7941 insertions(+), 52676 deletions(-) diff --git a/packages/demo-protobuf/package.json b/packages/demo-protobuf/package.json index 42866e31..6b6e29fc 100644 --- a/packages/demo-protobuf/package.json +++ b/packages/demo-protobuf/package.json @@ -34,7 +34,7 @@ "pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js", "get-proto": "./scripts/get-proto.sh", "prepack-proto": "mkdir -p src/generated", - "pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.js ./proto/**/*.proto", + "pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.js --sparse --no-beautify --no-delimited --no-verify --no-convert ./proto/**/*.proto", "define-proto": "pbts src/generated/codecimpl.js -o src/generated/codecimpl.d.ts" }, "devDependencies": { diff --git a/packages/demo-protobuf/src/generated/codecimpl.d.ts b/packages/demo-protobuf/src/generated/codecimpl.d.ts index 7cbc3bb3..5c531b7c 100644 --- a/packages/demo-protobuf/src/generated/codecimpl.d.ts +++ b/packages/demo-protobuf/src/generated/codecimpl.d.ts @@ -23,9 +23,9 @@ export namespace cosmos_sdk { /** * Constructs a new Dog. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.IDog); + constructor(p?: cosmos_sdk.codec.v1.IDog); /** Dog size. */ public size: string; @@ -42,66 +42,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Dog message. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. - * @param message Dog message or plain object to encode - * @param [writer] Writer to encode to + * @param m Dog message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.codec.v1.IDog, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Dog message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. - * @param message Dog message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.codec.v1.IDog, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.codec.v1.IDog, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Dog message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Dog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.Dog; - - /** - * Decodes a Dog message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Dog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.Dog; - - /** - * Verifies a Dog message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Dog message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Dog - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.Dog; - - /** - * Creates a plain object from a Dog message. Also converts values to other types if specified. - * @param message Dog - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.codec.v1.Dog, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Dog to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.codec.v1.Dog; } /** Properties of a Cat. */ @@ -119,9 +74,9 @@ export namespace cosmos_sdk { /** * Constructs a new Cat. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.ICat); + constructor(p?: cosmos_sdk.codec.v1.ICat); /** Cat moniker. */ public moniker: string; @@ -138,66 +93,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Cat message. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. - * @param message Cat message or plain object to encode - * @param [writer] Writer to encode to + * @param m Cat message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.codec.v1.ICat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Cat message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. - * @param message Cat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.codec.v1.ICat, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.codec.v1.ICat, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Cat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Cat * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.Cat; - - /** - * Decodes a Cat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Cat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.Cat; - - /** - * Verifies a Cat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Cat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Cat - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.Cat; - - /** - * Creates a plain object from a Cat message. Also converts values to other types if specified. - * @param message Cat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.codec.v1.Cat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Cat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.codec.v1.Cat; } /** Properties of a HasAnimal. */ @@ -215,9 +125,9 @@ export namespace cosmos_sdk { /** * Constructs a new HasAnimal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.IHasAnimal); + constructor(p?: cosmos_sdk.codec.v1.IHasAnimal); /** HasAnimal animal. */ public animal?: (google.protobuf.IAny|null); @@ -234,66 +144,21 @@ export namespace cosmos_sdk { /** * Encodes the specified HasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. - * @param message HasAnimal message or plain object to encode - * @param [writer] Writer to encode to + * @param m HasAnimal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.codec.v1.IHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. - * @param message HasAnimal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.codec.v1.IHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.codec.v1.IHasAnimal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a HasAnimal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns HasAnimal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.HasAnimal; - - /** - * Decodes a HasAnimal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.HasAnimal; - - /** - * Verifies a HasAnimal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HasAnimal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HasAnimal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasAnimal; - - /** - * Creates a plain object from a HasAnimal message. Also converts values to other types if specified. - * @param message HasAnimal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.codec.v1.HasAnimal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HasAnimal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.codec.v1.HasAnimal; } /** Properties of a HasHasAnimal. */ @@ -308,9 +173,9 @@ export namespace cosmos_sdk { /** * Constructs a new HasHasAnimal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.IHasHasAnimal); + constructor(p?: cosmos_sdk.codec.v1.IHasHasAnimal); /** HasHasAnimal hasAnimal. */ public hasAnimal?: (google.protobuf.IAny|null); @@ -324,66 +189,21 @@ export namespace cosmos_sdk { /** * Encodes the specified HasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. - * @param message HasHasAnimal message or plain object to encode - * @param [writer] Writer to encode to + * @param m HasHasAnimal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.codec.v1.IHasHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. - * @param message HasHasAnimal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.codec.v1.IHasHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.codec.v1.IHasHasAnimal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a HasHasAnimal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns HasHasAnimal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.HasHasAnimal; - - /** - * Decodes a HasHasAnimal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HasHasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.HasHasAnimal; - - /** - * Verifies a HasHasAnimal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HasHasAnimal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HasHasAnimal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasHasAnimal; - - /** - * Creates a plain object from a HasHasAnimal message. Also converts values to other types if specified. - * @param message HasHasAnimal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.codec.v1.HasHasAnimal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HasHasAnimal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.codec.v1.HasHasAnimal; } /** Properties of a HasHasHasAnimal. */ @@ -398,9 +218,9 @@ export namespace cosmos_sdk { /** * Constructs a new HasHasHasAnimal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.IHasHasHasAnimal); + constructor(p?: cosmos_sdk.codec.v1.IHasHasHasAnimal); /** HasHasHasAnimal hasHasAnimal. */ public hasHasAnimal?: (google.protobuf.IAny|null); @@ -414,66 +234,21 @@ export namespace cosmos_sdk { /** * Encodes the specified HasHasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. - * @param message HasHasHasAnimal message or plain object to encode - * @param [writer] Writer to encode to + * @param m HasHasHasAnimal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.codec.v1.IHasHasHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HasHasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. - * @param message HasHasHasAnimal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.codec.v1.IHasHasHasAnimal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.codec.v1.IHasHasHasAnimal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a HasHasHasAnimal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns HasHasHasAnimal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.HasHasHasAnimal; - - /** - * Decodes a HasHasHasAnimal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HasHasHasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.HasHasHasAnimal; - - /** - * Verifies a HasHasHasAnimal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HasHasHasAnimal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HasHasHasAnimal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasHasHasAnimal; - - /** - * Creates a plain object from a HasHasHasAnimal message. Also converts values to other types if specified. - * @param message HasHasHasAnimal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.codec.v1.HasHasHasAnimal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HasHasHasAnimal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.codec.v1.HasHasHasAnimal; } /** Represents a TestService */ @@ -554,9 +329,9 @@ export namespace cosmos_sdk { /** * Constructs a new EchoRequest. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.IEchoRequest); + constructor(p?: cosmos_sdk.codec.v1.IEchoRequest); /** EchoRequest message. */ public message: string; @@ -570,66 +345,21 @@ export namespace cosmos_sdk { /** * Encodes the specified EchoRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. - * @param message EchoRequest message or plain object to encode - * @param [writer] Writer to encode to + * @param m EchoRequest message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.codec.v1.IEchoRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EchoRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. - * @param message EchoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.codec.v1.IEchoRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.codec.v1.IEchoRequest, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an EchoRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns EchoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.EchoRequest; - - /** - * Decodes an EchoRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EchoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.EchoRequest; - - /** - * Verifies an EchoRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EchoRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EchoRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.EchoRequest; - - /** - * Creates a plain object from an EchoRequest message. Also converts values to other types if specified. - * @param message EchoRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.codec.v1.EchoRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EchoRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.codec.v1.EchoRequest; } /** Properties of an EchoResponse. */ @@ -644,9 +374,9 @@ export namespace cosmos_sdk { /** * Constructs a new EchoResponse. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.IEchoResponse); + constructor(p?: cosmos_sdk.codec.v1.IEchoResponse); /** EchoResponse message. */ public message: string; @@ -660,66 +390,21 @@ export namespace cosmos_sdk { /** * Encodes the specified EchoResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. - * @param message EchoResponse message or plain object to encode - * @param [writer] Writer to encode to + * @param m EchoResponse message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.codec.v1.IEchoResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EchoResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. - * @param message EchoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.codec.v1.IEchoResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.codec.v1.IEchoResponse, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an EchoResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns EchoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.EchoResponse; - - /** - * Decodes an EchoResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EchoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.EchoResponse; - - /** - * Verifies an EchoResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EchoResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EchoResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.EchoResponse; - - /** - * Creates a plain object from an EchoResponse message. Also converts values to other types if specified. - * @param message EchoResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.codec.v1.EchoResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EchoResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.codec.v1.EchoResponse; } /** Properties of a SayHelloRequest. */ @@ -734,9 +419,9 @@ export namespace cosmos_sdk { /** * Constructs a new SayHelloRequest. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.ISayHelloRequest); + constructor(p?: cosmos_sdk.codec.v1.ISayHelloRequest); /** SayHelloRequest name. */ public name: string; @@ -750,66 +435,21 @@ export namespace cosmos_sdk { /** * Encodes the specified SayHelloRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. - * @param message SayHelloRequest message or plain object to encode - * @param [writer] Writer to encode to + * @param m SayHelloRequest message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.codec.v1.ISayHelloRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SayHelloRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. - * @param message SayHelloRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.codec.v1.ISayHelloRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.codec.v1.ISayHelloRequest, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a SayHelloRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns SayHelloRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.SayHelloRequest; - - /** - * Decodes a SayHelloRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SayHelloRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.SayHelloRequest; - - /** - * Verifies a SayHelloRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SayHelloRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SayHelloRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.SayHelloRequest; - - /** - * Creates a plain object from a SayHelloRequest message. Also converts values to other types if specified. - * @param message SayHelloRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.codec.v1.SayHelloRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SayHelloRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.codec.v1.SayHelloRequest; } /** Properties of a SayHelloResponse. */ @@ -824,9 +464,9 @@ export namespace cosmos_sdk { /** * Constructs a new SayHelloResponse. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.ISayHelloResponse); + constructor(p?: cosmos_sdk.codec.v1.ISayHelloResponse); /** SayHelloResponse greeting. */ public greeting: string; @@ -840,66 +480,21 @@ export namespace cosmos_sdk { /** * Encodes the specified SayHelloResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. - * @param message SayHelloResponse message or plain object to encode - * @param [writer] Writer to encode to + * @param m SayHelloResponse message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.codec.v1.ISayHelloResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SayHelloResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. - * @param message SayHelloResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.codec.v1.ISayHelloResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.codec.v1.ISayHelloResponse, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a SayHelloResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns SayHelloResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.codec.v1.SayHelloResponse; - - /** - * Decodes a SayHelloResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SayHelloResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.codec.v1.SayHelloResponse; - - /** - * Verifies a SayHelloResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SayHelloResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SayHelloResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.SayHelloResponse; - - /** - * Creates a plain object from a SayHelloResponse message. Also converts values to other types if specified. - * @param message SayHelloResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.codec.v1.SayHelloResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SayHelloResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.codec.v1.SayHelloResponse; } } } @@ -937,9 +532,9 @@ export namespace cosmos_sdk { /** * Constructs a new PublicKey. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.crypto.v1.IPublicKey); + constructor(p?: cosmos_sdk.crypto.v1.IPublicKey); /** PublicKey secp256k1. */ public secp256k1: Uint8Array; @@ -971,66 +566,21 @@ export namespace cosmos_sdk { /** * Encodes the specified PublicKey message. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. - * @param message PublicKey message or plain object to encode - * @param [writer] Writer to encode to + * @param m PublicKey message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.crypto.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. - * @param message PublicKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.crypto.v1.IPublicKey, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.crypto.v1.PublicKey; - - /** - * Decodes a PublicKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.crypto.v1.PublicKey; - - /** - * Verifies a PublicKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublicKey - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.PublicKey; - - /** - * Creates a plain object from a PublicKey message. Also converts values to other types if specified. - * @param message PublicKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.crypto.v1.PublicKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublicKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.crypto.v1.PublicKey; } /** Properties of a PubKeyMultisigThreshold. */ @@ -1039,8 +589,8 @@ export namespace cosmos_sdk { /** PubKeyMultisigThreshold threshold */ threshold?: (number|null); - /** PubKeyMultisigThreshold pubkeys */ - pubkeys?: (cosmos_sdk.crypto.v1.IPublicKey[]|null); + /** PubKeyMultisigThreshold publicKeys */ + publicKeys?: (cosmos_sdk.crypto.v1.IPublicKey[]|null); } /** Represents a PubKeyMultisigThreshold. */ @@ -1048,15 +598,15 @@ export namespace cosmos_sdk { /** * Constructs a new PubKeyMultisigThreshold. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + constructor(p?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); /** PubKeyMultisigThreshold threshold. */ public threshold: number; - /** PubKeyMultisigThreshold pubkeys. */ - public pubkeys: cosmos_sdk.crypto.v1.IPublicKey[]; + /** PubKeyMultisigThreshold publicKeys. */ + public publicKeys: cosmos_sdk.crypto.v1.IPublicKey[]; /** * Creates a new PubKeyMultisigThreshold instance using the specified properties. @@ -1067,73 +617,28 @@ export namespace cosmos_sdk { /** * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. - * @param message PubKeyMultisigThreshold message or plain object to encode - * @param [writer] Writer to encode to + * @param m PubKeyMultisigThreshold message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PubKeyMultisigThreshold message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. - * @param message PubKeyMultisigThreshold message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; - - /** - * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; - - /** - * Verifies a PubKeyMultisigThreshold message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PubKeyMultisigThreshold message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubKeyMultisigThreshold - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; - - /** - * Creates a plain object from a PubKeyMultisigThreshold message. Also converts values to other types if specified. - * @param message PubKeyMultisigThreshold - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.crypto.v1.PubKeyMultisigThreshold, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PubKeyMultisigThreshold to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; } /** Properties of a MultiSignature. */ interface IMultiSignature { - /** MultiSignature sigs */ - sigs?: (Uint8Array[]|null); + /** MultiSignature signatures */ + signatures?: (Uint8Array[]|null); } /** Represents a MultiSignature. */ @@ -1141,12 +646,12 @@ export namespace cosmos_sdk { /** * Constructs a new MultiSignature. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.crypto.v1.IMultiSignature); + constructor(p?: cosmos_sdk.crypto.v1.IMultiSignature); - /** MultiSignature sigs. */ - public sigs: Uint8Array[]; + /** MultiSignature signatures. */ + public signatures: Uint8Array[]; /** * Creates a new MultiSignature instance using the specified properties. @@ -1157,66 +662,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. - * @param message MultiSignature message or plain object to encode - * @param [writer] Writer to encode to + * @param m MultiSignature message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.crypto.v1.IMultiSignature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MultiSignature message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. - * @param message MultiSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.crypto.v1.IMultiSignature, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.crypto.v1.MultiSignature; - - /** - * Decodes a MultiSignature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.crypto.v1.MultiSignature; - - /** - * Verifies a MultiSignature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MultiSignature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MultiSignature - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.MultiSignature; - - /** - * Creates a plain object from a MultiSignature message. Also converts values to other types if specified. - * @param message MultiSignature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.crypto.v1.MultiSignature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MultiSignature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.crypto.v1.MultiSignature; } /** Properties of a CompactBitArray. */ @@ -1234,9 +694,9 @@ export namespace cosmos_sdk { /** * Constructs a new CompactBitArray. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.crypto.v1.ICompactBitArray); + constructor(p?: cosmos_sdk.crypto.v1.ICompactBitArray); /** CompactBitArray extraBitsStored. */ public extraBitsStored: number; @@ -1253,66 +713,21 @@ export namespace cosmos_sdk { /** * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. - * @param message CompactBitArray message or plain object to encode - * @param [writer] Writer to encode to + * @param m CompactBitArray message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.crypto.v1.ICompactBitArray, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CompactBitArray message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. - * @param message CompactBitArray message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.crypto.v1.ICompactBitArray, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.crypto.v1.CompactBitArray; - - /** - * Decodes a CompactBitArray message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.crypto.v1.CompactBitArray; - - /** - * Verifies a CompactBitArray message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CompactBitArray message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompactBitArray - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.CompactBitArray; - - /** - * Creates a plain object from a CompactBitArray message. Also converts values to other types if specified. - * @param message CompactBitArray - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.crypto.v1.CompactBitArray, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CompactBitArray to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.crypto.v1.CompactBitArray; } } } @@ -1320,6 +735,22 @@ export namespace cosmos_sdk { /** Namespace tx. */ namespace tx { + /** 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 v1. */ namespace v1 { @@ -1341,9 +772,9 @@ export namespace cosmos_sdk { /** * Constructs a new Tx. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.tx.v1.ITx); + constructor(p?: cosmos_sdk.tx.v1.ITx); /** Tx body. */ public body?: (cosmos_sdk.tx.v1.ITxBody|null); @@ -1363,66 +794,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Tx message. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. - * @param message Tx message or plain object to encode - * @param [writer] Writer to encode to + * @param m Tx message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.tx.v1.ITx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tx message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. - * @param message Tx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.tx.v1.ITx, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.Tx; - - /** - * Decodes a Tx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.Tx; - - /** - * Verifies a Tx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Tx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tx - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.Tx; - - /** - * Creates a plain object from a Tx message. Also converts values to other types if specified. - * @param message Tx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.tx.v1.Tx, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Tx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.Tx; } /** Properties of a SignDoc. */ @@ -1449,9 +835,9 @@ export namespace cosmos_sdk { /** * Constructs a new SignDoc. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.tx.v1.ISignDoc); + constructor(p?: cosmos_sdk.tx.v1.ISignDoc); /** SignDoc body. */ public body?: (cosmos_sdk.tx.v1.ITxBody|null); @@ -1477,66 +863,21 @@ export namespace cosmos_sdk { /** * Encodes the specified SignDoc message. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. - * @param message SignDoc message or plain object to encode - * @param [writer] Writer to encode to + * @param m SignDoc message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.tx.v1.ISignDoc, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignDoc message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. - * @param message SignDoc message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.tx.v1.ISignDoc, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.SignDoc; - - /** - * Decodes a SignDoc message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.SignDoc; - - /** - * Verifies a SignDoc message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SignDoc message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignDoc - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.SignDoc; - - /** - * Creates a plain object from a SignDoc message. Also converts values to other types if specified. - * @param message SignDoc - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.tx.v1.SignDoc, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignDoc to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.SignDoc; } /** Properties of a TxBody. */ @@ -1563,9 +904,9 @@ export namespace cosmos_sdk { /** * Constructs a new TxBody. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.tx.v1.ITxBody); + constructor(p?: cosmos_sdk.tx.v1.ITxBody); /** TxBody messages. */ public messages: google.protobuf.IAny[]; @@ -1591,66 +932,21 @@ export namespace cosmos_sdk { /** * Encodes the specified TxBody message. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. - * @param message TxBody message or plain object to encode - * @param [writer] Writer to encode to + * @param m TxBody message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.tx.v1.ITxBody, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TxBody message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. - * @param message TxBody message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.tx.v1.ITxBody, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.TxBody; - - /** - * Decodes a TxBody message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.TxBody; - - /** - * Verifies a TxBody message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TxBody message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TxBody - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.TxBody; - - /** - * Creates a plain object from a TxBody message. Also converts values to other types if specified. - * @param message TxBody - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.tx.v1.TxBody, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TxBody to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.TxBody; } /** Properties of an AuthInfo. */ @@ -1668,9 +964,9 @@ export namespace cosmos_sdk { /** * Constructs a new AuthInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.tx.v1.IAuthInfo); + constructor(p?: cosmos_sdk.tx.v1.IAuthInfo); /** AuthInfo signerInfos. */ public signerInfos: cosmos_sdk.tx.v1.ISignerInfo[]; @@ -1687,66 +983,21 @@ export namespace cosmos_sdk { /** * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. - * @param message AuthInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m AuthInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.tx.v1.IAuthInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AuthInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. - * @param message AuthInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.tx.v1.IAuthInfo, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.AuthInfo; - - /** - * Decodes an AuthInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.AuthInfo; - - /** - * Verifies an AuthInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AuthInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuthInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.AuthInfo; - - /** - * Creates a plain object from an AuthInfo message. Also converts values to other types if specified. - * @param message AuthInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.tx.v1.AuthInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AuthInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.AuthInfo; } /** Properties of a SignerInfo. */ @@ -1764,9 +1015,9 @@ export namespace cosmos_sdk { /** * Constructs a new SignerInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.tx.v1.ISignerInfo); + constructor(p?: cosmos_sdk.tx.v1.ISignerInfo); /** SignerInfo publicKey. */ public publicKey?: (google.protobuf.IAny|null); @@ -1783,66 +1034,21 @@ export namespace cosmos_sdk { /** * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. - * @param message SignerInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m SignerInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.tx.v1.ISignerInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignerInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. - * @param message SignerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.tx.v1.ISignerInfo, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.SignerInfo; - - /** - * Decodes a SignerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.SignerInfo; - - /** - * Verifies a SignerInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SignerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignerInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.SignerInfo; - - /** - * Creates a plain object from a SignerInfo message. Also converts values to other types if specified. - * @param message SignerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.tx.v1.SignerInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SignerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.SignerInfo; } /** Properties of a ModeInfo. */ @@ -1860,9 +1066,9 @@ export namespace cosmos_sdk { /** * Constructs a new ModeInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.tx.v1.IModeInfo); + constructor(p?: cosmos_sdk.tx.v1.IModeInfo); /** ModeInfo single. */ public single?: (cosmos_sdk.tx.v1.ModeInfo.ISingle|null); @@ -1882,66 +1088,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. - * @param message ModeInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m ModeInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.tx.v1.IModeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModeInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. - * @param message ModeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.tx.v1.IModeInfo, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.ModeInfo; - - /** - * Decodes a ModeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.ModeInfo; - - /** - * Verifies a ModeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModeInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo; - - /** - * Creates a plain object from a ModeInfo message. Also converts values to other types if specified. - * @param message ModeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.tx.v1.ModeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.ModeInfo; } namespace ModeInfo { @@ -1950,7 +1111,7 @@ export namespace cosmos_sdk { interface ISingle { /** Single mode */ - mode?: (cosmos_sdk.tx.v1.SignMode|null); + mode?: (cosmos_sdk.tx.signing.v1.SignMode|null); } /** Represents a Single. */ @@ -1958,12 +1119,12 @@ export namespace cosmos_sdk { /** * Constructs a new Single. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.tx.v1.ModeInfo.ISingle); + constructor(p?: cosmos_sdk.tx.v1.ModeInfo.ISingle); /** Single mode. */ - public mode: cosmos_sdk.tx.v1.SignMode; + public mode: cosmos_sdk.tx.signing.v1.SignMode; /** * Creates a new Single instance using the specified properties. @@ -1974,66 +1135,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Single message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. - * @param message Single message or plain object to encode - * @param [writer] Writer to encode to + * @param m Single message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.tx.v1.ModeInfo.ISingle, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. - * @param message Single message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.tx.v1.ModeInfo.ISingle, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.ModeInfo.Single; - - /** - * Decodes a Single message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.ModeInfo.Single; - - /** - * Verifies a Single message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Single message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Single - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo.Single; - - /** - * Creates a plain object from a Single message. Also converts values to other types if specified. - * @param message Single - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.tx.v1.ModeInfo.Single, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Single to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.ModeInfo.Single; } /** Properties of a Multi. */ @@ -2051,9 +1167,9 @@ export namespace cosmos_sdk { /** * Constructs a new Multi. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.tx.v1.ModeInfo.IMulti); + constructor(p?: cosmos_sdk.tx.v1.ModeInfo.IMulti); /** Multi bitarray. */ public bitarray?: (cosmos_sdk.crypto.v1.ICompactBitArray|null); @@ -2070,77 +1186,24 @@ export namespace cosmos_sdk { /** * Encodes the specified Multi message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. - * @param message Multi message or plain object to encode - * @param [writer] Writer to encode to + * @param m Multi message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.tx.v1.ModeInfo.IMulti, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. - * @param message Multi message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.tx.v1.ModeInfo.IMulti, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.ModeInfo.Multi; - - /** - * Decodes a Multi message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.ModeInfo.Multi; - - /** - * Verifies a Multi message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Multi message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Multi - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo.Multi; - - /** - * Creates a plain object from a Multi message. Also converts values to other types if specified. - * @param message Multi - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.tx.v1.ModeInfo.Multi, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Multi to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.ModeInfo.Multi; } } - /** SignMode enum. */ - enum SignMode { - SIGN_MODE_UNSPECIFIED = 0, - SIGN_MODE_DIRECT = 1, - SIGN_MODE_TEXTUAL = 2, - SIGN_MODE_LEGACY_AMINO_JSON = 127 - } - /** Properties of a Fee. */ interface IFee { @@ -2156,9 +1219,9 @@ export namespace cosmos_sdk { /** * Constructs a new Fee. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.tx.v1.IFee); + constructor(p?: cosmos_sdk.tx.v1.IFee); /** Fee amount. */ public amount: cosmos_sdk.v1.ICoin[]; @@ -2175,66 +1238,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Fee message. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. - * @param message Fee message or plain object to encode - * @param [writer] Writer to encode to + * @param m Fee message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.tx.v1.IFee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Fee message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. - * @param message Fee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.tx.v1.IFee, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.tx.v1.Fee; - - /** - * Decodes a Fee message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.tx.v1.Fee; - - /** - * Verifies a Fee message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Fee message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Fee - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.Fee; - - /** - * Creates a plain object from a Fee message. Also converts values to other types if specified. - * @param message Fee - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.tx.v1.Fee, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Fee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.Fee; } } } @@ -2257,9 +1275,9 @@ export namespace cosmos_sdk { /** * Constructs a new Coin. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.ICoin); + constructor(p?: cosmos_sdk.v1.ICoin); /** Coin denom. */ public denom: string; @@ -2276,66 +1294,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Coin message. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. - * @param message Coin message or plain object to encode - * @param [writer] Writer to encode to + * @param m Coin message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.ICoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. - * @param message Coin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.ICoin, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.Coin; - - /** - * Decodes a Coin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.Coin; - - /** - * Verifies a Coin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Coin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Coin - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.Coin; - - /** - * Creates a plain object from a Coin message. Also converts values to other types if specified. - * @param message Coin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.Coin, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Coin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.Coin; } /** Properties of a DecCoin. */ @@ -2353,9 +1326,9 @@ export namespace cosmos_sdk { /** * Constructs a new DecCoin. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.IDecCoin); + constructor(p?: cosmos_sdk.v1.IDecCoin); /** DecCoin denom. */ public denom: string; @@ -2372,66 +1345,21 @@ export namespace cosmos_sdk { /** * Encodes the specified DecCoin message. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. - * @param message DecCoin message or plain object to encode - * @param [writer] Writer to encode to + * @param m DecCoin message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.IDecCoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. - * @param message DecCoin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.IDecCoin, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.DecCoin; - - /** - * Decodes a DecCoin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.DecCoin; - - /** - * Verifies a DecCoin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DecCoin - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.DecCoin; - - /** - * Creates a plain object from a DecCoin message. Also converts values to other types if specified. - * @param message DecCoin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.DecCoin, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DecCoin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.DecCoin; } /** Properties of an IntProto. */ @@ -2446,9 +1374,9 @@ export namespace cosmos_sdk { /** * Constructs a new IntProto. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.IIntProto); + constructor(p?: cosmos_sdk.v1.IIntProto); /** IntProto int. */ public int: string; @@ -2462,66 +1390,21 @@ export namespace cosmos_sdk { /** * Encodes the specified IntProto message. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. - * @param message IntProto message or plain object to encode - * @param [writer] Writer to encode to + * @param m IntProto message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.IIntProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. - * @param message IntProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.IIntProto, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.IntProto; - - /** - * Decodes an IntProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.IntProto; - - /** - * Verifies an IntProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IntProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntProto - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.IntProto; - - /** - * Creates a plain object from an IntProto message. Also converts values to other types if specified. - * @param message IntProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.IntProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IntProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.IntProto; } /** Properties of a DecProto. */ @@ -2536,9 +1419,9 @@ export namespace cosmos_sdk { /** * Constructs a new DecProto. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.IDecProto); + constructor(p?: cosmos_sdk.v1.IDecProto); /** DecProto dec. */ public dec: string; @@ -2552,66 +1435,21 @@ export namespace cosmos_sdk { /** * Encodes the specified DecProto message. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. - * @param message DecProto message or plain object to encode - * @param [writer] Writer to encode to + * @param m DecProto message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.IDecProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. - * @param message DecProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.IDecProto, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.DecProto; - - /** - * Decodes a DecProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.DecProto; - - /** - * Verifies a DecProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DecProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DecProto - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.DecProto; - - /** - * Creates a plain object from a DecProto message. Also converts values to other types if specified. - * @param message DecProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.DecProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DecProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.DecProto; } /** Properties of a ValAddresses. */ @@ -2626,9 +1464,9 @@ export namespace cosmos_sdk { /** * Constructs a new ValAddresses. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.IValAddresses); + constructor(p?: cosmos_sdk.v1.IValAddresses); /** ValAddresses addresses. */ public addresses: Uint8Array[]; @@ -2642,66 +1480,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. - * @param message ValAddresses message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValAddresses message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.IValAddresses, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValAddresses message, length delimited. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. - * @param message ValAddresses message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.IValAddresses, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.ValAddresses; - - /** - * Decodes a ValAddresses message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.ValAddresses; - - /** - * Verifies a ValAddresses message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValAddresses message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValAddresses - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.ValAddresses; - - /** - * Creates a plain object from a ValAddresses message. Also converts values to other types if specified. - * @param message ValAddresses - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.ValAddresses, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValAddresses to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.ValAddresses; } /** Properties of a GasInfo. */ @@ -2719,9 +1512,9 @@ export namespace cosmos_sdk { /** * Constructs a new GasInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.IGasInfo); + constructor(p?: cosmos_sdk.v1.IGasInfo); /** GasInfo gasWanted. */ public gasWanted: (number|Long); @@ -2738,66 +1531,21 @@ export namespace cosmos_sdk { /** * Encodes the specified GasInfo message. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. - * @param message GasInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m GasInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.IGasInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GasInfo message, length delimited. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. - * @param message GasInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.IGasInfo, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.GasInfo; - - /** - * Decodes a GasInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.GasInfo; - - /** - * Verifies a GasInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GasInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GasInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.GasInfo; - - /** - * Creates a plain object from a GasInfo message. Also converts values to other types if specified. - * @param message GasInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.GasInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GasInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.GasInfo; } /** Properties of a Result. */ @@ -2818,9 +1566,9 @@ export namespace cosmos_sdk { /** * Constructs a new Result. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.IResult); + constructor(p?: cosmos_sdk.v1.IResult); /** Result data. */ public data: Uint8Array; @@ -2840,66 +1588,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Result message. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. - * @param message Result message or plain object to encode - * @param [writer] Writer to encode to + * @param m Result message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.IResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. - * @param message Result message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.IResult, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.Result; - - /** - * Decodes a Result message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.Result; - - /** - * Verifies a Result message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Result message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Result - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.Result; - - /** - * Creates a plain object from a Result message. Also converts values to other types if specified. - * @param message Result - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Result to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.Result; } /** Properties of a SimulationResponse. */ @@ -2917,9 +1620,9 @@ export namespace cosmos_sdk { /** * Constructs a new SimulationResponse. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.ISimulationResponse); + constructor(p?: cosmos_sdk.v1.ISimulationResponse); /** SimulationResponse gasInfo. */ public gasInfo?: (cosmos_sdk.v1.IGasInfo|null); @@ -2936,66 +1639,21 @@ export namespace cosmos_sdk { /** * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. - * @param message SimulationResponse message or plain object to encode - * @param [writer] Writer to encode to + * @param m SimulationResponse message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.ISimulationResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SimulationResponse message, length delimited. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. - * @param message SimulationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.ISimulationResponse, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.SimulationResponse; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.SimulationResponse; - - /** - * Verifies a SimulationResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SimulationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimulationResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.SimulationResponse; - - /** - * Creates a plain object from a SimulationResponse message. Also converts values to other types if specified. - * @param message SimulationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.SimulationResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SimulationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.SimulationResponse; } /** Properties of a MsgData. */ @@ -3013,9 +1671,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgData. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.IMsgData); + constructor(p?: cosmos_sdk.v1.IMsgData); /** MsgData msgType. */ public msgType: string; @@ -3032,66 +1690,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgData message. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. - * @param message MsgData message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgData message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.IMsgData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. - * @param message MsgData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.IMsgData, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.MsgData; - - /** - * Decodes a MsgData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.MsgData; - - /** - * Verifies a MsgData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgData - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.MsgData; - - /** - * Creates a plain object from a MsgData message. Also converts values to other types if specified. - * @param message MsgData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.MsgData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.MsgData; } /** Properties of a TxData. */ @@ -3106,9 +1719,9 @@ export namespace cosmos_sdk { /** * Constructs a new TxData. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.v1.ITxData); + constructor(p?: cosmos_sdk.v1.ITxData); /** TxData data. */ public data: cosmos_sdk.v1.IMsgData[]; @@ -3122,66 +1735,21 @@ export namespace cosmos_sdk { /** * Encodes the specified TxData message. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. - * @param message TxData message or plain object to encode - * @param [writer] Writer to encode to + * @param m TxData message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.v1.ITxData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TxData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. - * @param message TxData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.v1.ITxData, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.v1.TxData; - - /** - * Decodes a TxData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.v1.TxData; - - /** - * Verifies a TxData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TxData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TxData - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.TxData; - - /** - * Creates a plain object from a TxData message. Also converts values to other types if specified. - * @param message TxData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.v1.TxData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TxData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.v1.TxData; } } @@ -3215,9 +1783,9 @@ export namespace cosmos_sdk { /** * Constructs a new BaseAccount. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.auth.v1.IBaseAccount); + constructor(p?: cosmos_sdk.x.auth.v1.IBaseAccount); /** BaseAccount address. */ public address: Uint8Array; @@ -3240,66 +1808,21 @@ export namespace cosmos_sdk { /** * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. - * @param message BaseAccount message or plain object to encode - * @param [writer] Writer to encode to + * @param m BaseAccount message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.auth.v1.IBaseAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. - * @param message BaseAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.auth.v1.IBaseAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.auth.v1.IBaseAccount, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a BaseAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns BaseAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.v1.BaseAccount; - - /** - * Decodes a BaseAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.v1.BaseAccount; - - /** - * Verifies a BaseAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BaseAccount - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.BaseAccount; - - /** - * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. - * @param message BaseAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.auth.v1.BaseAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BaseAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.auth.v1.BaseAccount; } /** Properties of a ModuleAccount. */ @@ -3320,9 +1843,9 @@ export namespace cosmos_sdk { /** * Constructs a new ModuleAccount. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.auth.v1.IModuleAccount); + constructor(p?: cosmos_sdk.x.auth.v1.IModuleAccount); /** ModuleAccount baseAccount. */ public baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); @@ -3342,66 +1865,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. - * @param message ModuleAccount message or plain object to encode - * @param [writer] Writer to encode to + * @param m ModuleAccount message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.auth.v1.IModuleAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. - * @param message ModuleAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.auth.v1.IModuleAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.auth.v1.IModuleAccount, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ModuleAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ModuleAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.v1.ModuleAccount; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.v1.ModuleAccount; - - /** - * Verifies a ModuleAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModuleAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModuleAccount - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.ModuleAccount; - - /** - * Creates a plain object from a ModuleAccount message. Also converts values to other types if specified. - * @param message ModuleAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.auth.v1.ModuleAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModuleAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.auth.v1.ModuleAccount; } /** Properties of a Params. */ @@ -3428,9 +1906,9 @@ export namespace cosmos_sdk { /** * Constructs a new Params. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.auth.v1.IParams); + constructor(p?: cosmos_sdk.x.auth.v1.IParams); /** Params maxMemoCharacters. */ public maxMemoCharacters: (number|Long); @@ -3456,66 +1934,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to + * @param m Params message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.auth.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.auth.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.auth.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Params message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Params * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.v1.Params; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.v1.Params; - - /** - * Verifies a Params message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Params - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.Params; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @param message Params - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.auth.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.auth.v1.Params; } } @@ -3549,9 +1982,9 @@ export namespace cosmos_sdk { /** * Constructs a new BaseVestingAccount. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount); + constructor(p?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount); /** BaseVestingAccount baseAccount. */ public baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); @@ -3577,66 +2010,21 @@ export namespace cosmos_sdk { /** * Encodes the specified BaseVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. - * @param message BaseVestingAccount message or plain object to encode - * @param [writer] Writer to encode to + * @param m BaseVestingAccount message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BaseVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. - * @param message BaseVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a BaseVestingAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns BaseVestingAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; - - /** - * Decodes a BaseVestingAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BaseVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; - - /** - * Verifies a BaseVestingAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BaseVestingAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BaseVestingAccount - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; - - /** - * Creates a plain object from a BaseVestingAccount message. Also converts values to other types if specified. - * @param message BaseVestingAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BaseVestingAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; } /** Properties of a ContinuousVestingAccount. */ @@ -3654,9 +2042,9 @@ export namespace cosmos_sdk { /** * Constructs a new ContinuousVestingAccount. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount); + constructor(p?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount); /** ContinuousVestingAccount baseVestingAccount. */ public baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); @@ -3673,66 +2061,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ContinuousVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. - * @param message ContinuousVestingAccount message or plain object to encode - * @param [writer] Writer to encode to + * @param m ContinuousVestingAccount message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ContinuousVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. - * @param message ContinuousVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ContinuousVestingAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ContinuousVestingAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; - - /** - * Decodes a ContinuousVestingAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContinuousVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; - - /** - * Verifies a ContinuousVestingAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ContinuousVestingAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContinuousVestingAccount - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; - - /** - * Creates a plain object from a ContinuousVestingAccount message. Also converts values to other types if specified. - * @param message ContinuousVestingAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ContinuousVestingAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; } /** Properties of a DelayedVestingAccount. */ @@ -3747,9 +2090,9 @@ export namespace cosmos_sdk { /** * Constructs a new DelayedVestingAccount. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount); + constructor(p?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount); /** DelayedVestingAccount baseVestingAccount. */ public baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); @@ -3763,66 +2106,21 @@ export namespace cosmos_sdk { /** * Encodes the specified DelayedVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. - * @param message DelayedVestingAccount message or plain object to encode - * @param [writer] Writer to encode to + * @param m DelayedVestingAccount message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DelayedVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. - * @param message DelayedVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a DelayedVestingAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns DelayedVestingAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; - - /** - * Decodes a DelayedVestingAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DelayedVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; - - /** - * Verifies a DelayedVestingAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DelayedVestingAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DelayedVestingAccount - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; - - /** - * Creates a plain object from a DelayedVestingAccount message. Also converts values to other types if specified. - * @param message DelayedVestingAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DelayedVestingAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; } /** Properties of a Period. */ @@ -3840,9 +2138,9 @@ export namespace cosmos_sdk { /** * Constructs a new Period. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriod); + constructor(p?: cosmos_sdk.x.auth.vesting.v1.IPeriod); /** Period length. */ public length: (number|Long); @@ -3859,66 +2157,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Period message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. - * @param message Period message or plain object to encode - * @param [writer] Writer to encode to + * @param m Period message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.auth.vesting.v1.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Period message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. - * @param message Period message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IPeriod, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.auth.vesting.v1.IPeriod, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Period message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Period * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.Period; - - /** - * Decodes a Period message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.Period; - - /** - * Verifies a Period message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Period message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Period - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.Period; - - /** - * Creates a plain object from a Period message. Also converts values to other types if specified. - * @param message Period - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.auth.vesting.v1.Period, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Period to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.auth.vesting.v1.Period; } /** Properties of a PeriodicVestingAccount. */ @@ -3939,9 +2192,9 @@ export namespace cosmos_sdk { /** * Constructs a new PeriodicVestingAccount. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount); + constructor(p?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount); /** PeriodicVestingAccount baseVestingAccount. */ public baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); @@ -3961,66 +2214,21 @@ export namespace cosmos_sdk { /** * Encodes the specified PeriodicVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. - * @param message PeriodicVestingAccount message or plain object to encode - * @param [writer] Writer to encode to + * @param m PeriodicVestingAccount message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PeriodicVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. - * @param message PeriodicVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PeriodicVestingAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns PeriodicVestingAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; - - /** - * Decodes a PeriodicVestingAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PeriodicVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; - - /** - * Verifies a PeriodicVestingAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PeriodicVestingAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PeriodicVestingAccount - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; - - /** - * Creates a plain object from a PeriodicVestingAccount message. Also converts values to other types if specified. - * @param message PeriodicVestingAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PeriodicVestingAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; } } } @@ -4155,9 +2363,9 @@ export namespace cosmos_sdk { /** * Constructs a new QueryBalanceRequest. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest); + constructor(p?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest); /** QueryBalanceRequest address. */ public address: Uint8Array; @@ -4174,66 +2382,21 @@ export namespace cosmos_sdk { /** * Encodes the specified QueryBalanceRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. - * @param message QueryBalanceRequest message or plain object to encode - * @param [writer] Writer to encode to + * @param m QueryBalanceRequest message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryBalanceRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. - * @param message QueryBalanceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a QueryBalanceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns QueryBalanceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryBalanceRequest; - - /** - * Decodes a QueryBalanceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryBalanceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryBalanceRequest; - - /** - * Verifies a QueryBalanceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryBalanceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryBalanceRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryBalanceRequest; - - /** - * Creates a plain object from a QueryBalanceRequest message. Also converts values to other types if specified. - * @param message QueryBalanceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.QueryBalanceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryBalanceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.QueryBalanceRequest; } /** Properties of a QueryBalanceResponse. */ @@ -4248,9 +2411,9 @@ export namespace cosmos_sdk { /** * Constructs a new QueryBalanceResponse. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse); + constructor(p?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse); /** QueryBalanceResponse balance. */ public balance?: (cosmos_sdk.v1.ICoin|null); @@ -4264,66 +2427,21 @@ export namespace cosmos_sdk { /** * Encodes the specified QueryBalanceResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. - * @param message QueryBalanceResponse message or plain object to encode - * @param [writer] Writer to encode to + * @param m QueryBalanceResponse message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryBalanceResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. - * @param message QueryBalanceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a QueryBalanceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns QueryBalanceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryBalanceResponse; - - /** - * Decodes a QueryBalanceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryBalanceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryBalanceResponse; - - /** - * Verifies a QueryBalanceResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryBalanceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryBalanceResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryBalanceResponse; - - /** - * Creates a plain object from a QueryBalanceResponse message. Also converts values to other types if specified. - * @param message QueryBalanceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.QueryBalanceResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryBalanceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.QueryBalanceResponse; } /** Properties of a QueryAllBalancesRequest. */ @@ -4338,9 +2456,9 @@ export namespace cosmos_sdk { /** * Constructs a new QueryAllBalancesRequest. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest); + constructor(p?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest); /** QueryAllBalancesRequest address. */ public address: Uint8Array; @@ -4354,66 +2472,21 @@ export namespace cosmos_sdk { /** * Encodes the specified QueryAllBalancesRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. - * @param message QueryAllBalancesRequest message or plain object to encode - * @param [writer] Writer to encode to + * @param m QueryAllBalancesRequest message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAllBalancesRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. - * @param message QueryAllBalancesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a QueryAllBalancesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns QueryAllBalancesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; - - /** - * Decodes a QueryAllBalancesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAllBalancesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; - - /** - * Verifies a QueryAllBalancesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAllBalancesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAllBalancesRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; - - /** - * Creates a plain object from a QueryAllBalancesRequest message. Also converts values to other types if specified. - * @param message QueryAllBalancesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.QueryAllBalancesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAllBalancesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; } /** Properties of a QueryAllBalancesResponse. */ @@ -4428,9 +2501,9 @@ export namespace cosmos_sdk { /** * Constructs a new QueryAllBalancesResponse. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse); + constructor(p?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse); /** QueryAllBalancesResponse balances. */ public balances: cosmos_sdk.v1.ICoin[]; @@ -4444,66 +2517,21 @@ export namespace cosmos_sdk { /** * Encodes the specified QueryAllBalancesResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. - * @param message QueryAllBalancesResponse message or plain object to encode - * @param [writer] Writer to encode to + * @param m QueryAllBalancesResponse message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryAllBalancesResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. - * @param message QueryAllBalancesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a QueryAllBalancesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns QueryAllBalancesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; - - /** - * Decodes a QueryAllBalancesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAllBalancesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; - - /** - * Verifies a QueryAllBalancesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryAllBalancesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAllBalancesResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; - - /** - * Creates a plain object from a QueryAllBalancesResponse message. Also converts values to other types if specified. - * @param message QueryAllBalancesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.QueryAllBalancesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryAllBalancesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; } /** Properties of a QueryTotalSupplyRequest. */ @@ -4515,9 +2543,9 @@ export namespace cosmos_sdk { /** * Constructs a new QueryTotalSupplyRequest. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest); + constructor(p?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest); /** * Creates a new QueryTotalSupplyRequest instance using the specified properties. @@ -4528,66 +2556,21 @@ export namespace cosmos_sdk { /** * Encodes the specified QueryTotalSupplyRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. - * @param message QueryTotalSupplyRequest message or plain object to encode - * @param [writer] Writer to encode to + * @param m QueryTotalSupplyRequest message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalSupplyRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. - * @param message QueryTotalSupplyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns QueryTotalSupplyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; - - /** - * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalSupplyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; - - /** - * Verifies a QueryTotalSupplyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalSupplyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalSupplyRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; - - /** - * Creates a plain object from a QueryTotalSupplyRequest message. Also converts values to other types if specified. - * @param message QueryTotalSupplyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalSupplyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; } /** Properties of a QueryTotalSupplyResponse. */ @@ -4602,9 +2585,9 @@ export namespace cosmos_sdk { /** * Constructs a new QueryTotalSupplyResponse. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse); + constructor(p?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse); /** QueryTotalSupplyResponse supply. */ public supply: cosmos_sdk.v1.ICoin[]; @@ -4618,66 +2601,21 @@ export namespace cosmos_sdk { /** * Encodes the specified QueryTotalSupplyResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. - * @param message QueryTotalSupplyResponse message or plain object to encode - * @param [writer] Writer to encode to + * @param m QueryTotalSupplyResponse message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalSupplyResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. - * @param message QueryTotalSupplyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns QueryTotalSupplyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; - - /** - * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalSupplyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; - - /** - * Verifies a QueryTotalSupplyResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QueryTotalSupplyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalSupplyResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; - - /** - * Creates a plain object from a QueryTotalSupplyResponse message. Also converts values to other types if specified. - * @param message QueryTotalSupplyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QueryTotalSupplyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; } /** Properties of a QuerySupplyOfRequest. */ @@ -4692,9 +2630,9 @@ export namespace cosmos_sdk { /** * Constructs a new QuerySupplyOfRequest. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest); + constructor(p?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest); /** QuerySupplyOfRequest denom. */ public denom: string; @@ -4708,66 +2646,21 @@ export namespace cosmos_sdk { /** * Encodes the specified QuerySupplyOfRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. - * @param message QuerySupplyOfRequest message or plain object to encode - * @param [writer] Writer to encode to + * @param m QuerySupplyOfRequest message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuerySupplyOfRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. - * @param message QuerySupplyOfRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a QuerySupplyOfRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns QuerySupplyOfRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; - - /** - * Decodes a QuerySupplyOfRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuerySupplyOfRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; - - /** - * Verifies a QuerySupplyOfRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QuerySupplyOfRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuerySupplyOfRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; - - /** - * Creates a plain object from a QuerySupplyOfRequest message. Also converts values to other types if specified. - * @param message QuerySupplyOfRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.QuerySupplyOfRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuerySupplyOfRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; } /** Properties of a QuerySupplyOfResponse. */ @@ -4782,9 +2675,9 @@ export namespace cosmos_sdk { /** * Constructs a new QuerySupplyOfResponse. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse); + constructor(p?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse); /** QuerySupplyOfResponse amount. */ public amount: string; @@ -4798,66 +2691,21 @@ export namespace cosmos_sdk { /** * Encodes the specified QuerySupplyOfResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. - * @param message QuerySupplyOfResponse message or plain object to encode - * @param [writer] Writer to encode to + * @param m QuerySupplyOfResponse message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuerySupplyOfResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. - * @param message QuerySupplyOfResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a QuerySupplyOfResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns QuerySupplyOfResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; - - /** - * Decodes a QuerySupplyOfResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuerySupplyOfResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; - - /** - * Verifies a QuerySupplyOfResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a QuerySupplyOfResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuerySupplyOfResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; - - /** - * Creates a plain object from a QuerySupplyOfResponse message. Also converts values to other types if specified. - * @param message QuerySupplyOfResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.QuerySupplyOfResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuerySupplyOfResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; } /** Properties of a MsgSend. */ @@ -4878,9 +2726,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgSend. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IMsgSend); + constructor(p?: cosmos_sdk.x.bank.v1.IMsgSend); /** MsgSend fromAddress. */ public fromAddress: Uint8Array; @@ -4900,66 +2748,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. - * @param message MsgSend message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgSend message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IMsgSend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. - * @param message MsgSend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IMsgSend, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.MsgSend; - - /** - * Decodes a MsgSend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.MsgSend; - - /** - * Verifies a MsgSend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSend - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.MsgSend; - - /** - * Creates a plain object from a MsgSend message. Also converts values to other types if specified. - * @param message MsgSend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.MsgSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.MsgSend; } /** Properties of an Input. */ @@ -4977,9 +2780,9 @@ export namespace cosmos_sdk { /** * Constructs a new Input. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IInput); + constructor(p?: cosmos_sdk.x.bank.v1.IInput); /** Input address. */ public address: Uint8Array; @@ -4996,66 +2799,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Input message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. - * @param message Input message or plain object to encode - * @param [writer] Writer to encode to + * @param m Input message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IInput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. - * @param message Input message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IInput, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.Input; - - /** - * Decodes an Input message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.Input; - - /** - * Verifies an Input message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Input message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Input - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Input; - - /** - * Creates a plain object from an Input message. Also converts values to other types if specified. - * @param message Input - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.Input, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Input to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.Input; } /** Properties of an Output. */ @@ -5073,9 +2831,9 @@ export namespace cosmos_sdk { /** * Constructs a new Output. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IOutput); + constructor(p?: cosmos_sdk.x.bank.v1.IOutput); /** Output address. */ public address: Uint8Array; @@ -5092,66 +2850,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Output message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. - * @param message Output message or plain object to encode - * @param [writer] Writer to encode to + * @param m Output message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IOutput, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. - * @param message Output message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IOutput, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.Output; - - /** - * Decodes an Output message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.Output; - - /** - * Verifies an Output message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Output message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Output - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Output; - - /** - * Creates a plain object from an Output message. Also converts values to other types if specified. - * @param message Output - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.Output, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Output to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.Output; } /** Properties of a MsgMultiSend. */ @@ -5169,9 +2882,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgMultiSend. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.IMsgMultiSend); + constructor(p?: cosmos_sdk.x.bank.v1.IMsgMultiSend); /** MsgMultiSend inputs. */ public inputs: cosmos_sdk.x.bank.v1.IInput[]; @@ -5188,66 +2901,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. - * @param message MsgMultiSend message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgMultiSend message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.IMsgMultiSend, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. - * @param message MsgMultiSend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.IMsgMultiSend, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.MsgMultiSend; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.MsgMultiSend; - - /** - * Verifies a MsgMultiSend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgMultiSend - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.MsgMultiSend; - - /** - * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. - * @param message MsgMultiSend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.MsgMultiSend, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgMultiSend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.MsgMultiSend; } /** Properties of a Supply. */ @@ -5262,9 +2930,9 @@ export namespace cosmos_sdk { /** * Constructs a new Supply. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.bank.v1.ISupply); + constructor(p?: cosmos_sdk.x.bank.v1.ISupply); /** Supply total. */ public total: cosmos_sdk.v1.ICoin[]; @@ -5278,66 +2946,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Supply message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. - * @param message Supply message or plain object to encode - * @param [writer] Writer to encode to + * @param m Supply message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.bank.v1.ISupply, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. - * @param message Supply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.bank.v1.ISupply, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.bank.v1.Supply; - - /** - * Decodes a Supply message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.bank.v1.Supply; - - /** - * Verifies a Supply message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Supply message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Supply - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Supply; - - /** - * Creates a plain object from a Supply message. Also converts values to other types if specified. - * @param message Supply - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.bank.v1.Supply, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Supply to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.bank.v1.Supply; } } } @@ -5360,9 +2983,9 @@ export namespace cosmos_sdk { /** * Constructs a new Capability. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.capability.v1.ICapability); + constructor(p?: cosmos_sdk.x.capability.v1.ICapability); /** Capability index. */ public index: (number|Long); @@ -5376,66 +2999,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Capability message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. - * @param message Capability message or plain object to encode - * @param [writer] Writer to encode to + * @param m Capability message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.capability.v1.ICapability, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Capability message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. - * @param message Capability message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.capability.v1.ICapability, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.capability.v1.ICapability, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Capability message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Capability * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.capability.v1.Capability; - - /** - * Decodes a Capability message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Capability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.capability.v1.Capability; - - /** - * Verifies a Capability message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Capability message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Capability - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.Capability; - - /** - * Creates a plain object from a Capability message. Also converts values to other types if specified. - * @param message Capability - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.capability.v1.Capability, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Capability to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.capability.v1.Capability; } /** Properties of an Owner. */ @@ -5453,9 +3031,9 @@ export namespace cosmos_sdk { /** * Constructs a new Owner. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.capability.v1.IOwner); + constructor(p?: cosmos_sdk.x.capability.v1.IOwner); /** Owner module. */ public module: string; @@ -5472,66 +3050,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Owner message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. - * @param message Owner message or plain object to encode - * @param [writer] Writer to encode to + * @param m Owner message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.capability.v1.IOwner, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Owner message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. - * @param message Owner message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.capability.v1.IOwner, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.capability.v1.IOwner, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Owner message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Owner * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.capability.v1.Owner; - - /** - * Decodes an Owner message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Owner - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.capability.v1.Owner; - - /** - * Verifies an Owner message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Owner message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Owner - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.Owner; - - /** - * Creates a plain object from an Owner message. Also converts values to other types if specified. - * @param message Owner - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.capability.v1.Owner, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Owner to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.capability.v1.Owner; } /** Properties of a CapabilityOwners. */ @@ -5546,9 +3079,9 @@ export namespace cosmos_sdk { /** * Constructs a new CapabilityOwners. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.capability.v1.ICapabilityOwners); + constructor(p?: cosmos_sdk.x.capability.v1.ICapabilityOwners); /** CapabilityOwners owners. */ public owners: cosmos_sdk.x.capability.v1.IOwner[]; @@ -5562,66 +3095,21 @@ export namespace cosmos_sdk { /** * Encodes the specified CapabilityOwners message. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. - * @param message CapabilityOwners message or plain object to encode - * @param [writer] Writer to encode to + * @param m CapabilityOwners message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.capability.v1.ICapabilityOwners, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CapabilityOwners message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. - * @param message CapabilityOwners message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.capability.v1.ICapabilityOwners, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.capability.v1.ICapabilityOwners, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a CapabilityOwners message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns CapabilityOwners * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.capability.v1.CapabilityOwners; - - /** - * Decodes a CapabilityOwners message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CapabilityOwners - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.capability.v1.CapabilityOwners; - - /** - * Verifies a CapabilityOwners message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CapabilityOwners message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CapabilityOwners - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.CapabilityOwners; - - /** - * Creates a plain object from a CapabilityOwners message. Also converts values to other types if specified. - * @param message CapabilityOwners - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.capability.v1.CapabilityOwners, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CapabilityOwners to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.capability.v1.CapabilityOwners; } } } @@ -5650,9 +3138,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgVerifyInvariant. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant); + constructor(p?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant); /** MsgVerifyInvariant sender. */ public sender: Uint8Array; @@ -5672,66 +3160,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. - * @param message MsgVerifyInvariant message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgVerifyInvariant message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgVerifyInvariant message, length delimited. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. - * @param message MsgVerifyInvariant message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgVerifyInvariant message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgVerifyInvariant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; - - /** - * Decodes a MsgVerifyInvariant message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgVerifyInvariant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; - - /** - * Verifies a MsgVerifyInvariant message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgVerifyInvariant message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgVerifyInvariant - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; - - /** - * Creates a plain object from a MsgVerifyInvariant message. Also converts values to other types if specified. - * @param message MsgVerifyInvariant - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.crisis.v1.MsgVerifyInvariant, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgVerifyInvariant to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; } } } @@ -5757,9 +3200,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgSetWithdrawAddress. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress); + constructor(p?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress); /** MsgSetWithdrawAddress delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -5776,66 +3219,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. - * @param message MsgSetWithdrawAddress message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgSetWithdrawAddress message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSetWithdrawAddress message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. - * @param message MsgSetWithdrawAddress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgSetWithdrawAddress * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; - - /** - * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSetWithdrawAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; - - /** - * Verifies a MsgSetWithdrawAddress message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSetWithdrawAddress message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSetWithdrawAddress - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; - - /** - * Creates a plain object from a MsgSetWithdrawAddress message. Also converts values to other types if specified. - * @param message MsgSetWithdrawAddress - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSetWithdrawAddress to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; } /** Properties of a MsgWithdrawDelegatorReward. */ @@ -5853,9 +3251,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgWithdrawDelegatorReward. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward); + constructor(p?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward); /** MsgWithdrawDelegatorReward delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -5872,66 +3270,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. - * @param message MsgWithdrawDelegatorReward message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgWithdrawDelegatorReward message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgWithdrawDelegatorReward message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. - * @param message MsgWithdrawDelegatorReward message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgWithdrawDelegatorReward * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; - - /** - * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgWithdrawDelegatorReward - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; - - /** - * Verifies a MsgWithdrawDelegatorReward message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgWithdrawDelegatorReward message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgWithdrawDelegatorReward - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; - - /** - * Creates a plain object from a MsgWithdrawDelegatorReward message. Also converts values to other types if specified. - * @param message MsgWithdrawDelegatorReward - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgWithdrawDelegatorReward to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; } /** Properties of a MsgWithdrawValidatorCommission. */ @@ -5946,9 +3299,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgWithdrawValidatorCommission. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission); + constructor(p?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission); /** MsgWithdrawValidatorCommission validatorAddress. */ public validatorAddress: Uint8Array; @@ -5962,66 +3315,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. - * @param message MsgWithdrawValidatorCommission message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgWithdrawValidatorCommission message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgWithdrawValidatorCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. - * @param message MsgWithdrawValidatorCommission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgWithdrawValidatorCommission * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; - - /** - * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgWithdrawValidatorCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; - - /** - * Verifies a MsgWithdrawValidatorCommission message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgWithdrawValidatorCommission message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgWithdrawValidatorCommission - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; - - /** - * Creates a plain object from a MsgWithdrawValidatorCommission message. Also converts values to other types if specified. - * @param message MsgWithdrawValidatorCommission - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgWithdrawValidatorCommission to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; } /** Properties of a MsgFundCommunityPool. */ @@ -6039,9 +3347,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgFundCommunityPool. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool); + constructor(p?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool); /** MsgFundCommunityPool amount. */ public amount: cosmos_sdk.v1.ICoin[]; @@ -6058,66 +3366,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. - * @param message MsgFundCommunityPool message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgFundCommunityPool message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgFundCommunityPool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. - * @param message MsgFundCommunityPool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgFundCommunityPool message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgFundCommunityPool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; - - /** - * Decodes a MsgFundCommunityPool message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgFundCommunityPool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; - - /** - * Verifies a MsgFundCommunityPool message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgFundCommunityPool message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgFundCommunityPool - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; - - /** - * Creates a plain object from a MsgFundCommunityPool message. Also converts values to other types if specified. - * @param message MsgFundCommunityPool - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.MsgFundCommunityPool, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgFundCommunityPool to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; } /** Properties of a Params. */ @@ -6141,9 +3404,9 @@ export namespace cosmos_sdk { /** * Constructs a new Params. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IParams); + constructor(p?: cosmos_sdk.x.distribution.v1.IParams); /** Params communityTax. */ public communityTax: string; @@ -6166,66 +3429,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to + * @param m Params message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Params message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Params * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.Params; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.Params; - - /** - * Verifies a Params message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Params - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.Params; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @param message Params - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.Params; } /** Properties of a ValidatorHistoricalRewards. */ @@ -6243,9 +3461,9 @@ export namespace cosmos_sdk { /** * Constructs a new ValidatorHistoricalRewards. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards); + constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards); /** ValidatorHistoricalRewards cumulativeRewardRatio. */ public cumulativeRewardRatio: cosmos_sdk.v1.IDecCoin[]; @@ -6262,66 +3480,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. - * @param message ValidatorHistoricalRewards message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorHistoricalRewards message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorHistoricalRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. - * @param message ValidatorHistoricalRewards message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ValidatorHistoricalRewards * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; - - /** - * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorHistoricalRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; - - /** - * Verifies a ValidatorHistoricalRewards message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorHistoricalRewards message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorHistoricalRewards - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; - - /** - * Creates a plain object from a ValidatorHistoricalRewards message. Also converts values to other types if specified. - * @param message ValidatorHistoricalRewards - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorHistoricalRewards to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; } /** Properties of a ValidatorCurrentRewards. */ @@ -6339,9 +3512,9 @@ export namespace cosmos_sdk { /** * Constructs a new ValidatorCurrentRewards. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards); + constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards); /** ValidatorCurrentRewards rewards. */ public rewards: cosmos_sdk.v1.IDecCoin[]; @@ -6358,66 +3531,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. - * @param message ValidatorCurrentRewards message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorCurrentRewards message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorCurrentRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. - * @param message ValidatorCurrentRewards message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ValidatorCurrentRewards * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; - - /** - * Decodes a ValidatorCurrentRewards message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorCurrentRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; - - /** - * Verifies a ValidatorCurrentRewards message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorCurrentRewards message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorCurrentRewards - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; - - /** - * Creates a plain object from a ValidatorCurrentRewards message. Also converts values to other types if specified. - * @param message ValidatorCurrentRewards - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorCurrentRewards to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; } /** Properties of a ValidatorAccumulatedCommission. */ @@ -6432,9 +3560,9 @@ export namespace cosmos_sdk { /** * Constructs a new ValidatorAccumulatedCommission. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission); + constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission); /** ValidatorAccumulatedCommission commission. */ public commission: cosmos_sdk.v1.IDecCoin[]; @@ -6448,66 +3576,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. - * @param message ValidatorAccumulatedCommission message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorAccumulatedCommission message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorAccumulatedCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. - * @param message ValidatorAccumulatedCommission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ValidatorAccumulatedCommission * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; - - /** - * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorAccumulatedCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; - - /** - * Verifies a ValidatorAccumulatedCommission message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorAccumulatedCommission message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorAccumulatedCommission - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; - - /** - * Creates a plain object from a ValidatorAccumulatedCommission message. Also converts values to other types if specified. - * @param message ValidatorAccumulatedCommission - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorAccumulatedCommission to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; } /** Properties of a ValidatorOutstandingRewards. */ @@ -6522,9 +3605,9 @@ export namespace cosmos_sdk { /** * Constructs a new ValidatorOutstandingRewards. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards); + constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards); /** ValidatorOutstandingRewards rewards. */ public rewards: cosmos_sdk.v1.IDecCoin[]; @@ -6538,66 +3621,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. - * @param message ValidatorOutstandingRewards message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorOutstandingRewards message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorOutstandingRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. - * @param message ValidatorOutstandingRewards message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ValidatorOutstandingRewards * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; - - /** - * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorOutstandingRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; - - /** - * Verifies a ValidatorOutstandingRewards message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorOutstandingRewards message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorOutstandingRewards - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; - - /** - * Creates a plain object from a ValidatorOutstandingRewards message. Also converts values to other types if specified. - * @param message ValidatorOutstandingRewards - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorOutstandingRewards to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; } /** Properties of a ValidatorSlashEvent. */ @@ -6615,9 +3653,9 @@ export namespace cosmos_sdk { /** * Constructs a new ValidatorSlashEvent. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent); + constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent); /** ValidatorSlashEvent validatorPeriod. */ public validatorPeriod: (number|Long); @@ -6634,66 +3672,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. - * @param message ValidatorSlashEvent message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorSlashEvent message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorSlashEvent message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. - * @param message ValidatorSlashEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ValidatorSlashEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ValidatorSlashEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; - - /** - * Decodes a ValidatorSlashEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorSlashEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; - - /** - * Verifies a ValidatorSlashEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorSlashEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorSlashEvent - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; - - /** - * Creates a plain object from a ValidatorSlashEvent message. Also converts values to other types if specified. - * @param message ValidatorSlashEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorSlashEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorSlashEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; } /** Properties of a ValidatorSlashEvents. */ @@ -6708,9 +3701,9 @@ export namespace cosmos_sdk { /** * Constructs a new ValidatorSlashEvents. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents); + constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents); /** ValidatorSlashEvents validatorSlashEvents. */ public validatorSlashEvents: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent[]; @@ -6724,66 +3717,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. - * @param message ValidatorSlashEvents message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorSlashEvents message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorSlashEvents message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. - * @param message ValidatorSlashEvents message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ValidatorSlashEvents message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ValidatorSlashEvents * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; - - /** - * Decodes a ValidatorSlashEvents message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorSlashEvents - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; - - /** - * Verifies a ValidatorSlashEvents message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorSlashEvents message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorSlashEvents - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; - - /** - * Creates a plain object from a ValidatorSlashEvents message. Also converts values to other types if specified. - * @param message ValidatorSlashEvents - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.ValidatorSlashEvents, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorSlashEvents to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; } /** Properties of a FeePool. */ @@ -6798,9 +3746,9 @@ export namespace cosmos_sdk { /** * Constructs a new FeePool. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IFeePool); + constructor(p?: cosmos_sdk.x.distribution.v1.IFeePool); /** FeePool communityPool. */ public communityPool: cosmos_sdk.v1.IDecCoin[]; @@ -6814,66 +3762,21 @@ export namespace cosmos_sdk { /** * Encodes the specified FeePool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. - * @param message FeePool message or plain object to encode - * @param [writer] Writer to encode to + * @param m FeePool message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IFeePool, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeePool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. - * @param message FeePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IFeePool, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IFeePool, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a FeePool message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns FeePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.FeePool; - - /** - * Decodes a FeePool message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.FeePool; - - /** - * Verifies a FeePool message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeePool message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeePool - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.FeePool; - - /** - * Creates a plain object from a FeePool message. Also converts values to other types if specified. - * @param message FeePool - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.FeePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeePool to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.FeePool; } /** Properties of a CommunityPoolSpendProposal. */ @@ -6897,9 +3800,9 @@ export namespace cosmos_sdk { /** * Constructs a new CommunityPoolSpendProposal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal); + constructor(p?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal); /** CommunityPoolSpendProposal title. */ public title: string; @@ -6922,66 +3825,21 @@ export namespace cosmos_sdk { /** * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. - * @param message CommunityPoolSpendProposal message or plain object to encode - * @param [writer] Writer to encode to + * @param m CommunityPoolSpendProposal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommunityPoolSpendProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. - * @param message CommunityPoolSpendProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns CommunityPoolSpendProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; - - /** - * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommunityPoolSpendProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; - - /** - * Verifies a CommunityPoolSpendProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommunityPoolSpendProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommunityPoolSpendProposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; - - /** - * Creates a plain object from a CommunityPoolSpendProposal message. Also converts values to other types if specified. - * @param message CommunityPoolSpendProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommunityPoolSpendProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; } /** Properties of a DelegatorStartingInfo. */ @@ -7002,9 +3860,9 @@ export namespace cosmos_sdk { /** * Constructs a new DelegatorStartingInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo); + constructor(p?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo); /** DelegatorStartingInfo previousPeriod. */ public previousPeriod: (number|Long); @@ -7024,66 +3882,21 @@ export namespace cosmos_sdk { /** * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. - * @param message DelegatorStartingInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m DelegatorStartingInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DelegatorStartingInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. - * @param message DelegatorStartingInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a DelegatorStartingInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns DelegatorStartingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; - - /** - * Decodes a DelegatorStartingInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DelegatorStartingInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; - - /** - * Verifies a DelegatorStartingInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DelegatorStartingInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DelegatorStartingInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; - - /** - * Creates a plain object from a DelegatorStartingInfo message. Also converts values to other types if specified. - * @param message DelegatorStartingInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.distribution.v1.DelegatorStartingInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DelegatorStartingInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; } } } @@ -7109,9 +3922,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgSubmitEvidence. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence); + constructor(p?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence); /** MsgSubmitEvidence submitter. */ public submitter: Uint8Array; @@ -7128,66 +3941,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. - * @param message MsgSubmitEvidence message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgSubmitEvidence message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitEvidence message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. - * @param message MsgSubmitEvidence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgSubmitEvidence message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgSubmitEvidence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; - - /** - * Decodes a MsgSubmitEvidence message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitEvidence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; - - /** - * Verifies a MsgSubmitEvidence message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitEvidence message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitEvidence - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; - - /** - * Creates a plain object from a MsgSubmitEvidence message. Also converts values to other types if specified. - * @param message MsgSubmitEvidence - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.evidence.v1.MsgSubmitEvidence, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitEvidence to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; } /** Properties of an Equivocation. */ @@ -7211,9 +3979,9 @@ export namespace cosmos_sdk { /** * Constructs a new Equivocation. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.evidence.v1.IEquivocation); + constructor(p?: cosmos_sdk.x.evidence.v1.IEquivocation); /** Equivocation height. */ public height: (number|Long); @@ -7236,66 +4004,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Equivocation message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. - * @param message Equivocation message or plain object to encode - * @param [writer] Writer to encode to + * @param m Equivocation message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.evidence.v1.IEquivocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Equivocation message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. - * @param message Equivocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.evidence.v1.IEquivocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.evidence.v1.IEquivocation, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Equivocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Equivocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.evidence.v1.Equivocation; - - /** - * Decodes an Equivocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Equivocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.evidence.v1.Equivocation; - - /** - * Verifies an Equivocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Equivocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Equivocation - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.evidence.v1.Equivocation; - - /** - * Creates a plain object from an Equivocation message. Also converts values to other types if specified. - * @param message Equivocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.evidence.v1.Equivocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Equivocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.evidence.v1.Equivocation; } } } @@ -7324,9 +4047,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgSubmitProposal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal); + constructor(p?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal); /** MsgSubmitProposal content. */ public content?: (google.protobuf.IAny|null); @@ -7346,66 +4069,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. - * @param message MsgSubmitProposal message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgSubmitProposal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. - * @param message MsgSubmitProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgSubmitProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgSubmitProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.MsgSubmitProposal; - - /** - * Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.MsgSubmitProposal; - - /** - * Verifies a MsgSubmitProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitProposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgSubmitProposal; - - /** - * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. - * @param message MsgSubmitProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.gov.v1.MsgSubmitProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgSubmitProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.gov.v1.MsgSubmitProposal; } /** Properties of a MsgVote. */ @@ -7426,9 +4104,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgVote. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.gov.v1.IMsgVote); + constructor(p?: cosmos_sdk.x.gov.v1.IMsgVote); /** MsgVote proposalId. */ public proposalId: (number|Long); @@ -7448,66 +4126,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgVote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. - * @param message MsgVote message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgVote message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.gov.v1.IMsgVote, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgVote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. - * @param message MsgVote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IMsgVote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.gov.v1.IMsgVote, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgVote message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgVote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.MsgVote; - - /** - * Decodes a MsgVote message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgVote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.MsgVote; - - /** - * Verifies a MsgVote message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgVote message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgVote - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgVote; - - /** - * Creates a plain object from a MsgVote message. Also converts values to other types if specified. - * @param message MsgVote - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.gov.v1.MsgVote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgVote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.gov.v1.MsgVote; } /** Properties of a MsgDeposit. */ @@ -7528,9 +4161,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgDeposit. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.gov.v1.IMsgDeposit); + constructor(p?: cosmos_sdk.x.gov.v1.IMsgDeposit); /** MsgDeposit proposalId. */ public proposalId: (number|Long); @@ -7550,66 +4183,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. - * @param message MsgDeposit message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgDeposit message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.gov.v1.IMsgDeposit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgDeposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. - * @param message MsgDeposit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IMsgDeposit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.gov.v1.IMsgDeposit, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgDeposit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgDeposit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.MsgDeposit; - - /** - * Decodes a MsgDeposit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgDeposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.MsgDeposit; - - /** - * Verifies a MsgDeposit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgDeposit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgDeposit - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgDeposit; - - /** - * Creates a plain object from a MsgDeposit message. Also converts values to other types if specified. - * @param message MsgDeposit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.gov.v1.MsgDeposit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgDeposit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.gov.v1.MsgDeposit; } /** VoteOption enum. */ @@ -7636,9 +4224,9 @@ export namespace cosmos_sdk { /** * Constructs a new TextProposal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.gov.v1.ITextProposal); + constructor(p?: cosmos_sdk.x.gov.v1.ITextProposal); /** TextProposal title. */ public title: string; @@ -7655,66 +4243,21 @@ export namespace cosmos_sdk { /** * Encodes the specified TextProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. - * @param message TextProposal message or plain object to encode - * @param [writer] Writer to encode to + * @param m TextProposal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.gov.v1.ITextProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. - * @param message TextProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.gov.v1.ITextProposal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.gov.v1.ITextProposal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a TextProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns TextProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.TextProposal; - - /** - * Decodes a TextProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.TextProposal; - - /** - * Verifies a TextProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TextProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextProposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.TextProposal; - - /** - * Creates a plain object from a TextProposal message. Also converts values to other types if specified. - * @param message TextProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.gov.v1.TextProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TextProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.gov.v1.TextProposal; } /** Properties of a Deposit. */ @@ -7735,9 +4278,9 @@ export namespace cosmos_sdk { /** * Constructs a new Deposit. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.gov.v1.IDeposit); + constructor(p?: cosmos_sdk.x.gov.v1.IDeposit); /** Deposit proposalId. */ public proposalId: (number|Long); @@ -7757,66 +4300,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Deposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. - * @param message Deposit message or plain object to encode - * @param [writer] Writer to encode to + * @param m Deposit message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.gov.v1.IDeposit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. - * @param message Deposit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IDeposit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.gov.v1.IDeposit, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Deposit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Deposit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.Deposit; - - /** - * Decodes a Deposit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Deposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.Deposit; - - /** - * Verifies a Deposit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Deposit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Deposit - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Deposit; - - /** - * Creates a plain object from a Deposit message. Also converts values to other types if specified. - * @param message Deposit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.gov.v1.Deposit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Deposit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.gov.v1.Deposit; } /** Properties of a Proposal. */ @@ -7855,9 +4353,9 @@ export namespace cosmos_sdk { /** * Constructs a new Proposal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.gov.v1.IProposal); + constructor(p?: cosmos_sdk.x.gov.v1.IProposal); /** Proposal proposalId. */ public proposalId: (number|Long); @@ -7895,66 +4393,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Proposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. - * @param message Proposal message or plain object to encode - * @param [writer] Writer to encode to + * @param m Proposal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.gov.v1.IProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. - * @param message Proposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IProposal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.gov.v1.IProposal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Proposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Proposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.Proposal; - - /** - * Decodes a Proposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Proposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.Proposal; - - /** - * Verifies a Proposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Proposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Proposal; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @param message Proposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.gov.v1.Proposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Proposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.gov.v1.Proposal; } /** ProposalStatus enum. */ @@ -7988,9 +4441,9 @@ export namespace cosmos_sdk { /** * Constructs a new TallyResult. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.gov.v1.ITallyResult); + constructor(p?: cosmos_sdk.x.gov.v1.ITallyResult); /** TallyResult yes. */ public yes: string; @@ -8013,66 +4466,21 @@ export namespace cosmos_sdk { /** * Encodes the specified TallyResult message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. - * @param message TallyResult message or plain object to encode - * @param [writer] Writer to encode to + * @param m TallyResult message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.gov.v1.ITallyResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. - * @param message TallyResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.gov.v1.ITallyResult, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.gov.v1.ITallyResult, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a TallyResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns TallyResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.TallyResult; - - /** - * Decodes a TallyResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TallyResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.TallyResult; - - /** - * Verifies a TallyResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TallyResult - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.TallyResult; - - /** - * Creates a plain object from a TallyResult message. Also converts values to other types if specified. - * @param message TallyResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.gov.v1.TallyResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TallyResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.gov.v1.TallyResult; } /** Properties of a Vote. */ @@ -8093,9 +4501,9 @@ export namespace cosmos_sdk { /** * Constructs a new Vote. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.gov.v1.IVote); + constructor(p?: cosmos_sdk.x.gov.v1.IVote); /** Vote proposalId. */ public proposalId: (number|Long); @@ -8115,66 +4523,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Vote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. - * @param message Vote message or plain object to encode - * @param [writer] Writer to encode to + * @param m Vote message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.gov.v1.IVote, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. - * @param message Vote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.gov.v1.IVote, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.gov.v1.IVote, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Vote message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Vote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.gov.v1.Vote; - - /** - * Decodes a Vote message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Vote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.gov.v1.Vote; - - /** - * Verifies a Vote message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Vote - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Vote; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @param message Vote - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.gov.v1.Vote, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Vote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.gov.v1.Vote; } } } @@ -8215,9 +4578,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgTransfer. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.transfer.v1.IMsgTransfer); + constructor(p?: cosmos_sdk.x.transfer.v1.IMsgTransfer); /** MsgTransfer sourcePort. */ public sourcePort: string; @@ -8249,66 +4612,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgTransfer message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. - * @param message MsgTransfer message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgTransfer message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.transfer.v1.IMsgTransfer, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. - * @param message MsgTransfer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.transfer.v1.IMsgTransfer, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.transfer.v1.IMsgTransfer, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgTransfer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.transfer.v1.MsgTransfer; - - /** - * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgTransfer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.transfer.v1.MsgTransfer; - - /** - * Verifies a MsgTransfer message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgTransfer - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.transfer.v1.MsgTransfer; - - /** - * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. - * @param message MsgTransfer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.transfer.v1.MsgTransfer, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgTransfer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.transfer.v1.MsgTransfer; } /** Properties of a FungibleTokenPacketData. */ @@ -8329,9 +4647,9 @@ export namespace cosmos_sdk { /** * Constructs a new FungibleTokenPacketData. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData); + constructor(p?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData); /** FungibleTokenPacketData amount. */ public amount: cosmos_sdk.v1.ICoin[]; @@ -8351,66 +4669,21 @@ export namespace cosmos_sdk { /** * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. - * @param message FungibleTokenPacketData message or plain object to encode - * @param [writer] Writer to encode to + * @param m FungibleTokenPacketData message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. - * @param message FungibleTokenPacketData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a FungibleTokenPacketData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns FungibleTokenPacketData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; - - /** - * Decodes a FungibleTokenPacketData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FungibleTokenPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; - - /** - * Verifies a FungibleTokenPacketData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FungibleTokenPacketData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FungibleTokenPacketData - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; - - /** - * Creates a plain object from a FungibleTokenPacketData message. Also converts values to other types if specified. - * @param message FungibleTokenPacketData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.transfer.v1.FungibleTokenPacketData, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FungibleTokenPacketData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; } /** Properties of a FungibleTokenPacketAcknowledgement. */ @@ -8428,9 +4701,9 @@ export namespace cosmos_sdk { /** * Constructs a new FungibleTokenPacketAcknowledgement. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement); + constructor(p?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement); /** FungibleTokenPacketAcknowledgement success. */ public success: boolean; @@ -8447,66 +4720,21 @@ export namespace cosmos_sdk { /** * Encodes the specified FungibleTokenPacketAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. - * @param message FungibleTokenPacketAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to + * @param m FungibleTokenPacketAcknowledgement message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FungibleTokenPacketAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. - * @param message FungibleTokenPacketAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns FungibleTokenPacketAcknowledgement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; - - /** - * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FungibleTokenPacketAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; - - /** - * Verifies a FungibleTokenPacketAcknowledgement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FungibleTokenPacketAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FungibleTokenPacketAcknowledgement - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; - - /** - * Creates a plain object from a FungibleTokenPacketAcknowledgement message. Also converts values to other types if specified. - * @param message FungibleTokenPacketAcknowledgement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FungibleTokenPacketAcknowledgement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; } } } @@ -8541,9 +4769,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgConnectionOpenInit. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit); + constructor(p?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit); /** MsgConnectionOpenInit clientId. */ public clientId: string; @@ -8566,66 +4794,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @param message MsgConnectionOpenInit message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgConnectionOpenInit message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @param message MsgConnectionOpenInit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgConnectionOpenInit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgConnectionOpenInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; - - /** - * Decodes a MsgConnectionOpenInit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; - - /** - * Verifies a MsgConnectionOpenInit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgConnectionOpenInit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenInit - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; - - /** - * Creates a plain object from a MsgConnectionOpenInit message. Also converts values to other types if specified. - * @param message MsgConnectionOpenInit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenInit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; } /** Properties of a MsgConnectionOpenTry. */ @@ -8644,13 +4827,13 @@ export namespace cosmos_sdk { counterpartyVersions?: (string[]|null); /** MsgConnectionOpenTry proofInit */ - proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proofInit?: (Uint8Array|null); /** MsgConnectionOpenTry proofHeight */ proofHeight?: (number|Long|null); /** MsgConnectionOpenTry proofConsensus */ - proofConsensus?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proofConsensus?: (Uint8Array|null); /** MsgConnectionOpenTry consensusHeight */ consensusHeight?: (number|Long|null); @@ -8664,9 +4847,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgConnectionOpenTry. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry); + constructor(p?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry); /** MsgConnectionOpenTry clientId. */ public clientId: string; @@ -8681,13 +4864,13 @@ export namespace cosmos_sdk { public counterpartyVersions: string[]; /** MsgConnectionOpenTry proofInit. */ - public proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proofInit: Uint8Array; /** MsgConnectionOpenTry proofHeight. */ public proofHeight: (number|Long); /** MsgConnectionOpenTry proofConsensus. */ - public proofConsensus?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proofConsensus: Uint8Array; /** MsgConnectionOpenTry consensusHeight. */ public consensusHeight: (number|Long); @@ -8704,66 +4887,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @param message MsgConnectionOpenTry message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgConnectionOpenTry message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @param message MsgConnectionOpenTry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgConnectionOpenTry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgConnectionOpenTry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; - - /** - * Decodes a MsgConnectionOpenTry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; - - /** - * Verifies a MsgConnectionOpenTry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgConnectionOpenTry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenTry - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; - - /** - * Creates a plain object from a MsgConnectionOpenTry message. Also converts values to other types if specified. - * @param message MsgConnectionOpenTry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenTry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; } /** Properties of a MsgConnectionOpenAck. */ @@ -8776,13 +4914,13 @@ export namespace cosmos_sdk { version?: (string|null); /** MsgConnectionOpenAck proofTry */ - proofTry?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proofTry?: (Uint8Array|null); /** MsgConnectionOpenAck proofHeight */ proofHeight?: (number|Long|null); /** MsgConnectionOpenAck proofConsensus */ - proofConsensus?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proofConsensus?: (Uint8Array|null); /** MsgConnectionOpenAck consensusHeight */ consensusHeight?: (number|Long|null); @@ -8796,9 +4934,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgConnectionOpenAck. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck); + constructor(p?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck); /** MsgConnectionOpenAck connectionId. */ public connectionId: string; @@ -8807,13 +4945,13 @@ export namespace cosmos_sdk { public version: string; /** MsgConnectionOpenAck proofTry. */ - public proofTry?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proofTry: Uint8Array; /** MsgConnectionOpenAck proofHeight. */ public proofHeight: (number|Long); /** MsgConnectionOpenAck proofConsensus. */ - public proofConsensus?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proofConsensus: Uint8Array; /** MsgConnectionOpenAck consensusHeight. */ public consensusHeight: (number|Long); @@ -8830,66 +4968,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @param message MsgConnectionOpenAck message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgConnectionOpenAck message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @param message MsgConnectionOpenAck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgConnectionOpenAck message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgConnectionOpenAck * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; - - /** - * Decodes a MsgConnectionOpenAck message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; - - /** - * Verifies a MsgConnectionOpenAck message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgConnectionOpenAck message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenAck - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; - - /** - * Creates a plain object from a MsgConnectionOpenAck message. Also converts values to other types if specified. - * @param message MsgConnectionOpenAck - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenAck to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; } /** Properties of a MsgConnectionOpenConfirm. */ @@ -8899,7 +4992,7 @@ export namespace cosmos_sdk { connectionId?: (string|null); /** MsgConnectionOpenConfirm proofAck */ - proofAck?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proofAck?: (Uint8Array|null); /** MsgConnectionOpenConfirm proofHeight */ proofHeight?: (number|Long|null); @@ -8913,15 +5006,15 @@ export namespace cosmos_sdk { /** * Constructs a new MsgConnectionOpenConfirm. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm); + constructor(p?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm); /** MsgConnectionOpenConfirm connectionId. */ public connectionId: string; /** MsgConnectionOpenConfirm proofAck. */ - public proofAck?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proofAck: Uint8Array; /** MsgConnectionOpenConfirm proofHeight. */ public proofHeight: (number|Long); @@ -8938,66 +5031,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @param message MsgConnectionOpenConfirm message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgConnectionOpenConfirm message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @param message MsgConnectionOpenConfirm message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgConnectionOpenConfirm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; - - /** - * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; - - /** - * Verifies a MsgConnectionOpenConfirm message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgConnectionOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenConfirm - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; - - /** - * Creates a plain object from a MsgConnectionOpenConfirm message. Also converts values to other types if specified. - * @param message MsgConnectionOpenConfirm - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenConfirm to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; } /** Properties of a ConnectionEnd. */ @@ -9024,9 +5072,9 @@ export namespace cosmos_sdk { /** * Constructs a new ConnectionEnd. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd); + constructor(p?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd); /** ConnectionEnd id. */ public id: string; @@ -9052,66 +5100,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ConnectionEnd message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. - * @param message ConnectionEnd message or plain object to encode - * @param [writer] Writer to encode to + * @param m ConnectionEnd message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. - * @param message ConnectionEnd message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ConnectionEnd message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ConnectionEnd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; - - /** - * Decodes a ConnectionEnd message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectionEnd - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; - - /** - * Verifies a ConnectionEnd message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConnectionEnd message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectionEnd - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; - - /** - * Creates a plain object from a ConnectionEnd message. Also converts values to other types if specified. - * @param message ConnectionEnd - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.connection.v1.ConnectionEnd, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConnectionEnd to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; } /** State enum. */ @@ -9140,9 +5143,9 @@ export namespace cosmos_sdk { /** * Constructs a new Counterparty. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.ICounterparty); + constructor(p?: cosmos_sdk.x.ibc.connection.v1.ICounterparty); /** Counterparty clientId. */ public clientId: string; @@ -9162,66 +5165,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. - * @param message Counterparty message or plain object to encode - * @param [writer] Writer to encode to + * @param m Counterparty message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.connection.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. - * @param message Counterparty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.connection.v1.ICounterparty, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Counterparty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Counterparty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.Counterparty; - - /** - * Decodes a Counterparty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.Counterparty; - - /** - * Verifies a Counterparty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Counterparty - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.Counterparty; - - /** - * Creates a plain object from a Counterparty message. Also converts values to other types if specified. - * @param message Counterparty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.connection.v1.Counterparty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Counterparty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.connection.v1.Counterparty; } /** Properties of a ClientPaths. */ @@ -9236,9 +5194,9 @@ export namespace cosmos_sdk { /** * Constructs a new ClientPaths. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IClientPaths); + constructor(p?: cosmos_sdk.x.ibc.connection.v1.IClientPaths); /** ClientPaths paths. */ public paths: string[]; @@ -9252,66 +5210,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ClientPaths message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. - * @param message ClientPaths message or plain object to encode - * @param [writer] Writer to encode to + * @param m ClientPaths message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.connection.v1.IClientPaths, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientPaths message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. - * @param message ClientPaths message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.connection.v1.IClientPaths, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.connection.v1.IClientPaths, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ClientPaths message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ClientPaths * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.connection.v1.ClientPaths; - - /** - * Decodes a ClientPaths message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.connection.v1.ClientPaths; - - /** - * Verifies a ClientPaths message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientPaths message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientPaths - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.connection.v1.ClientPaths; - - /** - * Creates a plain object from a ClientPaths message. Also converts values to other types if specified. - * @param message ClientPaths - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.connection.v1.ClientPaths, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientPaths to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.connection.v1.ClientPaths; } } } @@ -9343,9 +5256,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgChannelOpenInit. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit); /** MsgChannelOpenInit portId. */ public portId: string; @@ -9368,66 +5281,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @param message MsgChannelOpenInit message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgChannelOpenInit message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @param message MsgChannelOpenInit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgChannelOpenInit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgChannelOpenInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; - - /** - * Decodes a MsgChannelOpenInit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; - - /** - * Verifies a MsgChannelOpenInit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelOpenInit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenInit - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; - - /** - * Creates a plain object from a MsgChannelOpenInit message. Also converts values to other types if specified. - * @param message MsgChannelOpenInit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenInit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; } /** Properties of a MsgChannelOpenTry. */ @@ -9446,7 +5314,7 @@ export namespace cosmos_sdk { counterpartyVersion?: (string|null); /** MsgChannelOpenTry proofInit */ - proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proofInit?: (Uint8Array|null); /** MsgChannelOpenTry proofHeight */ proofHeight?: (number|Long|null); @@ -9460,9 +5328,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgChannelOpenTry. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry); /** MsgChannelOpenTry portId. */ public portId: string; @@ -9477,7 +5345,7 @@ export namespace cosmos_sdk { public counterpartyVersion: string; /** MsgChannelOpenTry proofInit. */ - public proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proofInit: Uint8Array; /** MsgChannelOpenTry proofHeight. */ public proofHeight: (number|Long); @@ -9494,66 +5362,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @param message MsgChannelOpenTry message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgChannelOpenTry message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @param message MsgChannelOpenTry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgChannelOpenTry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgChannelOpenTry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; - - /** - * Decodes a MsgChannelOpenTry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; - - /** - * Verifies a MsgChannelOpenTry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelOpenTry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenTry - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; - - /** - * Creates a plain object from a MsgChannelOpenTry message. Also converts values to other types if specified. - * @param message MsgChannelOpenTry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenTry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; } /** Properties of a MsgChannelOpenAck. */ @@ -9569,7 +5392,7 @@ export namespace cosmos_sdk { counterpartyVersion?: (string|null); /** MsgChannelOpenAck proofTry */ - proofTry?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proofTry?: (Uint8Array|null); /** MsgChannelOpenAck proofHeight */ proofHeight?: (number|Long|null); @@ -9583,9 +5406,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgChannelOpenAck. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck); /** MsgChannelOpenAck portId. */ public portId: string; @@ -9597,7 +5420,7 @@ export namespace cosmos_sdk { public counterpartyVersion: string; /** MsgChannelOpenAck proofTry. */ - public proofTry?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proofTry: Uint8Array; /** MsgChannelOpenAck proofHeight. */ public proofHeight: (number|Long); @@ -9614,66 +5437,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @param message MsgChannelOpenAck message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgChannelOpenAck message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @param message MsgChannelOpenAck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgChannelOpenAck message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgChannelOpenAck * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; - - /** - * Decodes a MsgChannelOpenAck message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; - - /** - * Verifies a MsgChannelOpenAck message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelOpenAck message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenAck - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; - - /** - * Creates a plain object from a MsgChannelOpenAck message. Also converts values to other types if specified. - * @param message MsgChannelOpenAck - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenAck to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; } /** Properties of a MsgChannelOpenConfirm. */ @@ -9686,7 +5464,7 @@ export namespace cosmos_sdk { channelId?: (string|null); /** MsgChannelOpenConfirm proofAck */ - proofAck?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proofAck?: (Uint8Array|null); /** MsgChannelOpenConfirm proofHeight */ proofHeight?: (number|Long|null); @@ -9700,9 +5478,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgChannelOpenConfirm. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm); /** MsgChannelOpenConfirm portId. */ public portId: string; @@ -9711,7 +5489,7 @@ export namespace cosmos_sdk { public channelId: string; /** MsgChannelOpenConfirm proofAck. */ - public proofAck?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proofAck: Uint8Array; /** MsgChannelOpenConfirm proofHeight. */ public proofHeight: (number|Long); @@ -9728,66 +5506,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @param message MsgChannelOpenConfirm message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgChannelOpenConfirm message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @param message MsgChannelOpenConfirm message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgChannelOpenConfirm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; - - /** - * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; - - /** - * Verifies a MsgChannelOpenConfirm message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenConfirm - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; - - /** - * Creates a plain object from a MsgChannelOpenConfirm message. Also converts values to other types if specified. - * @param message MsgChannelOpenConfirm - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenConfirm to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; } /** Properties of a MsgChannelCloseInit. */ @@ -9808,9 +5541,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgChannelCloseInit. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit); /** MsgChannelCloseInit portId. */ public portId: string; @@ -9830,66 +5563,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @param message MsgChannelCloseInit message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgChannelCloseInit message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @param message MsgChannelCloseInit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgChannelCloseInit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgChannelCloseInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; - - /** - * Decodes a MsgChannelCloseInit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelCloseInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; - - /** - * Verifies a MsgChannelCloseInit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelCloseInit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelCloseInit - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; - - /** - * Creates a plain object from a MsgChannelCloseInit message. Also converts values to other types if specified. - * @param message MsgChannelCloseInit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelCloseInit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; } /** Properties of a MsgChannelCloseConfirm. */ @@ -9902,7 +5590,7 @@ export namespace cosmos_sdk { channelId?: (string|null); /** MsgChannelCloseConfirm proofInit */ - proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proofInit?: (Uint8Array|null); /** MsgChannelCloseConfirm proofHeight */ proofHeight?: (number|Long|null); @@ -9916,9 +5604,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgChannelCloseConfirm. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm); /** MsgChannelCloseConfirm portId. */ public portId: string; @@ -9927,7 +5615,7 @@ export namespace cosmos_sdk { public channelId: string; /** MsgChannelCloseConfirm proofInit. */ - public proofInit?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proofInit: Uint8Array; /** MsgChannelCloseConfirm proofHeight. */ public proofHeight: (number|Long); @@ -9944,66 +5632,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @param message MsgChannelCloseConfirm message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgChannelCloseConfirm message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @param message MsgChannelCloseConfirm message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgChannelCloseConfirm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; - - /** - * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelCloseConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; - - /** - * Verifies a MsgChannelCloseConfirm message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgChannelCloseConfirm message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelCloseConfirm - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; - - /** - * Creates a plain object from a MsgChannelCloseConfirm message. Also converts values to other types if specified. - * @param message MsgChannelCloseConfirm - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgChannelCloseConfirm to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; } /** Properties of a MsgPacket. */ @@ -10013,7 +5656,7 @@ export namespace cosmos_sdk { packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); /** MsgPacket proof */ - proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proof?: (Uint8Array|null); /** MsgPacket proofHeight */ proofHeight?: (number|Long|null); @@ -10027,15 +5670,15 @@ export namespace cosmos_sdk { /** * Constructs a new MsgPacket. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket); /** MsgPacket packet. */ public packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); /** MsgPacket proof. */ - public proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proof: Uint8Array; /** MsgPacket proofHeight. */ public proofHeight: (number|Long); @@ -10052,66 +5695,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgPacket message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. - * @param message MsgPacket message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgPacket message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgPacket message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. - * @param message MsgPacket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgPacket message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgPacket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgPacket; - - /** - * Decodes a MsgPacket message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgPacket; - - /** - * Verifies a MsgPacket message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgPacket message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgPacket - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgPacket; - - /** - * Creates a plain object from a MsgPacket message. Also converts values to other types if specified. - * @param message MsgPacket - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgPacket, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgPacket to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.MsgPacket; } /** Properties of a MsgTimeout. */ @@ -10121,7 +5719,7 @@ export namespace cosmos_sdk { packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); /** MsgTimeout proof */ - proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proof?: (Uint8Array|null); /** MsgTimeout proofHeight */ proofHeight?: (number|Long|null); @@ -10138,15 +5736,15 @@ export namespace cosmos_sdk { /** * Constructs a new MsgTimeout. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout); /** MsgTimeout packet. */ public packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); /** MsgTimeout proof. */ - public proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proof: Uint8Array; /** MsgTimeout proofHeight. */ public proofHeight: (number|Long); @@ -10166,66 +5764,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgTimeout message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. - * @param message MsgTimeout message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgTimeout message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. - * @param message MsgTimeout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgTimeout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgTimeout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; - - /** - * Decodes a MsgTimeout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgTimeout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; - - /** - * Verifies a MsgTimeout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgTimeout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgTimeout - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; - - /** - * Creates a plain object from a MsgTimeout message. Also converts values to other types if specified. - * @param message MsgTimeout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgTimeout, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgTimeout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; } /** Properties of a MsgAcknowledgement. */ @@ -10238,7 +5791,7 @@ export namespace cosmos_sdk { acknowledgement?: (Uint8Array|null); /** MsgAcknowledgement proof */ - proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + proof?: (Uint8Array|null); /** MsgAcknowledgement proofHeight */ proofHeight?: (number|Long|null); @@ -10252,9 +5805,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgAcknowledgement. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement); /** MsgAcknowledgement packet. */ public packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); @@ -10263,7 +5816,7 @@ export namespace cosmos_sdk { public acknowledgement: Uint8Array; /** MsgAcknowledgement proof. */ - public proof?: (cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null); + public proof: Uint8Array; /** MsgAcknowledgement proofHeight. */ public proofHeight: (number|Long); @@ -10280,66 +5833,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @param message MsgAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgAcknowledgement message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @param message MsgAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgAcknowledgement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgAcknowledgement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; - - /** - * Decodes a MsgAcknowledgement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; - - /** - * Verifies a MsgAcknowledgement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgAcknowledgement - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; - - /** - * Creates a plain object from a MsgAcknowledgement message. Also converts values to other types if specified. - * @param message MsgAcknowledgement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgAcknowledgement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; } /** Properties of a Channel. */ @@ -10366,9 +5874,9 @@ export namespace cosmos_sdk { /** * Constructs a new Channel. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IChannel); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IChannel); /** Channel state. */ public state: cosmos_sdk.x.ibc.channel.v1.State; @@ -10394,66 +5902,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Channel message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. - * @param message Channel message or plain object to encode - * @param [writer] Writer to encode to + * @param m Channel message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IChannel, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Channel message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. - * @param message Channel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IChannel, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IChannel, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Channel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Channel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.Channel; - - /** - * Decodes a Channel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Channel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.Channel; - - /** - * Verifies a Channel message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Channel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Channel - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Channel; - - /** - * Creates a plain object from a Channel message. Also converts values to other types if specified. - * @param message Channel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.Channel, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Channel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.Channel; } /** State enum. */ @@ -10487,9 +5950,9 @@ export namespace cosmos_sdk { /** * Constructs a new Counterparty. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.ICounterparty); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.ICounterparty); /** Counterparty portId. */ public portId: string; @@ -10506,66 +5969,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. - * @param message Counterparty message or plain object to encode - * @param [writer] Writer to encode to + * @param m Counterparty message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. - * @param message Counterparty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.ICounterparty, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.ICounterparty, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Counterparty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Counterparty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.Counterparty; - - /** - * Decodes a Counterparty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.Counterparty; - - /** - * Verifies a Counterparty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Counterparty - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Counterparty; - - /** - * Creates a plain object from a Counterparty message. Also converts values to other types if specified. - * @param message Counterparty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.Counterparty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Counterparty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.Counterparty; } /** Properties of a Packet. */ @@ -10601,9 +6019,9 @@ export namespace cosmos_sdk { /** * Constructs a new Packet. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IPacket); + constructor(p?: cosmos_sdk.x.ibc.channel.v1.IPacket); /** Packet sequence. */ public sequence: (number|Long); @@ -10638,66 +6056,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Packet message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. - * @param message Packet message or plain object to encode - * @param [writer] Writer to encode to + * @param m Packet message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.channel.v1.IPacket, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Packet message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. - * @param message Packet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.channel.v1.IPacket, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.channel.v1.IPacket, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Packet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Packet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.channel.v1.Packet; - - /** - * Decodes a Packet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Packet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.channel.v1.Packet; - - /** - * Verifies a Packet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Packet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Packet - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Packet; - - /** - * Creates a plain object from a Packet message. Also converts values to other types if specified. - * @param message Packet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.channel.v1.Packet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Packet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.channel.v1.Packet; } } } @@ -10720,9 +6093,9 @@ export namespace cosmos_sdk { /** * Constructs a new MerkleRoot. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot); + constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot); /** MerkleRoot hash. */ public hash: Uint8Array; @@ -10736,66 +6109,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MerkleRoot message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. - * @param message MerkleRoot message or plain object to encode - * @param [writer] Writer to encode to + * @param m MerkleRoot message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MerkleRoot message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. - * @param message MerkleRoot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MerkleRoot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MerkleRoot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; - - /** - * Decodes a MerkleRoot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MerkleRoot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; - - /** - * Verifies a MerkleRoot message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MerkleRoot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MerkleRoot - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; - - /** - * Creates a plain object from a MerkleRoot message. Also converts values to other types if specified. - * @param message MerkleRoot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.MerkleRoot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MerkleRoot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; } /** Properties of a MerklePrefix. */ @@ -10810,9 +6138,9 @@ export namespace cosmos_sdk { /** * Constructs a new MerklePrefix. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix); + constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix); /** MerklePrefix keyPrefix. */ public keyPrefix: Uint8Array; @@ -10826,66 +6154,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MerklePrefix message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. - * @param message MerklePrefix message or plain object to encode - * @param [writer] Writer to encode to + * @param m MerklePrefix message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. - * @param message MerklePrefix message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MerklePrefix message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MerklePrefix * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; - - /** - * Decodes a MerklePrefix message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MerklePrefix - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; - - /** - * Verifies a MerklePrefix message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MerklePrefix message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MerklePrefix - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; - - /** - * Creates a plain object from a MerklePrefix message. Also converts values to other types if specified. - * @param message MerklePrefix - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.MerklePrefix, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MerklePrefix to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; } /** Properties of a MerklePath. */ @@ -10900,9 +6183,9 @@ export namespace cosmos_sdk { /** * Constructs a new MerklePath. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath); + constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath); /** MerklePath keyPath. */ public keyPath?: (cosmos_sdk.x.ibc.commitment.v1.IKeyPath|null); @@ -10916,66 +6199,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MerklePath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. - * @param message MerklePath message or plain object to encode - * @param [writer] Writer to encode to + * @param m MerklePath message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. - * @param message MerklePath message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MerklePath message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MerklePath * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.MerklePath; - - /** - * Decodes a MerklePath message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MerklePath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.MerklePath; - - /** - * Verifies a MerklePath message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MerklePath message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MerklePath - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerklePath; - - /** - * Creates a plain object from a MerklePath message. Also converts values to other types if specified. - * @param message MerklePath - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.MerklePath, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MerklePath to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.commitment.v1.MerklePath; } /** Properties of a MerkleProof. */ @@ -10990,9 +6228,9 @@ export namespace cosmos_sdk { /** * Constructs a new MerkleProof. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof); + constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof); /** MerkleProof proof. */ public proof?: (tendermint.crypto.merkle.IProof|null); @@ -11006,66 +6244,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MerkleProof message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. - * @param message MerkleProof message or plain object to encode - * @param [writer] Writer to encode to + * @param m MerkleProof message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. - * @param message MerkleProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MerkleProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MerkleProof * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; - - /** - * Decodes a MerkleProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MerkleProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; - - /** - * Verifies a MerkleProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MerkleProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MerkleProof - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; - - /** - * Creates a plain object from a MerkleProof message. Also converts values to other types if specified. - * @param message MerkleProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.MerkleProof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MerkleProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; } /** Properties of a KeyPath. */ @@ -11080,9 +6273,9 @@ export namespace cosmos_sdk { /** * Constructs a new KeyPath. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath); + constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath); /** KeyPath keys. */ public keys: cosmos_sdk.x.ibc.commitment.v1.IKey[]; @@ -11096,66 +6289,21 @@ export namespace cosmos_sdk { /** * Encodes the specified KeyPath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. - * @param message KeyPath message or plain object to encode - * @param [writer] Writer to encode to + * @param m KeyPath message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KeyPath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. - * @param message KeyPath message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a KeyPath message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns KeyPath * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.KeyPath; - - /** - * Decodes a KeyPath message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KeyPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.KeyPath; - - /** - * Verifies a KeyPath message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KeyPath message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KeyPath - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.KeyPath; - - /** - * Creates a plain object from a KeyPath message. Also converts values to other types if specified. - * @param message KeyPath - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.KeyPath, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KeyPath to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.commitment.v1.KeyPath; } /** Properties of a Key. */ @@ -11173,9 +6321,9 @@ export namespace cosmos_sdk { /** * Constructs a new Key. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IKey); + constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IKey); /** Key name. */ public name: Uint8Array; @@ -11192,66 +6340,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Key message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. - * @param message Key message or plain object to encode - * @param [writer] Writer to encode to + * @param m Key message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.ibc.commitment.v1.IKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Key message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. - * @param message Key message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.ibc.commitment.v1.IKey, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IKey, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Key message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Key * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.ibc.commitment.v1.Key; - - /** - * Decodes a Key message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Key - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.ibc.commitment.v1.Key; - - /** - * Verifies a Key message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Key message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Key - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.Key; - - /** - * Creates a plain object from a Key message. Also converts values to other types if specified. - * @param message Key - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.ibc.commitment.v1.Key, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Key to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.ibc.commitment.v1.Key; } /** KeyEncoding enum. */ @@ -11284,9 +6387,9 @@ export namespace cosmos_sdk { /** * Constructs a new Minter. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.mint.v1.IMinter); + constructor(p?: cosmos_sdk.x.mint.v1.IMinter); /** Minter inflation. */ public inflation: string; @@ -11303,66 +6406,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Minter message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. - * @param message Minter message or plain object to encode - * @param [writer] Writer to encode to + * @param m Minter message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.mint.v1.IMinter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Minter message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. - * @param message Minter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.mint.v1.IMinter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.mint.v1.IMinter, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Minter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Minter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.mint.v1.Minter; - - /** - * Decodes a Minter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Minter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.mint.v1.Minter; - - /** - * Verifies a Minter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Minter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Minter - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.mint.v1.Minter; - - /** - * Creates a plain object from a Minter message. Also converts values to other types if specified. - * @param message Minter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.mint.v1.Minter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Minter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.mint.v1.Minter; } /** Properties of a Params. */ @@ -11392,9 +6450,9 @@ export namespace cosmos_sdk { /** * Constructs a new Params. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.mint.v1.IParams); + constructor(p?: cosmos_sdk.x.mint.v1.IParams); /** Params mintDenom. */ public mintDenom: string; @@ -11423,66 +6481,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to + * @param m Params message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.mint.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.mint.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.mint.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Params message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Params * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.mint.v1.Params; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.mint.v1.Params; - - /** - * Verifies a Params message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Params - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.mint.v1.Params; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @param message Params - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.mint.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.mint.v1.Params; } } } @@ -11511,9 +6524,9 @@ export namespace cosmos_sdk { /** * Constructs a new ParameterChangeProposal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.params.v1.IParameterChangeProposal); + constructor(p?: cosmos_sdk.x.params.v1.IParameterChangeProposal); /** ParameterChangeProposal title. */ public title: string; @@ -11533,66 +6546,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ParameterChangeProposal message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. - * @param message ParameterChangeProposal message or plain object to encode - * @param [writer] Writer to encode to + * @param m ParameterChangeProposal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.params.v1.IParameterChangeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ParameterChangeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. - * @param message ParameterChangeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.params.v1.IParameterChangeProposal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.params.v1.IParameterChangeProposal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ParameterChangeProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ParameterChangeProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.params.v1.ParameterChangeProposal; - - /** - * Decodes a ParameterChangeProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParameterChangeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.params.v1.ParameterChangeProposal; - - /** - * Verifies a ParameterChangeProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ParameterChangeProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParameterChangeProposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.params.v1.ParameterChangeProposal; - - /** - * Creates a plain object from a ParameterChangeProposal message. Also converts values to other types if specified. - * @param message ParameterChangeProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.params.v1.ParameterChangeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ParameterChangeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.params.v1.ParameterChangeProposal; } /** Properties of a ParamChange. */ @@ -11613,9 +6581,9 @@ export namespace cosmos_sdk { /** * Constructs a new ParamChange. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.params.v1.IParamChange); + constructor(p?: cosmos_sdk.x.params.v1.IParamChange); /** ParamChange subspace. */ public subspace: string; @@ -11635,66 +6603,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ParamChange message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. - * @param message ParamChange message or plain object to encode - * @param [writer] Writer to encode to + * @param m ParamChange message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.params.v1.IParamChange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ParamChange message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. - * @param message ParamChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.params.v1.IParamChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.params.v1.IParamChange, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ParamChange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ParamChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.params.v1.ParamChange; - - /** - * Decodes a ParamChange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParamChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.params.v1.ParamChange; - - /** - * Verifies a ParamChange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ParamChange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParamChange - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.params.v1.ParamChange; - - /** - * Creates a plain object from a ParamChange message. Also converts values to other types if specified. - * @param message ParamChange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.params.v1.ParamChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ParamChange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.params.v1.ParamChange; } } } @@ -11717,9 +6640,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgUnjail. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.slashing.v1.IMsgUnjail); + constructor(p?: cosmos_sdk.x.slashing.v1.IMsgUnjail); /** MsgUnjail validatorAddr. */ public validatorAddr: Uint8Array; @@ -11733,66 +6656,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. - * @param message MsgUnjail message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgUnjail message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.slashing.v1.IMsgUnjail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUnjail message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. - * @param message MsgUnjail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.slashing.v1.IMsgUnjail, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.slashing.v1.IMsgUnjail, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgUnjail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgUnjail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.slashing.v1.MsgUnjail; - - /** - * Decodes a MsgUnjail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUnjail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.slashing.v1.MsgUnjail; - - /** - * Verifies a MsgUnjail message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUnjail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUnjail - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.slashing.v1.MsgUnjail; - - /** - * Creates a plain object from a MsgUnjail message. Also converts values to other types if specified. - * @param message MsgUnjail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.slashing.v1.MsgUnjail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUnjail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.slashing.v1.MsgUnjail; } /** Properties of a ValidatorSigningInfo. */ @@ -11822,9 +6700,9 @@ export namespace cosmos_sdk { /** * Constructs a new ValidatorSigningInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo); + constructor(p?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo); /** ValidatorSigningInfo address. */ public address: Uint8Array; @@ -11853,66 +6731,21 @@ export namespace cosmos_sdk { /** * Encodes the specified ValidatorSigningInfo message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. - * @param message ValidatorSigningInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorSigningInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorSigningInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. - * @param message ValidatorSigningInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ValidatorSigningInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns ValidatorSigningInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; - - /** - * Decodes a ValidatorSigningInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorSigningInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; - - /** - * Verifies a ValidatorSigningInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorSigningInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorSigningInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; - - /** - * Creates a plain object from a ValidatorSigningInfo message. Also converts values to other types if specified. - * @param message ValidatorSigningInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.slashing.v1.ValidatorSigningInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorSigningInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; } } } @@ -11953,9 +6786,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgCreateValidator. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgCreateValidator); + constructor(p?: cosmos_sdk.x.staking.v1.IMsgCreateValidator); /** MsgCreateValidator description. */ public description?: (cosmos_sdk.x.staking.v1.IDescription|null); @@ -11987,66 +6820,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. - * @param message MsgCreateValidator message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgCreateValidator message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IMsgCreateValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgCreateValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. - * @param message MsgCreateValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgCreateValidator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IMsgCreateValidator, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgCreateValidator message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgCreateValidator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgCreateValidator; - - /** - * Decodes a MsgCreateValidator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgCreateValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgCreateValidator; - - /** - * Verifies a MsgCreateValidator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgCreateValidator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgCreateValidator - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgCreateValidator; - - /** - * Creates a plain object from a MsgCreateValidator message. Also converts values to other types if specified. - * @param message MsgCreateValidator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.MsgCreateValidator, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgCreateValidator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.MsgCreateValidator; } /** Properties of a MsgEditValidator. */ @@ -12070,9 +6858,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgEditValidator. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgEditValidator); + constructor(p?: cosmos_sdk.x.staking.v1.IMsgEditValidator); /** MsgEditValidator description. */ public description?: (cosmos_sdk.x.staking.v1.IDescription|null); @@ -12095,66 +6883,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. - * @param message MsgEditValidator message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgEditValidator message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IMsgEditValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgEditValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. - * @param message MsgEditValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgEditValidator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IMsgEditValidator, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgEditValidator message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgEditValidator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgEditValidator; - - /** - * Decodes a MsgEditValidator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgEditValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgEditValidator; - - /** - * Verifies a MsgEditValidator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgEditValidator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgEditValidator - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgEditValidator; - - /** - * Creates a plain object from a MsgEditValidator message. Also converts values to other types if specified. - * @param message MsgEditValidator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.MsgEditValidator, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgEditValidator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.MsgEditValidator; } /** Properties of a MsgDelegate. */ @@ -12175,9 +6918,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgDelegate. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgDelegate); + constructor(p?: cosmos_sdk.x.staking.v1.IMsgDelegate); /** MsgDelegate delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -12197,66 +6940,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. - * @param message MsgDelegate message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgDelegate message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IMsgDelegate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgDelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. - * @param message MsgDelegate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgDelegate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IMsgDelegate, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgDelegate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgDelegate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgDelegate; - - /** - * Decodes a MsgDelegate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgDelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgDelegate; - - /** - * Verifies a MsgDelegate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgDelegate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgDelegate - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgDelegate; - - /** - * Creates a plain object from a MsgDelegate message. Also converts values to other types if specified. - * @param message MsgDelegate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.MsgDelegate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgDelegate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.MsgDelegate; } /** Properties of a MsgBeginRedelegate. */ @@ -12280,9 +6978,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgBeginRedelegate. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate); + constructor(p?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate); /** MsgBeginRedelegate delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -12305,66 +7003,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. - * @param message MsgBeginRedelegate message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgBeginRedelegate message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgBeginRedelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. - * @param message MsgBeginRedelegate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgBeginRedelegate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgBeginRedelegate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; - - /** - * Decodes a MsgBeginRedelegate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgBeginRedelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; - - /** - * Verifies a MsgBeginRedelegate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgBeginRedelegate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgBeginRedelegate - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; - - /** - * Creates a plain object from a MsgBeginRedelegate message. Also converts values to other types if specified. - * @param message MsgBeginRedelegate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.MsgBeginRedelegate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgBeginRedelegate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; } /** Properties of a MsgUndelegate. */ @@ -12385,9 +7038,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgUndelegate. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgUndelegate); + constructor(p?: cosmos_sdk.x.staking.v1.IMsgUndelegate); /** MsgUndelegate delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -12407,66 +7060,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. - * @param message MsgUndelegate message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgUndelegate message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IMsgUndelegate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgUndelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. - * @param message MsgUndelegate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IMsgUndelegate, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IMsgUndelegate, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgUndelegate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgUndelegate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.MsgUndelegate; - - /** - * Decodes a MsgUndelegate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUndelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.MsgUndelegate; - - /** - * Verifies a MsgUndelegate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgUndelegate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUndelegate - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgUndelegate; - - /** - * Creates a plain object from a MsgUndelegate message. Also converts values to other types if specified. - * @param message MsgUndelegate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.MsgUndelegate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgUndelegate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.MsgUndelegate; } /** Properties of a HistoricalInfo. */ @@ -12484,9 +7092,9 @@ export namespace cosmos_sdk { /** * Constructs a new HistoricalInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IHistoricalInfo); + constructor(p?: cosmos_sdk.x.staking.v1.IHistoricalInfo); /** HistoricalInfo header. */ public header?: (tendermint.abci.types.IHeader|null); @@ -12503,66 +7111,21 @@ export namespace cosmos_sdk { /** * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. - * @param message HistoricalInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m HistoricalInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IHistoricalInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HistoricalInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. - * @param message HistoricalInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IHistoricalInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IHistoricalInfo, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a HistoricalInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns HistoricalInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.HistoricalInfo; - - /** - * Decodes a HistoricalInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HistoricalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.HistoricalInfo; - - /** - * Verifies a HistoricalInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a HistoricalInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HistoricalInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.HistoricalInfo; - - /** - * Creates a plain object from a HistoricalInfo message. Also converts values to other types if specified. - * @param message HistoricalInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.HistoricalInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HistoricalInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.HistoricalInfo; } /** Properties of a CommissionRates. */ @@ -12583,9 +7146,9 @@ export namespace cosmos_sdk { /** * Constructs a new CommissionRates. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.ICommissionRates); + constructor(p?: cosmos_sdk.x.staking.v1.ICommissionRates); /** CommissionRates rate. */ public rate: string; @@ -12605,66 +7168,21 @@ export namespace cosmos_sdk { /** * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. - * @param message CommissionRates message or plain object to encode - * @param [writer] Writer to encode to + * @param m CommissionRates message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.ICommissionRates, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommissionRates message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. - * @param message CommissionRates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.ICommissionRates, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.ICommissionRates, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a CommissionRates message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns CommissionRates * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.CommissionRates; - - /** - * Decodes a CommissionRates message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommissionRates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.CommissionRates; - - /** - * Verifies a CommissionRates message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommissionRates message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommissionRates - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.CommissionRates; - - /** - * Creates a plain object from a CommissionRates message. Also converts values to other types if specified. - * @param message CommissionRates - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.CommissionRates, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommissionRates to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.CommissionRates; } /** Properties of a Commission. */ @@ -12682,9 +7200,9 @@ export namespace cosmos_sdk { /** * Constructs a new Commission. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.ICommission); + constructor(p?: cosmos_sdk.x.staking.v1.ICommission); /** Commission commissionRates. */ public commissionRates?: (cosmos_sdk.x.staking.v1.ICommissionRates|null); @@ -12701,66 +7219,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Commission message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. - * @param message Commission message or plain object to encode - * @param [writer] Writer to encode to + * @param m Commission message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.ICommission, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Commission message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. - * @param message Commission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.ICommission, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.ICommission, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Commission message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Commission * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Commission; - - /** - * Decodes a Commission message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Commission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Commission; - - /** - * Verifies a Commission message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Commission message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Commission - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Commission; - - /** - * Creates a plain object from a Commission message. Also converts values to other types if specified. - * @param message Commission - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.Commission, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Commission to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.Commission; } /** Properties of a Description. */ @@ -12787,9 +7260,9 @@ export namespace cosmos_sdk { /** * Constructs a new Description. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDescription); + constructor(p?: cosmos_sdk.x.staking.v1.IDescription); /** Description moniker. */ public moniker: string; @@ -12815,66 +7288,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Description message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. - * @param message Description message or plain object to encode - * @param [writer] Writer to encode to + * @param m Description message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IDescription, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Description message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. - * @param message Description message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDescription, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IDescription, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Description message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Description * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Description; - - /** - * Decodes a Description message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Description - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Description; - - /** - * Verifies a Description message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Description message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Description - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Description; - - /** - * Creates a plain object from a Description message. Also converts values to other types if specified. - * @param message Description - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.Description, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Description to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.Description; } /** Properties of a Validator. */ @@ -12919,9 +7347,9 @@ export namespace cosmos_sdk { /** * Constructs a new Validator. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IValidator); + constructor(p?: cosmos_sdk.x.staking.v1.IValidator); /** Validator operatorAddress. */ public operatorAddress: Uint8Array; @@ -12965,66 +7393,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Validator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. - * @param message Validator message or plain object to encode - * @param [writer] Writer to encode to + * @param m Validator message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. - * @param message Validator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IValidator, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Validator message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Validator; - - /** - * Decodes a Validator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Validator; - - /** - * Verifies a Validator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Validator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Validator - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Validator; - - /** - * Creates a plain object from a Validator message. Also converts values to other types if specified. - * @param message Validator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.Validator, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Validator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.Validator; } /** Properties of a DVPair. */ @@ -13042,9 +7425,9 @@ export namespace cosmos_sdk { /** * Constructs a new DVPair. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDVPair); + constructor(p?: cosmos_sdk.x.staking.v1.IDVPair); /** DVPair delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -13061,66 +7444,21 @@ export namespace cosmos_sdk { /** * Encodes the specified DVPair message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. - * @param message DVPair message or plain object to encode - * @param [writer] Writer to encode to + * @param m DVPair message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IDVPair, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DVPair message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. - * @param message DVPair message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDVPair, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IDVPair, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a DVPair message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns DVPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.DVPair; - - /** - * Decodes a DVPair message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DVPair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.DVPair; - - /** - * Verifies a DVPair message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DVPair message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DVPair - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVPair; - - /** - * Creates a plain object from a DVPair message. Also converts values to other types if specified. - * @param message DVPair - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.DVPair, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DVPair to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.DVPair; } /** Properties of a DVPairs. */ @@ -13135,9 +7473,9 @@ export namespace cosmos_sdk { /** * Constructs a new DVPairs. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDVPairs); + constructor(p?: cosmos_sdk.x.staking.v1.IDVPairs); /** DVPairs pairs. */ public pairs: cosmos_sdk.x.staking.v1.IDVPair[]; @@ -13151,66 +7489,21 @@ export namespace cosmos_sdk { /** * Encodes the specified DVPairs message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. - * @param message DVPairs message or plain object to encode - * @param [writer] Writer to encode to + * @param m DVPairs message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IDVPairs, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DVPairs message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. - * @param message DVPairs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDVPairs, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IDVPairs, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a DVPairs message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns DVPairs * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.DVPairs; - - /** - * Decodes a DVPairs message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DVPairs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.DVPairs; - - /** - * Verifies a DVPairs message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DVPairs message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DVPairs - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVPairs; - - /** - * Creates a plain object from a DVPairs message. Also converts values to other types if specified. - * @param message DVPairs - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.DVPairs, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DVPairs to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.DVPairs; } /** Properties of a DVVTriplet. */ @@ -13231,9 +7524,9 @@ export namespace cosmos_sdk { /** * Constructs a new DVVTriplet. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDVVTriplet); + constructor(p?: cosmos_sdk.x.staking.v1.IDVVTriplet); /** DVVTriplet delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -13253,66 +7546,21 @@ export namespace cosmos_sdk { /** * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. - * @param message DVVTriplet message or plain object to encode - * @param [writer] Writer to encode to + * @param m DVVTriplet message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IDVVTriplet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DVVTriplet message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. - * @param message DVVTriplet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDVVTriplet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IDVVTriplet, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a DVVTriplet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns DVVTriplet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.DVVTriplet; - - /** - * Decodes a DVVTriplet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DVVTriplet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.DVVTriplet; - - /** - * Verifies a DVVTriplet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DVVTriplet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DVVTriplet - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVVTriplet; - - /** - * Creates a plain object from a DVVTriplet message. Also converts values to other types if specified. - * @param message DVVTriplet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.DVVTriplet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DVVTriplet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.DVVTriplet; } /** Properties of a DVVTriplets. */ @@ -13327,9 +7575,9 @@ export namespace cosmos_sdk { /** * Constructs a new DVVTriplets. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDVVTriplets); + constructor(p?: cosmos_sdk.x.staking.v1.IDVVTriplets); /** DVVTriplets triplets. */ public triplets: cosmos_sdk.x.staking.v1.IDVVTriplet[]; @@ -13343,66 +7591,21 @@ export namespace cosmos_sdk { /** * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. - * @param message DVVTriplets message or plain object to encode - * @param [writer] Writer to encode to + * @param m DVVTriplets message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IDVVTriplets, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DVVTriplets message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. - * @param message DVVTriplets message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDVVTriplets, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IDVVTriplets, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a DVVTriplets message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns DVVTriplets * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.DVVTriplets; - - /** - * Decodes a DVVTriplets message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DVVTriplets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.DVVTriplets; - - /** - * Verifies a DVVTriplets message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DVVTriplets message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DVVTriplets - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVVTriplets; - - /** - * Creates a plain object from a DVVTriplets message. Also converts values to other types if specified. - * @param message DVVTriplets - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.DVVTriplets, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DVVTriplets to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.DVVTriplets; } /** Properties of a Delegation. */ @@ -13423,9 +7626,9 @@ export namespace cosmos_sdk { /** * Constructs a new Delegation. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDelegation); + constructor(p?: cosmos_sdk.x.staking.v1.IDelegation); /** Delegation delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -13445,66 +7648,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Delegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. - * @param message Delegation message or plain object to encode - * @param [writer] Writer to encode to + * @param m Delegation message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IDelegation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Delegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. - * @param message Delegation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IDelegation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IDelegation, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Delegation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Delegation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Delegation; - - /** - * Decodes a Delegation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Delegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Delegation; - - /** - * Verifies a Delegation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Delegation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Delegation - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Delegation; - - /** - * Creates a plain object from a Delegation message. Also converts values to other types if specified. - * @param message Delegation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.Delegation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Delegation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.Delegation; } /** Properties of an UnbondingDelegation. */ @@ -13525,9 +7683,9 @@ export namespace cosmos_sdk { /** * Constructs a new UnbondingDelegation. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegation); + constructor(p?: cosmos_sdk.x.staking.v1.IUnbondingDelegation); /** UnbondingDelegation delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -13547,66 +7705,21 @@ export namespace cosmos_sdk { /** * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. - * @param message UnbondingDelegation message or plain object to encode - * @param [writer] Writer to encode to + * @param m UnbondingDelegation message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IUnbondingDelegation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnbondingDelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. - * @param message UnbondingDelegation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IUnbondingDelegation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IUnbondingDelegation, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an UnbondingDelegation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns UnbondingDelegation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.UnbondingDelegation; - - /** - * Decodes an UnbondingDelegation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnbondingDelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.UnbondingDelegation; - - /** - * Verifies an UnbondingDelegation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UnbondingDelegation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnbondingDelegation - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.UnbondingDelegation; - - /** - * Creates a plain object from an UnbondingDelegation message. Also converts values to other types if specified. - * @param message UnbondingDelegation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.UnbondingDelegation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnbondingDelegation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.UnbondingDelegation; } /** Properties of an UnbondingDelegationEntry. */ @@ -13630,9 +7743,9 @@ export namespace cosmos_sdk { /** * Constructs a new UnbondingDelegationEntry. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry); + constructor(p?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry); /** UnbondingDelegationEntry creationHeight. */ public creationHeight: (number|Long); @@ -13655,66 +7768,21 @@ export namespace cosmos_sdk { /** * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. - * @param message UnbondingDelegationEntry message or plain object to encode - * @param [writer] Writer to encode to + * @param m UnbondingDelegationEntry message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnbondingDelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. - * @param message UnbondingDelegationEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns UnbondingDelegationEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; - - /** - * Decodes an UnbondingDelegationEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnbondingDelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; - - /** - * Verifies an UnbondingDelegationEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UnbondingDelegationEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnbondingDelegationEntry - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; - - /** - * Creates a plain object from an UnbondingDelegationEntry message. Also converts values to other types if specified. - * @param message UnbondingDelegationEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.UnbondingDelegationEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnbondingDelegationEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; } /** Properties of a RedelegationEntry. */ @@ -13738,9 +7806,9 @@ export namespace cosmos_sdk { /** * Constructs a new RedelegationEntry. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IRedelegationEntry); + constructor(p?: cosmos_sdk.x.staking.v1.IRedelegationEntry); /** RedelegationEntry creationHeight. */ public creationHeight: (number|Long); @@ -13763,66 +7831,21 @@ export namespace cosmos_sdk { /** * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. - * @param message RedelegationEntry message or plain object to encode - * @param [writer] Writer to encode to + * @param m RedelegationEntry message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IRedelegationEntry, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. - * @param message RedelegationEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IRedelegationEntry, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IRedelegationEntry, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a RedelegationEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns RedelegationEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.RedelegationEntry; - - /** - * Decodes a RedelegationEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.RedelegationEntry; - - /** - * Verifies a RedelegationEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RedelegationEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedelegationEntry - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.RedelegationEntry; - - /** - * Creates a plain object from a RedelegationEntry message. Also converts values to other types if specified. - * @param message RedelegationEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.RedelegationEntry, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedelegationEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.RedelegationEntry; } /** Properties of a Redelegation. */ @@ -13846,9 +7869,9 @@ export namespace cosmos_sdk { /** * Constructs a new Redelegation. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IRedelegation); + constructor(p?: cosmos_sdk.x.staking.v1.IRedelegation); /** Redelegation delegatorAddress. */ public delegatorAddress: Uint8Array; @@ -13871,66 +7894,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Redelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. - * @param message Redelegation message or plain object to encode - * @param [writer] Writer to encode to + * @param m Redelegation message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IRedelegation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Redelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. - * @param message Redelegation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IRedelegation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IRedelegation, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Redelegation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Redelegation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Redelegation; - - /** - * Decodes a Redelegation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Redelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Redelegation; - - /** - * Verifies a Redelegation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Redelegation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Redelegation - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Redelegation; - - /** - * Creates a plain object from a Redelegation message. Also converts values to other types if specified. - * @param message Redelegation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.Redelegation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Redelegation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.Redelegation; } /** Properties of a Params. */ @@ -13957,9 +7935,9 @@ export namespace cosmos_sdk { /** * Constructs a new Params. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.staking.v1.IParams); + constructor(p?: cosmos_sdk.x.staking.v1.IParams); /** Params unbondingTime. */ public unbondingTime?: (google.protobuf.IDuration|null); @@ -13985,66 +7963,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to + * @param m Params message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.staking.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.staking.v1.IParams, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.staking.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Params message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Params * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.staking.v1.Params; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.staking.v1.Params; - - /** - * Verifies a Params message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Params - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Params; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @param message Params - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.staking.v1.Params, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.Params; } } } @@ -14076,9 +8009,9 @@ export namespace cosmos_sdk { /** * Constructs a new Plan. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.upgrade.v1.IPlan); + constructor(p?: cosmos_sdk.x.upgrade.v1.IPlan); /** Plan name. */ public name: string; @@ -14101,66 +8034,21 @@ export namespace cosmos_sdk { /** * Encodes the specified Plan message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. - * @param message Plan message or plain object to encode - * @param [writer] Writer to encode to + * @param m Plan message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.upgrade.v1.IPlan, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. - * @param message Plan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.upgrade.v1.IPlan, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.upgrade.v1.IPlan, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Plan message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns Plan * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.upgrade.v1.Plan; - - /** - * Decodes a Plan message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Plan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.upgrade.v1.Plan; - - /** - * Verifies a Plan message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Plan message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Plan - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.upgrade.v1.Plan; - - /** - * Creates a plain object from a Plan message. Also converts values to other types if specified. - * @param message Plan - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.upgrade.v1.Plan, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Plan to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.upgrade.v1.Plan; } /** Properties of a SoftwareUpgradeProposal. */ @@ -14181,9 +8069,9 @@ export namespace cosmos_sdk { /** * Constructs a new SoftwareUpgradeProposal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal); + constructor(p?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal); /** SoftwareUpgradeProposal title. */ public title: string; @@ -14203,66 +8091,21 @@ export namespace cosmos_sdk { /** * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. - * @param message SoftwareUpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to + * @param m SoftwareUpgradeProposal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. - * @param message SoftwareUpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns SoftwareUpgradeProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; - - /** - * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; - - /** - * Verifies a SoftwareUpgradeProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SoftwareUpgradeProposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; - - /** - * Creates a plain object from a SoftwareUpgradeProposal message. Also converts values to other types if specified. - * @param message SoftwareUpgradeProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SoftwareUpgradeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; } /** Properties of a CancelSoftwareUpgradeProposal. */ @@ -14280,9 +8123,9 @@ export namespace cosmos_sdk { /** * Constructs a new CancelSoftwareUpgradeProposal. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal); + constructor(p?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal); /** CancelSoftwareUpgradeProposal title. */ public title: string; @@ -14299,66 +8142,21 @@ export namespace cosmos_sdk { /** * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @param message CancelSoftwareUpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to + * @param m CancelSoftwareUpgradeProposal message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @param message CancelSoftwareUpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns CancelSoftwareUpgradeProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; - - /** - * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelSoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; - - /** - * Verifies a CancelSoftwareUpgradeProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CancelSoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelSoftwareUpgradeProposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; - - /** - * Creates a plain object from a CancelSoftwareUpgradeProposal message. Also converts values to other types if specified. - * @param message CancelSoftwareUpgradeProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CancelSoftwareUpgradeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; } } } @@ -14385,9 +8183,9 @@ export namespace cosmos_sdk { /** * Constructs a new MsgCreateClient. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient); + constructor(p?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient); /** MsgCreateClient signer. */ public signer: Uint8Array; @@ -14401,66 +8199,21 @@ export namespace cosmos_sdk { /** * Encodes the specified MsgCreateClient message. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. - * @param message MsgCreateClient message or plain object to encode - * @param [writer] Writer to encode to + * @param m MsgCreateClient message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. - * @param message MsgCreateClient message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MsgCreateClient message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MsgCreateClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; - - /** - * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgCreateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; - - /** - * Verifies a MsgCreateClient message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgCreateClient - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; - - /** - * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. - * @param message MsgCreateClient - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: cosmos_sdk.ibc.localhost.v1.MsgCreateClient, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MsgCreateClient to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; } } } @@ -14518,9 +8271,9 @@ export namespace tendermint { /** * Constructs a new Request. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequest); + constructor(p?: tendermint.abci.types.IRequest); /** Request echo. */ public echo?: (tendermint.abci.types.IRequestEcho|null); @@ -14567,66 +8320,21 @@ export namespace tendermint { /** * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. - * @param message Request message or plain object to encode - * @param [writer] Writer to encode to + * @param m Request message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. - * @param message Request message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequest, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Request; - - /** - * Decodes a Request message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Request; - - /** - * Verifies a Request message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Request message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Request - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Request; - - /** - * Creates a plain object from a Request message. Also converts values to other types if specified. - * @param message Request - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.Request, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Request to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.Request; } /** Properties of a RequestEcho. */ @@ -14641,9 +8349,9 @@ export namespace tendermint { /** * Constructs a new RequestEcho. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestEcho); + constructor(p?: tendermint.abci.types.IRequestEcho); /** RequestEcho message. */ public message: string; @@ -14657,66 +8365,21 @@ export namespace tendermint { /** * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. - * @param message RequestEcho message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestEcho message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestEcho, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. - * @param message RequestEcho message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestEcho, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestEcho; - - /** - * Decodes a RequestEcho message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestEcho; - - /** - * Verifies a RequestEcho message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestEcho message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestEcho - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestEcho; - - /** - * Creates a plain object from a RequestEcho message. Also converts values to other types if specified. - * @param message RequestEcho - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestEcho, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestEcho to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestEcho; } /** Properties of a RequestFlush. */ @@ -14728,9 +8391,9 @@ export namespace tendermint { /** * Constructs a new RequestFlush. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestFlush); + constructor(p?: tendermint.abci.types.IRequestFlush); /** * Creates a new RequestFlush instance using the specified properties. @@ -14741,66 +8404,21 @@ export namespace tendermint { /** * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. - * @param message RequestFlush message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestFlush message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestFlush, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. - * @param message RequestFlush message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestFlush, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestFlush; - - /** - * Decodes a RequestFlush message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestFlush; - - /** - * Verifies a RequestFlush message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestFlush message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestFlush - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestFlush; - - /** - * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. - * @param message RequestFlush - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestFlush, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestFlush to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestFlush; } /** Properties of a RequestInfo. */ @@ -14821,9 +8439,9 @@ export namespace tendermint { /** * Constructs a new RequestInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestInfo); + constructor(p?: tendermint.abci.types.IRequestInfo); /** RequestInfo version. */ public version: string; @@ -14843,66 +8461,21 @@ export namespace tendermint { /** * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. - * @param message RequestInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. - * @param message RequestInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestInfo, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestInfo; - - /** - * Decodes a RequestInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestInfo; - - /** - * Verifies a RequestInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestInfo - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestInfo; - - /** - * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. - * @param message RequestInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestInfo; } /** Properties of a RequestSetOption. */ @@ -14920,9 +8493,9 @@ export namespace tendermint { /** * Constructs a new RequestSetOption. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestSetOption); + constructor(p?: tendermint.abci.types.IRequestSetOption); /** RequestSetOption key. */ public key: string; @@ -14939,66 +8512,21 @@ export namespace tendermint { /** * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. - * @param message RequestSetOption message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestSetOption message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestSetOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. - * @param message RequestSetOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestSetOption, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestSetOption; - - /** - * Decodes a RequestSetOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestSetOption; - - /** - * Verifies a RequestSetOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestSetOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestSetOption - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestSetOption; - - /** - * Creates a plain object from a RequestSetOption message. Also converts values to other types if specified. - * @param message RequestSetOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestSetOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestSetOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestSetOption; } /** Properties of a RequestInitChain. */ @@ -15025,9 +8553,9 @@ export namespace tendermint { /** * Constructs a new RequestInitChain. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestInitChain); + constructor(p?: tendermint.abci.types.IRequestInitChain); /** RequestInitChain time. */ public time?: (google.protobuf.ITimestamp|null); @@ -15053,66 +8581,21 @@ export namespace tendermint { /** * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. - * @param message RequestInitChain message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestInitChain message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestInitChain, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. - * @param message RequestInitChain message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestInitChain, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestInitChain; - - /** - * Decodes a RequestInitChain message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestInitChain; - - /** - * Verifies a RequestInitChain message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestInitChain - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestInitChain; - - /** - * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. - * @param message RequestInitChain - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestInitChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestInitChain to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestInitChain; } /** Properties of a RequestQuery. */ @@ -15136,9 +8619,9 @@ export namespace tendermint { /** * Constructs a new RequestQuery. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestQuery); + constructor(p?: tendermint.abci.types.IRequestQuery); /** RequestQuery data. */ public data: Uint8Array; @@ -15161,66 +8644,21 @@ export namespace tendermint { /** * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. - * @param message RequestQuery message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestQuery message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. - * @param message RequestQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestQuery, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestQuery; - - /** - * Decodes a RequestQuery message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestQuery; - - /** - * Verifies a RequestQuery message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestQuery message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestQuery - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestQuery; - - /** - * Creates a plain object from a RequestQuery message. Also converts values to other types if specified. - * @param message RequestQuery - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestQuery to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestQuery; } /** Properties of a RequestBeginBlock. */ @@ -15244,9 +8682,9 @@ export namespace tendermint { /** * Constructs a new RequestBeginBlock. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestBeginBlock); + constructor(p?: tendermint.abci.types.IRequestBeginBlock); /** RequestBeginBlock hash. */ public hash: Uint8Array; @@ -15269,66 +8707,21 @@ export namespace tendermint { /** * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. - * @param message RequestBeginBlock message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestBeginBlock message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestBeginBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. - * @param message RequestBeginBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestBeginBlock, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestBeginBlock; - - /** - * Decodes a RequestBeginBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestBeginBlock; - - /** - * Verifies a RequestBeginBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestBeginBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestBeginBlock; - - /** - * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. - * @param message RequestBeginBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestBeginBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestBeginBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestBeginBlock; } /** CheckTxType enum. */ @@ -15352,9 +8745,9 @@ export namespace tendermint { /** * Constructs a new RequestCheckTx. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestCheckTx); + constructor(p?: tendermint.abci.types.IRequestCheckTx); /** RequestCheckTx tx. */ public tx: Uint8Array; @@ -15371,66 +8764,21 @@ export namespace tendermint { /** * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. - * @param message RequestCheckTx message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestCheckTx message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestCheckTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. - * @param message RequestCheckTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestCheckTx, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestCheckTx; - - /** - * Decodes a RequestCheckTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestCheckTx; - - /** - * Verifies a RequestCheckTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestCheckTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCheckTx - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestCheckTx; - - /** - * Creates a plain object from a RequestCheckTx message. Also converts values to other types if specified. - * @param message RequestCheckTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestCheckTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCheckTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestCheckTx; } /** Properties of a RequestDeliverTx. */ @@ -15445,9 +8793,9 @@ export namespace tendermint { /** * Constructs a new RequestDeliverTx. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestDeliverTx); + constructor(p?: tendermint.abci.types.IRequestDeliverTx); /** RequestDeliverTx tx. */ public tx: Uint8Array; @@ -15461,66 +8809,21 @@ export namespace tendermint { /** * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. - * @param message RequestDeliverTx message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestDeliverTx message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestDeliverTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. - * @param message RequestDeliverTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestDeliverTx, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestDeliverTx; - - /** - * Decodes a RequestDeliverTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestDeliverTx; - - /** - * Verifies a RequestDeliverTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestDeliverTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestDeliverTx - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestDeliverTx; - - /** - * Creates a plain object from a RequestDeliverTx message. Also converts values to other types if specified. - * @param message RequestDeliverTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestDeliverTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestDeliverTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestDeliverTx; } /** Properties of a RequestEndBlock. */ @@ -15535,9 +8838,9 @@ export namespace tendermint { /** * Constructs a new RequestEndBlock. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestEndBlock); + constructor(p?: tendermint.abci.types.IRequestEndBlock); /** RequestEndBlock height. */ public height: (number|Long); @@ -15551,66 +8854,21 @@ export namespace tendermint { /** * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. - * @param message RequestEndBlock message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestEndBlock message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestEndBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. - * @param message RequestEndBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestEndBlock, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestEndBlock; - - /** - * Decodes a RequestEndBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestEndBlock; - - /** - * Verifies a RequestEndBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestEndBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestEndBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestEndBlock; - - /** - * Creates a plain object from a RequestEndBlock message. Also converts values to other types if specified. - * @param message RequestEndBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestEndBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestEndBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestEndBlock; } /** Properties of a RequestCommit. */ @@ -15622,9 +8880,9 @@ export namespace tendermint { /** * Constructs a new RequestCommit. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestCommit); + constructor(p?: tendermint.abci.types.IRequestCommit); /** * Creates a new RequestCommit instance using the specified properties. @@ -15635,66 +8893,21 @@ export namespace tendermint { /** * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. - * @param message RequestCommit message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestCommit message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IRequestCommit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. - * @param message RequestCommit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IRequestCommit, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.RequestCommit; - - /** - * Decodes a RequestCommit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.RequestCommit; - - /** - * Verifies a RequestCommit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RequestCommit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCommit - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestCommit; - - /** - * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. - * @param message RequestCommit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.RequestCommit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestCommit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.RequestCommit; } /** Properties of a Response. */ @@ -15742,9 +8955,9 @@ export namespace tendermint { /** * Constructs a new Response. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponse); + constructor(p?: tendermint.abci.types.IResponse); /** Response exception. */ public exception?: (tendermint.abci.types.IResponseException|null); @@ -15794,66 +9007,21 @@ export namespace tendermint { /** * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to + * @param m Response message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponse, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Response; - - /** - * Decodes a Response message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Response; - - /** - * Verifies a Response message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Response message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Response - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Response; - - /** - * Creates a plain object from a Response message. Also converts values to other types if specified. - * @param message Response - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.Response, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Response to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.Response; } /** Properties of a ResponseException. */ @@ -15868,9 +9036,9 @@ export namespace tendermint { /** * Constructs a new ResponseException. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseException); + constructor(p?: tendermint.abci.types.IResponseException); /** ResponseException error. */ public error: string; @@ -15884,66 +9052,21 @@ export namespace tendermint { /** * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. - * @param message ResponseException message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseException message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseException, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. - * @param message ResponseException message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseException, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseException; - - /** - * Decodes a ResponseException message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseException; - - /** - * Verifies a ResponseException message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseException message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseException - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseException; - - /** - * Creates a plain object from a ResponseException message. Also converts values to other types if specified. - * @param message ResponseException - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseException, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseException to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseException; } /** Properties of a ResponseEcho. */ @@ -15958,9 +9081,9 @@ export namespace tendermint { /** * Constructs a new ResponseEcho. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseEcho); + constructor(p?: tendermint.abci.types.IResponseEcho); /** ResponseEcho message. */ public message: string; @@ -15974,66 +9097,21 @@ export namespace tendermint { /** * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. - * @param message ResponseEcho message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseEcho message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseEcho, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. - * @param message ResponseEcho message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseEcho, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseEcho; - - /** - * Decodes a ResponseEcho message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseEcho; - - /** - * Verifies a ResponseEcho message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseEcho message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseEcho - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseEcho; - - /** - * Creates a plain object from a ResponseEcho message. Also converts values to other types if specified. - * @param message ResponseEcho - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseEcho, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseEcho to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseEcho; } /** Properties of a ResponseFlush. */ @@ -16045,9 +9123,9 @@ export namespace tendermint { /** * Constructs a new ResponseFlush. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseFlush); + constructor(p?: tendermint.abci.types.IResponseFlush); /** * Creates a new ResponseFlush instance using the specified properties. @@ -16058,66 +9136,21 @@ export namespace tendermint { /** * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. - * @param message ResponseFlush message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseFlush message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseFlush, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. - * @param message ResponseFlush message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseFlush, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseFlush; - - /** - * Decodes a ResponseFlush message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseFlush; - - /** - * Verifies a ResponseFlush message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseFlush message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseFlush - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseFlush; - - /** - * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. - * @param message ResponseFlush - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseFlush, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseFlush to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseFlush; } /** Properties of a ResponseInfo. */ @@ -16144,9 +9177,9 @@ export namespace tendermint { /** * Constructs a new ResponseInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseInfo); + constructor(p?: tendermint.abci.types.IResponseInfo); /** ResponseInfo data. */ public data: string; @@ -16172,66 +9205,21 @@ export namespace tendermint { /** * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. - * @param message ResponseInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. - * @param message ResponseInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseInfo, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseInfo; - - /** - * Decodes a ResponseInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseInfo; - - /** - * Verifies a ResponseInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseInfo - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseInfo; - - /** - * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. - * @param message ResponseInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseInfo; } /** Properties of a ResponseSetOption. */ @@ -16252,9 +9240,9 @@ export namespace tendermint { /** * Constructs a new ResponseSetOption. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseSetOption); + constructor(p?: tendermint.abci.types.IResponseSetOption); /** ResponseSetOption code. */ public code: number; @@ -16274,66 +9262,21 @@ export namespace tendermint { /** * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. - * @param message ResponseSetOption message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseSetOption message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseSetOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. - * @param message ResponseSetOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseSetOption, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseSetOption; - - /** - * Decodes a ResponseSetOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseSetOption; - - /** - * Verifies a ResponseSetOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseSetOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseSetOption - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseSetOption; - - /** - * Creates a plain object from a ResponseSetOption message. Also converts values to other types if specified. - * @param message ResponseSetOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseSetOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseSetOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseSetOption; } /** Properties of a ResponseInitChain. */ @@ -16351,9 +9294,9 @@ export namespace tendermint { /** * Constructs a new ResponseInitChain. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseInitChain); + constructor(p?: tendermint.abci.types.IResponseInitChain); /** ResponseInitChain consensusParams. */ public consensusParams?: (tendermint.abci.types.IConsensusParams|null); @@ -16370,66 +9313,21 @@ export namespace tendermint { /** * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. - * @param message ResponseInitChain message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseInitChain message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseInitChain, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. - * @param message ResponseInitChain message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseInitChain, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseInitChain; - - /** - * Decodes a ResponseInitChain message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseInitChain; - - /** - * Verifies a ResponseInitChain message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseInitChain - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseInitChain; - - /** - * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. - * @param message ResponseInitChain - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseInitChain, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseInitChain to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseInitChain; } /** Properties of a ResponseQuery. */ @@ -16468,9 +9366,9 @@ export namespace tendermint { /** * Constructs a new ResponseQuery. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseQuery); + constructor(p?: tendermint.abci.types.IResponseQuery); /** ResponseQuery code. */ public code: number; @@ -16508,66 +9406,21 @@ export namespace tendermint { /** * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. - * @param message ResponseQuery message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseQuery message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseQuery, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. - * @param message ResponseQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseQuery, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseQuery; - - /** - * Decodes a ResponseQuery message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseQuery; - - /** - * Verifies a ResponseQuery message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseQuery message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseQuery - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseQuery; - - /** - * Creates a plain object from a ResponseQuery message. Also converts values to other types if specified. - * @param message ResponseQuery - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseQuery to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseQuery; } /** Properties of a ResponseBeginBlock. */ @@ -16582,9 +9435,9 @@ export namespace tendermint { /** * Constructs a new ResponseBeginBlock. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseBeginBlock); + constructor(p?: tendermint.abci.types.IResponseBeginBlock); /** ResponseBeginBlock events. */ public events: tendermint.abci.types.IEvent[]; @@ -16598,66 +9451,21 @@ export namespace tendermint { /** * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. - * @param message ResponseBeginBlock message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseBeginBlock message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseBeginBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. - * @param message ResponseBeginBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseBeginBlock, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseBeginBlock; - - /** - * Decodes a ResponseBeginBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseBeginBlock; - - /** - * Verifies a ResponseBeginBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseBeginBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseBeginBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseBeginBlock; - - /** - * Creates a plain object from a ResponseBeginBlock message. Also converts values to other types if specified. - * @param message ResponseBeginBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseBeginBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseBeginBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseBeginBlock; } /** Properties of a ResponseCheckTx. */ @@ -16693,9 +9501,9 @@ export namespace tendermint { /** * Constructs a new ResponseCheckTx. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseCheckTx); + constructor(p?: tendermint.abci.types.IResponseCheckTx); /** ResponseCheckTx code. */ public code: number; @@ -16730,66 +9538,21 @@ export namespace tendermint { /** * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. - * @param message ResponseCheckTx message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseCheckTx message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseCheckTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. - * @param message ResponseCheckTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseCheckTx, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseCheckTx; - - /** - * Decodes a ResponseCheckTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseCheckTx; - - /** - * Verifies a ResponseCheckTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseCheckTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseCheckTx - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseCheckTx; - - /** - * Creates a plain object from a ResponseCheckTx message. Also converts values to other types if specified. - * @param message ResponseCheckTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseCheckTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseCheckTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseCheckTx; } /** Properties of a ResponseDeliverTx. */ @@ -16825,9 +9588,9 @@ export namespace tendermint { /** * Constructs a new ResponseDeliverTx. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseDeliverTx); + constructor(p?: tendermint.abci.types.IResponseDeliverTx); /** ResponseDeliverTx code. */ public code: number; @@ -16862,66 +9625,21 @@ export namespace tendermint { /** * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. - * @param message ResponseDeliverTx message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseDeliverTx message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseDeliverTx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. - * @param message ResponseDeliverTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseDeliverTx, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseDeliverTx; - - /** - * Decodes a ResponseDeliverTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseDeliverTx; - - /** - * Verifies a ResponseDeliverTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseDeliverTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseDeliverTx - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseDeliverTx; - - /** - * Creates a plain object from a ResponseDeliverTx message. Also converts values to other types if specified. - * @param message ResponseDeliverTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseDeliverTx, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseDeliverTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseDeliverTx; } /** Properties of a ResponseEndBlock. */ @@ -16942,9 +9660,9 @@ export namespace tendermint { /** * Constructs a new ResponseEndBlock. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseEndBlock); + constructor(p?: tendermint.abci.types.IResponseEndBlock); /** ResponseEndBlock validatorUpdates. */ public validatorUpdates: tendermint.abci.types.IValidatorUpdate[]; @@ -16964,66 +9682,21 @@ export namespace tendermint { /** * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. - * @param message ResponseEndBlock message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseEndBlock message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseEndBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. - * @param message ResponseEndBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseEndBlock, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseEndBlock; - - /** - * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseEndBlock; - - /** - * Verifies a ResponseEndBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseEndBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseEndBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseEndBlock; - - /** - * Creates a plain object from a ResponseEndBlock message. Also converts values to other types if specified. - * @param message ResponseEndBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseEndBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseEndBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseEndBlock; } /** Properties of a ResponseCommit. */ @@ -17038,9 +9711,9 @@ export namespace tendermint { /** * Constructs a new ResponseCommit. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseCommit); + constructor(p?: tendermint.abci.types.IResponseCommit); /** ResponseCommit data. */ public data: Uint8Array; @@ -17054,66 +9727,21 @@ export namespace tendermint { /** * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. - * @param message ResponseCommit message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseCommit message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IResponseCommit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. - * @param message ResponseCommit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IResponseCommit, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ResponseCommit; - - /** - * Decodes a ResponseCommit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ResponseCommit; - - /** - * Verifies a ResponseCommit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseCommit - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseCommit; - - /** - * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. - * @param message ResponseCommit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ResponseCommit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResponseCommit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ResponseCommit; } /** Properties of a ConsensusParams. */ @@ -17134,9 +9762,9 @@ export namespace tendermint { /** * Constructs a new ConsensusParams. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IConsensusParams); + constructor(p?: tendermint.abci.types.IConsensusParams); /** ConsensusParams block. */ public block?: (tendermint.abci.types.IBlockParams|null); @@ -17156,66 +9784,21 @@ export namespace tendermint { /** * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. - * @param message ConsensusParams message or plain object to encode - * @param [writer] Writer to encode to + * @param m ConsensusParams message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IConsensusParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. - * @param message ConsensusParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IConsensusParams, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ConsensusParams; - - /** - * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ConsensusParams; - - /** - * Verifies a ConsensusParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsensusParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ConsensusParams; - - /** - * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. - * @param message ConsensusParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ConsensusParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConsensusParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ConsensusParams; } /** Properties of a BlockParams. */ @@ -17233,9 +9816,9 @@ export namespace tendermint { /** * Constructs a new BlockParams. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IBlockParams); + constructor(p?: tendermint.abci.types.IBlockParams); /** BlockParams maxBytes. */ public maxBytes: (number|Long); @@ -17252,66 +9835,21 @@ export namespace tendermint { /** * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. - * @param message BlockParams message or plain object to encode - * @param [writer] Writer to encode to + * @param m BlockParams message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IBlockParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. - * @param message BlockParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IBlockParams, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.BlockParams; - - /** - * Decodes a BlockParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.BlockParams; - - /** - * Verifies a BlockParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlockParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.BlockParams; - - /** - * Creates a plain object from a BlockParams message. Also converts values to other types if specified. - * @param message BlockParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.BlockParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlockParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.BlockParams; } /** Properties of an EvidenceParams. */ @@ -17329,9 +9867,9 @@ export namespace tendermint { /** * Constructs a new EvidenceParams. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IEvidenceParams); + constructor(p?: tendermint.abci.types.IEvidenceParams); /** EvidenceParams maxAgeNumBlocks. */ public maxAgeNumBlocks: (number|Long); @@ -17348,66 +9886,21 @@ export namespace tendermint { /** * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. - * @param message EvidenceParams message or plain object to encode - * @param [writer] Writer to encode to + * @param m EvidenceParams message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IEvidenceParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. - * @param message EvidenceParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IEvidenceParams, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.EvidenceParams; - - /** - * Decodes an EvidenceParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.EvidenceParams; - - /** - * Verifies an EvidenceParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EvidenceParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.EvidenceParams; - - /** - * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. - * @param message EvidenceParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.EvidenceParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EvidenceParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.EvidenceParams; } /** Properties of a ValidatorParams. */ @@ -17422,9 +9915,9 @@ export namespace tendermint { /** * Constructs a new ValidatorParams. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IValidatorParams); + constructor(p?: tendermint.abci.types.IValidatorParams); /** ValidatorParams pubKeyTypes. */ public pubKeyTypes: string[]; @@ -17438,66 +9931,21 @@ export namespace tendermint { /** * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. - * @param message ValidatorParams message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorParams message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IValidatorParams, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. - * @param message ValidatorParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IValidatorParams, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ValidatorParams; - - /** - * Decodes a ValidatorParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ValidatorParams; - - /** - * Verifies a ValidatorParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ValidatorParams; - - /** - * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. - * @param message ValidatorParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ValidatorParams, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ValidatorParams; } /** Properties of a LastCommitInfo. */ @@ -17515,9 +9963,9 @@ export namespace tendermint { /** * Constructs a new LastCommitInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.ILastCommitInfo); + constructor(p?: tendermint.abci.types.ILastCommitInfo); /** LastCommitInfo round. */ public round: number; @@ -17534,66 +9982,21 @@ export namespace tendermint { /** * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. - * @param message LastCommitInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m LastCommitInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.ILastCommitInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. - * @param message LastCommitInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.ILastCommitInfo, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.LastCommitInfo; - - /** - * Decodes a LastCommitInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.LastCommitInfo; - - /** - * Verifies a LastCommitInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LastCommitInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LastCommitInfo - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.LastCommitInfo; - - /** - * Creates a plain object from a LastCommitInfo message. Also converts values to other types if specified. - * @param message LastCommitInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.LastCommitInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LastCommitInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.LastCommitInfo; } /** Properties of an Event. */ @@ -17611,9 +10014,9 @@ export namespace tendermint { /** * Constructs a new Event. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IEvent); + constructor(p?: tendermint.abci.types.IEvent); /** Event type. */ public type: string; @@ -17630,66 +10033,21 @@ export namespace tendermint { /** * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. - * @param message Event message or plain object to encode - * @param [writer] Writer to encode to + * @param m Event message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. - * @param message Event message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IEvent, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Event; - - /** - * Decodes an Event message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Event; - - /** - * Verifies an Event message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Event message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Event - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Event; - - /** - * Creates a plain object from an Event message. Also converts values to other types if specified. - * @param message Event - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.Event, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Event to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.Event; } /** Properties of a Header. */ @@ -17743,9 +10101,9 @@ export namespace tendermint { /** * Constructs a new Header. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IHeader); + constructor(p?: tendermint.abci.types.IHeader); /** Header version. */ public version?: (tendermint.abci.types.IVersion|null); @@ -17798,66 +10156,21 @@ export namespace tendermint { /** * Encodes the specified Header message. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. - * @param message Header message or plain object to encode - * @param [writer] Writer to encode to + * @param m Header message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. - * @param message Header message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IHeader, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Header; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Header; - - /** - * Verifies a Header message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Header - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Header; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @param message Header - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.Header, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Header to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.Header; } /** Properties of a Version. */ @@ -17875,9 +10188,9 @@ export namespace tendermint { /** * Constructs a new Version. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IVersion); + constructor(p?: tendermint.abci.types.IVersion); /** Version Block. */ public Block: (number|Long); @@ -17894,66 +10207,21 @@ export namespace tendermint { /** * Encodes the specified Version message. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. - * @param message Version message or plain object to encode - * @param [writer] Writer to encode to + * @param m Version message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. - * @param message Version message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IVersion, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Version; - - /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Version; - - /** - * Verifies a Version message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Version - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Version; - - /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @param message Version - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.Version, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Version to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.Version; } /** Properties of a BlockID. */ @@ -17971,9 +10239,9 @@ export namespace tendermint { /** * Constructs a new BlockID. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IBlockID); + constructor(p?: tendermint.abci.types.IBlockID); /** BlockID hash. */ public hash: Uint8Array; @@ -17990,66 +10258,21 @@ export namespace tendermint { /** * Encodes the specified BlockID message. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. - * @param message BlockID message or plain object to encode - * @param [writer] Writer to encode to + * @param m BlockID message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IBlockID, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. - * @param message BlockID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IBlockID, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.BlockID; - - /** - * Decodes a BlockID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.BlockID; - - /** - * Verifies a BlockID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BlockID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlockID - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.BlockID; - - /** - * Creates a plain object from a BlockID message. Also converts values to other types if specified. - * @param message BlockID - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.BlockID, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BlockID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.BlockID; } /** Properties of a PartSetHeader. */ @@ -18067,9 +10290,9 @@ export namespace tendermint { /** * Constructs a new PartSetHeader. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IPartSetHeader); + constructor(p?: tendermint.abci.types.IPartSetHeader); /** PartSetHeader total. */ public total: number; @@ -18086,66 +10309,21 @@ export namespace tendermint { /** * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. - * @param message PartSetHeader message or plain object to encode - * @param [writer] Writer to encode to + * @param m PartSetHeader message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IPartSetHeader, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. - * @param message PartSetHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IPartSetHeader, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.PartSetHeader; - - /** - * Decodes a PartSetHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.PartSetHeader; - - /** - * Verifies a PartSetHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PartSetHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PartSetHeader - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.PartSetHeader; - - /** - * Creates a plain object from a PartSetHeader message. Also converts values to other types if specified. - * @param message PartSetHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.PartSetHeader, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PartSetHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.PartSetHeader; } /** Properties of a Validator. */ @@ -18163,9 +10341,9 @@ export namespace tendermint { /** * Constructs a new Validator. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IValidator); + constructor(p?: tendermint.abci.types.IValidator); /** Validator address. */ public address: Uint8Array; @@ -18182,66 +10360,21 @@ export namespace tendermint { /** * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. - * @param message Validator message or plain object to encode - * @param [writer] Writer to encode to + * @param m Validator message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IValidator, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. - * @param message Validator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IValidator, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Validator; - - /** - * Decodes a Validator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Validator; - - /** - * Verifies a Validator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Validator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Validator - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Validator; - - /** - * Creates a plain object from a Validator message. Also converts values to other types if specified. - * @param message Validator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.Validator, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Validator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.Validator; } /** Properties of a ValidatorUpdate. */ @@ -18259,9 +10392,9 @@ export namespace tendermint { /** * Constructs a new ValidatorUpdate. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IValidatorUpdate); + constructor(p?: tendermint.abci.types.IValidatorUpdate); /** ValidatorUpdate pubKey. */ public pubKey?: (tendermint.abci.types.IPubKey|null); @@ -18278,66 +10411,21 @@ export namespace tendermint { /** * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. - * @param message ValidatorUpdate message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorUpdate message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IValidatorUpdate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. - * @param message ValidatorUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IValidatorUpdate, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.ValidatorUpdate; - - /** - * Decodes a ValidatorUpdate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.ValidatorUpdate; - - /** - * Verifies a ValidatorUpdate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidatorUpdate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorUpdate - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ValidatorUpdate; - - /** - * Creates a plain object from a ValidatorUpdate message. Also converts values to other types if specified. - * @param message ValidatorUpdate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.ValidatorUpdate, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidatorUpdate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.ValidatorUpdate; } /** Properties of a VoteInfo. */ @@ -18355,9 +10443,9 @@ export namespace tendermint { /** * Constructs a new VoteInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IVoteInfo); + constructor(p?: tendermint.abci.types.IVoteInfo); /** VoteInfo validator. */ public validator?: (tendermint.abci.types.IValidator|null); @@ -18374,66 +10462,21 @@ export namespace tendermint { /** * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. - * @param message VoteInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m VoteInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IVoteInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. - * @param message VoteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IVoteInfo, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.VoteInfo; - - /** - * Decodes a VoteInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.VoteInfo; - - /** - * Verifies a VoteInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VoteInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VoteInfo - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.VoteInfo; - - /** - * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. - * @param message VoteInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.VoteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VoteInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.VoteInfo; } /** Properties of a PubKey. */ @@ -18451,9 +10494,9 @@ export namespace tendermint { /** * Constructs a new PubKey. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IPubKey); + constructor(p?: tendermint.abci.types.IPubKey); /** PubKey type. */ public type: string; @@ -18470,66 +10513,21 @@ export namespace tendermint { /** * Encodes the specified PubKey message. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. - * @param message PubKey message or plain object to encode - * @param [writer] Writer to encode to + * @param m PubKey message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IPubKey, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PubKey message, length delimited. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. - * @param message PubKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IPubKey, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.PubKey; - - /** - * Decodes a PubKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.PubKey; - - /** - * Verifies a PubKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PubKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubKey - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.PubKey; - - /** - * Creates a plain object from a PubKey message. Also converts values to other types if specified. - * @param message PubKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.PubKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PubKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.PubKey; } /** Properties of an Evidence. */ @@ -18556,9 +10554,9 @@ export namespace tendermint { /** * Constructs a new Evidence. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IEvidence); + constructor(p?: tendermint.abci.types.IEvidence); /** Evidence type. */ public type: string; @@ -18584,66 +10582,21 @@ export namespace tendermint { /** * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. - * @param message Evidence message or plain object to encode - * @param [writer] Writer to encode to + * @param m Evidence message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.abci.types.IEvidence, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. - * @param message Evidence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.abci.types.IEvidence, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.abci.types.Evidence; - - /** - * Decodes an Evidence message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.abci.types.Evidence; - - /** - * Verifies an Evidence message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Evidence message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Evidence - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Evidence; - - /** - * Creates a plain object from an Evidence message. Also converts values to other types if specified. - * @param message Evidence - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.abci.types.Evidence, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Evidence to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.abci.types.Evidence; } /** Represents a ABCIApplication */ @@ -18927,9 +10880,9 @@ export namespace tendermint { /** * Constructs a new ProofOp. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.crypto.merkle.IProofOp); + constructor(p?: tendermint.crypto.merkle.IProofOp); /** ProofOp type. */ public type: string; @@ -18949,66 +10902,21 @@ export namespace tendermint { /** * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. - * @param message ProofOp message or plain object to encode - * @param [writer] Writer to encode to + * @param m ProofOp message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.crypto.merkle.IProofOp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. - * @param message ProofOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.crypto.merkle.IProofOp, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.crypto.merkle.ProofOp; - - /** - * Decodes a ProofOp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.crypto.merkle.ProofOp; - - /** - * Verifies a ProofOp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ProofOp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProofOp - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.merkle.ProofOp; - - /** - * Creates a plain object from a ProofOp message. Also converts values to other types if specified. - * @param message ProofOp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.crypto.merkle.ProofOp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ProofOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.crypto.merkle.ProofOp; } /** Properties of a Proof. */ @@ -19023,9 +10931,9 @@ export namespace tendermint { /** * Constructs a new Proof. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.crypto.merkle.IProof); + constructor(p?: tendermint.crypto.merkle.IProof); /** Proof ops. */ public ops: tendermint.crypto.merkle.IProofOp[]; @@ -19039,66 +10947,21 @@ export namespace tendermint { /** * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. - * @param message Proof message or plain object to encode - * @param [writer] Writer to encode to + * @param m Proof message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.crypto.merkle.IProof, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. - * @param message Proof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.crypto.merkle.IProof, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.crypto.merkle.Proof; - - /** - * Decodes a Proof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.crypto.merkle.Proof; - - /** - * Verifies a Proof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Proof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Proof - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.merkle.Proof; - - /** - * Creates a plain object from a Proof message. Also converts values to other types if specified. - * @param message Proof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.crypto.merkle.Proof, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Proof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.crypto.merkle.Proof; } } } @@ -19124,9 +10987,9 @@ export namespace tendermint { /** * Constructs a new Pair. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.libs.kv.IPair); + constructor(p?: tendermint.libs.kv.IPair); /** Pair key. */ public key: Uint8Array; @@ -19143,66 +11006,21 @@ export namespace tendermint { /** * Encodes the specified Pair message. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. - * @param message Pair message or plain object to encode - * @param [writer] Writer to encode to + * @param m Pair message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.libs.kv.IPair, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. - * @param message Pair message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.libs.kv.IPair, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.libs.kv.Pair; - - /** - * Decodes a Pair message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.libs.kv.Pair; - - /** - * Verifies a Pair message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Pair message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Pair - */ - public static fromObject(object: { [k: string]: any }): tendermint.libs.kv.Pair; - - /** - * Creates a plain object from a Pair message. Also converts values to other types if specified. - * @param message Pair - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.libs.kv.Pair, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Pair to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.libs.kv.Pair; } /** Properties of a KI64Pair. */ @@ -19220,9 +11038,9 @@ export namespace tendermint { /** * Constructs a new KI64Pair. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.libs.kv.IKI64Pair); + constructor(p?: tendermint.libs.kv.IKI64Pair); /** KI64Pair key. */ public key: Uint8Array; @@ -19239,66 +11057,21 @@ export namespace tendermint { /** * Encodes the specified KI64Pair message. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. - * @param message KI64Pair message or plain object to encode - * @param [writer] Writer to encode to + * @param m KI64Pair message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.libs.kv.IKI64Pair, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified KI64Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. - * @param message KI64Pair message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: tendermint.libs.kv.IKI64Pair, writer?: $protobuf.Writer): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): tendermint.libs.kv.KI64Pair; - - /** - * Decodes a KI64Pair message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): tendermint.libs.kv.KI64Pair; - - /** - * Verifies a KI64Pair message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a KI64Pair message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KI64Pair - */ - public static fromObject(object: { [k: string]: any }): tendermint.libs.kv.KI64Pair; - - /** - * Creates a plain object from a KI64Pair message. Also converts values to other types if specified. - * @param message KI64Pair - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: tendermint.libs.kv.KI64Pair, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this KI64Pair to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): tendermint.libs.kv.KI64Pair; } } } @@ -19325,9 +11098,9 @@ export namespace google { /** * Constructs a new Any. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.IAny); + constructor(p?: google.protobuf.IAny); /** Any type_url. */ public type_url: string; @@ -19344,1494 +11117,25 @@ export namespace google { /** * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to + * @param m Any message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: google.protobuf.IAny, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; - - /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): google.protobuf.Any; } /** Properties of a FileOptions. */ interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .gogoproto.goprotoGettersAll */ - ".gogoproto.goprotoGettersAll"?: (boolean|null); - - /** FileOptions .gogoproto.goprotoEnumPrefixAll */ - ".gogoproto.goprotoEnumPrefixAll"?: (boolean|null); - - /** FileOptions .gogoproto.goprotoStringerAll */ - ".gogoproto.goprotoStringerAll"?: (boolean|null); - - /** FileOptions .gogoproto.verboseEqualAll */ - ".gogoproto.verboseEqualAll"?: (boolean|null); - - /** FileOptions .gogoproto.faceAll */ - ".gogoproto.faceAll"?: (boolean|null); - - /** FileOptions .gogoproto.gostringAll */ - ".gogoproto.gostringAll"?: (boolean|null); - - /** FileOptions .gogoproto.populateAll */ - ".gogoproto.populateAll"?: (boolean|null); - - /** FileOptions .gogoproto.stringerAll */ - ".gogoproto.stringerAll"?: (boolean|null); - - /** FileOptions .gogoproto.onlyoneAll */ - ".gogoproto.onlyoneAll"?: (boolean|null); - - /** FileOptions .gogoproto.equalAll */ - ".gogoproto.equalAll"?: (boolean|null); - - /** FileOptions .gogoproto.descriptionAll */ - ".gogoproto.descriptionAll"?: (boolean|null); - - /** FileOptions .gogoproto.testgenAll */ - ".gogoproto.testgenAll"?: (boolean|null); - - /** FileOptions .gogoproto.benchgenAll */ - ".gogoproto.benchgenAll"?: (boolean|null); - - /** FileOptions .gogoproto.marshalerAll */ - ".gogoproto.marshalerAll"?: (boolean|null); - - /** FileOptions .gogoproto.unmarshalerAll */ - ".gogoproto.unmarshalerAll"?: (boolean|null); - - /** FileOptions .gogoproto.stableMarshalerAll */ - ".gogoproto.stableMarshalerAll"?: (boolean|null); - - /** FileOptions .gogoproto.sizerAll */ - ".gogoproto.sizerAll"?: (boolean|null); - - /** FileOptions .gogoproto.goprotoEnumStringerAll */ - ".gogoproto.goprotoEnumStringerAll"?: (boolean|null); - - /** FileOptions .gogoproto.enumStringerAll */ - ".gogoproto.enumStringerAll"?: (boolean|null); - - /** FileOptions .gogoproto.unsafeMarshalerAll */ - ".gogoproto.unsafeMarshalerAll"?: (boolean|null); - - /** FileOptions .gogoproto.unsafeUnmarshalerAll */ - ".gogoproto.unsafeUnmarshalerAll"?: (boolean|null); - - /** FileOptions .gogoproto.goprotoExtensionsMapAll */ - ".gogoproto.goprotoExtensionsMapAll"?: (boolean|null); - - /** FileOptions .gogoproto.goprotoUnrecognizedAll */ - ".gogoproto.goprotoUnrecognizedAll"?: (boolean|null); - - /** FileOptions .gogoproto.gogoprotoImport */ - ".gogoproto.gogoprotoImport"?: (boolean|null); - - /** FileOptions .gogoproto.protosizerAll */ - ".gogoproto.protosizerAll"?: (boolean|null); - - /** FileOptions .gogoproto.compareAll */ - ".gogoproto.compareAll"?: (boolean|null); - - /** FileOptions .gogoproto.typedeclAll */ - ".gogoproto.typedeclAll"?: (boolean|null); - - /** FileOptions .gogoproto.enumdeclAll */ - ".gogoproto.enumdeclAll"?: (boolean|null); - - /** FileOptions .gogoproto.goprotoRegistration */ - ".gogoproto.goprotoRegistration"?: (boolean|null); - - /** FileOptions .gogoproto.messagenameAll */ - ".gogoproto.messagenameAll"?: (boolean|null); - - /** FileOptions .gogoproto.goprotoSizecacheAll */ - ".gogoproto.goprotoSizecacheAll"?: (boolean|null); - - /** FileOptions .gogoproto.goprotoUnkeyedAll */ - ".gogoproto.goprotoUnkeyedAll"?: (boolean|null); } /** Represents a FileOptions. */ @@ -20839,54 +11143,9 @@ export namespace google { /** * Constructs a new FileOptions. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + constructor(p?: google.protobuf.IFileOptions); /** * Creates a new FileOptions instance using the specified properties. @@ -20897,179 +11156,25 @@ export namespace google { /** * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to + * @param m FileOptions message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: google.protobuf.IFileOptions, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): google.protobuf.FileOptions; } /** Properties of a MessageOptions. */ interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .cosmos_proto.interfaceType */ - ".cosmos_proto.interfaceType"?: (string|null); - - /** MessageOptions .cosmos_proto.implementsInterface */ - ".cosmos_proto.implementsInterface"?: (string|null); - - /** MessageOptions .gogoproto.goprotoGetters */ - ".gogoproto.goprotoGetters"?: (boolean|null); - - /** MessageOptions .gogoproto.goprotoStringer */ - ".gogoproto.goprotoStringer"?: (boolean|null); - - /** MessageOptions .gogoproto.verboseEqual */ - ".gogoproto.verboseEqual"?: (boolean|null); - - /** MessageOptions .gogoproto.face */ - ".gogoproto.face"?: (boolean|null); - - /** MessageOptions .gogoproto.gostring */ - ".gogoproto.gostring"?: (boolean|null); - - /** MessageOptions .gogoproto.populate */ - ".gogoproto.populate"?: (boolean|null); - - /** MessageOptions .gogoproto.stringer */ - ".gogoproto.stringer"?: (boolean|null); - - /** MessageOptions .gogoproto.onlyone */ - ".gogoproto.onlyone"?: (boolean|null); - - /** MessageOptions .gogoproto.equal */ - ".gogoproto.equal"?: (boolean|null); - - /** MessageOptions .gogoproto.description */ - ".gogoproto.description"?: (boolean|null); - - /** MessageOptions .gogoproto.testgen */ - ".gogoproto.testgen"?: (boolean|null); - - /** MessageOptions .gogoproto.benchgen */ - ".gogoproto.benchgen"?: (boolean|null); - - /** MessageOptions .gogoproto.marshaler */ - ".gogoproto.marshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.unmarshaler */ - ".gogoproto.unmarshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.stableMarshaler */ - ".gogoproto.stableMarshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.sizer */ - ".gogoproto.sizer"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafeMarshaler */ - ".gogoproto.unsafeMarshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.unsafeUnmarshaler */ - ".gogoproto.unsafeUnmarshaler"?: (boolean|null); - - /** MessageOptions .gogoproto.goprotoExtensionsMap */ - ".gogoproto.goprotoExtensionsMap"?: (boolean|null); - - /** MessageOptions .gogoproto.goprotoUnrecognized */ - ".gogoproto.goprotoUnrecognized"?: (boolean|null); - - /** MessageOptions .gogoproto.protosizer */ - ".gogoproto.protosizer"?: (boolean|null); - - /** MessageOptions .gogoproto.compare */ - ".gogoproto.compare"?: (boolean|null); - - /** MessageOptions .gogoproto.typedecl */ - ".gogoproto.typedecl"?: (boolean|null); - - /** MessageOptions .gogoproto.messagename */ - ".gogoproto.messagename"?: (boolean|null); - - /** MessageOptions .gogoproto.goprotoSizecache */ - ".gogoproto.goprotoSizecache"?: (boolean|null); - - /** MessageOptions .gogoproto.goprotoUnkeyed */ - ".gogoproto.goprotoUnkeyed"?: (boolean|null); } /** Represents a MessageOptions. */ @@ -21077,24 +11182,9 @@ export namespace google { /** * Constructs a new MessageOptions. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + constructor(p?: google.protobuf.IMessageOptions); /** * Creates a new MessageOptions instance using the specified properties. @@ -21105,133 +11195,25 @@ export namespace google { /** * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to + * @param m MessageOptions message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: google.protobuf.IMessageOptions, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): google.protobuf.MessageOptions; } /** Properties of a FieldOptions. */ interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .cosmos_proto.acceptsInterface */ - ".cosmos_proto.acceptsInterface"?: (string|null); - - /** FieldOptions .gogoproto.nullable */ - ".gogoproto.nullable"?: (boolean|null); - - /** FieldOptions .gogoproto.embed */ - ".gogoproto.embed"?: (boolean|null); - - /** FieldOptions .gogoproto.customtype */ - ".gogoproto.customtype"?: (string|null); - - /** FieldOptions .gogoproto.customname */ - ".gogoproto.customname"?: (string|null); - - /** FieldOptions .gogoproto.jsontag */ - ".gogoproto.jsontag"?: (string|null); - - /** FieldOptions .gogoproto.moretags */ - ".gogoproto.moretags"?: (string|null); - - /** FieldOptions .gogoproto.casttype */ - ".gogoproto.casttype"?: (string|null); - - /** FieldOptions .gogoproto.castkey */ - ".gogoproto.castkey"?: (string|null); - - /** FieldOptions .gogoproto.castvalue */ - ".gogoproto.castvalue"?: (string|null); - - /** FieldOptions .gogoproto.stdtime */ - ".gogoproto.stdtime"?: (boolean|null); - - /** FieldOptions .gogoproto.stdduration */ - ".gogoproto.stdduration"?: (boolean|null); - - /** FieldOptions .gogoproto.wktpointer */ - ".gogoproto.wktpointer"?: (boolean|null); - - /** FieldOptions .gogoproto.castrepeated */ - ".gogoproto.castrepeated"?: (string|null); } /** Represents a FieldOptions. */ @@ -21239,30 +11221,9 @@ export namespace google { /** * Constructs a new FieldOptions. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + constructor(p?: google.protobuf.IFieldOptions); /** * Creates a new FieldOptions instance using the specified properties. @@ -21273,201 +11234,25 @@ export namespace google { /** * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to + * @param m FieldOptions message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: google.protobuf.IFieldOptions, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): google.protobuf.FieldOptions; } /** Properties of an EnumOptions. */ interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumOptions .gogoproto.goprotoEnumPrefix */ - ".gogoproto.goprotoEnumPrefix"?: (boolean|null); - - /** EnumOptions .gogoproto.goprotoEnumStringer */ - ".gogoproto.goprotoEnumStringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enumStringer */ - ".gogoproto.enumStringer"?: (boolean|null); - - /** EnumOptions .gogoproto.enumCustomname */ - ".gogoproto.enumCustomname"?: (string|null); - - /** EnumOptions .gogoproto.enumdecl */ - ".gogoproto.enumdecl"?: (boolean|null); } /** Represents an EnumOptions. */ @@ -21475,18 +11260,9 @@ export namespace google { /** * Constructs a new EnumOptions. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + constructor(p?: google.protobuf.IEnumOptions); /** * Creates a new EnumOptions instance using the specified properties. @@ -21497,79 +11273,25 @@ export namespace google { /** * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to + * @param m EnumOptions message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: google.protobuf.IEnumOptions, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): google.protobuf.EnumOptions; } /** Properties of an EnumValueOptions. */ interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** EnumValueOptions .gogoproto.enumvalueCustomname */ - ".gogoproto.enumvalueCustomname"?: (string|null); } /** Represents an EnumValueOptions. */ @@ -21577,15 +11299,9 @@ export namespace google { /** * Constructs a new EnumValueOptions. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + constructor(p?: google.protobuf.IEnumValueOptions); /** * Creates a new EnumValueOptions instance using the specified properties. @@ -21596,891 +11312,21 @@ export namespace google { /** * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to + * @param m EnumValueOptions message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: google.protobuf.IEnumValueOptions, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @param r Reader or buffer to decode from + * @param [l] Message length if known beforehand * @returns EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): google.protobuf.EnumValueOptions; } /** Properties of a Timestamp. */ @@ -22498,9 +11344,9 @@ export namespace google { /** * Constructs a new Timestamp. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(p?: google.protobuf.ITimestamp); /** Timestamp seconds. */ public seconds: (number|Long); @@ -22517,66 +11363,21 @@ export namespace google { /** * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to + * @param m Timestamp message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: google.protobuf.ITimestamp, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): google.protobuf.Timestamp; } /** Properties of a Duration. */ @@ -22594,9 +11395,9 @@ export namespace google { /** * Constructs a new Duration. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(p?: google.protobuf.IDuration); /** Duration seconds. */ public seconds: (number|Long); @@ -22613,66 +11414,21 @@ export namespace google { /** * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to + * @param m Duration message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: google.protobuf.IDuration, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + 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 index 79d7f8cf..3c767e1e 100644 --- a/packages/demo-protobuf/src/generated/codecimpl.js +++ b/packages/demo-protobuf/src/generated/codecimpl.js @@ -52,13 +52,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Dog. * @implements IDog * @constructor - * @param {cosmos_sdk.codec.v1.IDog=} [properties] Properties to set + * @param {cosmos_sdk.codec.v1.IDog=} [p] Properties to set */ - function Dog(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Dog(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]]; } /** @@ -94,31 +94,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.codec.v1.Dog * @static - * @param {cosmos_sdk.codec.v1.IDog} message Dog message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.codec.v1.IDog} m Dog message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Dog.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.size != null && Object.hasOwnProperty.call(message, "size")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.size); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - return writer; - }; - - /** - * Encodes the specified Dog message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.codec.v1.Dog - * @static - * @param {cosmos_sdk.codec.v1.IDog} message Dog message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Dog.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Dog.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.size != null && Object.hasOwnProperty.call(m, "size")) + w.uint32(10).string(m.size); + if (m.name != null && Object.hasOwnProperty.call(m, "name")) + w.uint32(18).string(m.name); + return w; }; /** @@ -126,121 +113,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.codec.v1.Dog * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.codec.v1.Dog} Dog * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Dog.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.Dog(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Dog.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.codec.v1.Dog(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.size = reader.string(); + m.size = r.string(); break; case 2: - message.name = reader.string(); + m.name = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Dog message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.codec.v1.Dog - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.codec.v1.Dog} Dog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Dog.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Dog message. - * @function verify - * @memberof cosmos_sdk.codec.v1.Dog - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Dog.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.size != null && message.hasOwnProperty("size")) - if (!$util.isString(message.size)) - return "size: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a Dog message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.codec.v1.Dog - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.codec.v1.Dog} Dog - */ - Dog.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.codec.v1.Dog) - return object; - var message = new $root.cosmos_sdk.codec.v1.Dog(); - if (object.size != null) - message.size = String(object.size); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a Dog message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.codec.v1.Dog - * @static - * @param {cosmos_sdk.codec.v1.Dog} message Dog - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Dog.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.size = ""; - object.name = ""; - } - if (message.size != null && message.hasOwnProperty("size")) - object.size = message.size; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this Dog to JSON. - * @function toJSON - * @memberof cosmos_sdk.codec.v1.Dog - * @instance - * @returns {Object.} JSON object - */ - Dog.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Dog; @@ -262,13 +159,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Cat. * @implements ICat * @constructor - * @param {cosmos_sdk.codec.v1.ICat=} [properties] Properties to set + * @param {cosmos_sdk.codec.v1.ICat=} [p] Properties to set */ - function Cat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Cat(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]]; } /** @@ -304,31 +201,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.codec.v1.Cat * @static - * @param {cosmos_sdk.codec.v1.ICat} message Cat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.codec.v1.ICat} m Cat message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cat.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.moniker); - if (message.lives != null && Object.hasOwnProperty.call(message, "lives")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lives); - return writer; - }; - - /** - * Encodes the specified Cat message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.codec.v1.Cat - * @static - * @param {cosmos_sdk.codec.v1.ICat} message Cat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Cat.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.moniker != null && Object.hasOwnProperty.call(m, "moniker")) + w.uint32(10).string(m.moniker); + if (m.lives != null && Object.hasOwnProperty.call(m, "lives")) + w.uint32(16).int32(m.lives); + return w; }; /** @@ -336,121 +220,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.codec.v1.Cat * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.codec.v1.Cat} Cat * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cat.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.Cat(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Cat.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.codec.v1.Cat(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.moniker = reader.string(); + m.moniker = r.string(); break; case 2: - message.lives = reader.int32(); + m.lives = r.int32(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Cat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.codec.v1.Cat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.codec.v1.Cat} Cat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Cat message. - * @function verify - * @memberof cosmos_sdk.codec.v1.Cat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Cat.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.moniker != null && message.hasOwnProperty("moniker")) - if (!$util.isString(message.moniker)) - return "moniker: string expected"; - if (message.lives != null && message.hasOwnProperty("lives")) - if (!$util.isInteger(message.lives)) - return "lives: integer expected"; - return null; - }; - - /** - * Creates a Cat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.codec.v1.Cat - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.codec.v1.Cat} Cat - */ - Cat.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.codec.v1.Cat) - return object; - var message = new $root.cosmos_sdk.codec.v1.Cat(); - if (object.moniker != null) - message.moniker = String(object.moniker); - if (object.lives != null) - message.lives = object.lives | 0; - return message; - }; - - /** - * Creates a plain object from a Cat message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.codec.v1.Cat - * @static - * @param {cosmos_sdk.codec.v1.Cat} message Cat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Cat.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.moniker = ""; - object.lives = 0; - } - if (message.moniker != null && message.hasOwnProperty("moniker")) - object.moniker = message.moniker; - if (message.lives != null && message.hasOwnProperty("lives")) - object.lives = message.lives; - return object; - }; - - /** - * Converts this Cat to JSON. - * @function toJSON - * @memberof cosmos_sdk.codec.v1.Cat - * @instance - * @returns {Object.} JSON object - */ - Cat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Cat; @@ -472,13 +266,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a HasAnimal. * @implements IHasAnimal * @constructor - * @param {cosmos_sdk.codec.v1.IHasAnimal=} [properties] Properties to set + * @param {cosmos_sdk.codec.v1.IHasAnimal=} [p] Properties to set */ - function HasAnimal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function HasAnimal(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]]; } /** @@ -514,31 +308,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.codec.v1.HasAnimal * @static - * @param {cosmos_sdk.codec.v1.IHasAnimal} message HasAnimal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.codec.v1.IHasAnimal} m HasAnimal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HasAnimal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.animal != null && Object.hasOwnProperty.call(message, "animal")) - $root.google.protobuf.Any.encode(message.animal, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.x != null && Object.hasOwnProperty.call(message, "x")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.x); - return writer; - }; - - /** - * Encodes the specified HasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @static - * @param {cosmos_sdk.codec.v1.IHasAnimal} message HasAnimal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HasAnimal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + HasAnimal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.animal != null && Object.hasOwnProperty.call(m, "animal")) + $root.google.protobuf.Any.encode(m.animal, w.uint32(10).fork()).ldelim(); + if (m.x != null && Object.hasOwnProperty.call(m, "x")) + w.uint32(16).int64(m.x); + return w; }; /** @@ -546,140 +327,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.codec.v1.HasAnimal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.codec.v1.HasAnimal} HasAnimal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HasAnimal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.HasAnimal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + HasAnimal.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.codec.v1.HasAnimal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.animal = $root.google.protobuf.Any.decode(reader, reader.uint32()); + m.animal = $root.google.protobuf.Any.decode(r, r.uint32()); break; case 2: - message.x = reader.int64(); + m.x = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a HasAnimal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.codec.v1.HasAnimal} HasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HasAnimal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HasAnimal message. - * @function verify - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HasAnimal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.animal != null && message.hasOwnProperty("animal")) { - var error = $root.google.protobuf.Any.verify(message.animal); - if (error) - return "animal." + error; - } - if (message.x != null && message.hasOwnProperty("x")) - if (!$util.isInteger(message.x) && !(message.x && $util.isInteger(message.x.low) && $util.isInteger(message.x.high))) - return "x: integer|Long expected"; - return null; - }; - - /** - * Creates a HasAnimal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.codec.v1.HasAnimal} HasAnimal - */ - HasAnimal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.codec.v1.HasAnimal) - return object; - var message = new $root.cosmos_sdk.codec.v1.HasAnimal(); - if (object.animal != null) { - if (typeof object.animal !== "object") - throw TypeError(".cosmos_sdk.codec.v1.HasAnimal.animal: object expected"); - message.animal = $root.google.protobuf.Any.fromObject(object.animal); - } - if (object.x != null) - if ($util.Long) - (message.x = $util.Long.fromValue(object.x)).unsigned = false; - else if (typeof object.x === "string") - message.x = parseInt(object.x, 10); - else if (typeof object.x === "number") - message.x = object.x; - else if (typeof object.x === "object") - message.x = new $util.LongBits(object.x.low >>> 0, object.x.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a HasAnimal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @static - * @param {cosmos_sdk.codec.v1.HasAnimal} message HasAnimal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HasAnimal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.animal = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.x = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.x = options.longs === String ? "0" : 0; - } - if (message.animal != null && message.hasOwnProperty("animal")) - object.animal = $root.google.protobuf.Any.toObject(message.animal, options); - if (message.x != null && message.hasOwnProperty("x")) - if (typeof message.x === "number") - object.x = options.longs === String ? String(message.x) : message.x; - else - object.x = options.longs === String ? $util.Long.prototype.toString.call(message.x) : options.longs === Number ? new $util.LongBits(message.x.low >>> 0, message.x.high >>> 0).toNumber() : message.x; - return object; - }; - - /** - * Converts this HasAnimal to JSON. - * @function toJSON - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @instance - * @returns {Object.} JSON object - */ - HasAnimal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return HasAnimal; @@ -700,13 +372,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a HasHasAnimal. * @implements IHasHasAnimal * @constructor - * @param {cosmos_sdk.codec.v1.IHasHasAnimal=} [properties] Properties to set + * @param {cosmos_sdk.codec.v1.IHasHasAnimal=} [p] Properties to set */ - function HasHasAnimal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function HasHasAnimal(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]]; } /** @@ -734,29 +406,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.codec.v1.HasHasAnimal * @static - * @param {cosmos_sdk.codec.v1.IHasHasAnimal} message HasHasAnimal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.codec.v1.IHasHasAnimal} m HasHasAnimal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HasHasAnimal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hasAnimal != null && Object.hasOwnProperty.call(message, "hasAnimal")) - $root.google.protobuf.Any.encode(message.hasAnimal, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @static - * @param {cosmos_sdk.codec.v1.IHasHasAnimal} message HasHasAnimal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HasHasAnimal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + HasHasAnimal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.hasAnimal != null && Object.hasOwnProperty.call(m, "hasAnimal")) + $root.google.protobuf.Any.encode(m.hasAnimal, w.uint32(10).fork()).ldelim(); + return w; }; /** @@ -764,114 +423,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.codec.v1.HasHasAnimal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.codec.v1.HasHasAnimal} HasHasAnimal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HasHasAnimal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.HasHasAnimal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + HasHasAnimal.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.codec.v1.HasHasAnimal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.hasAnimal = $root.google.protobuf.Any.decode(reader, reader.uint32()); + m.hasAnimal = $root.google.protobuf.Any.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a HasHasAnimal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.codec.v1.HasHasAnimal} HasHasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HasHasAnimal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HasHasAnimal message. - * @function verify - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HasHasAnimal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hasAnimal != null && message.hasOwnProperty("hasAnimal")) { - var error = $root.google.protobuf.Any.verify(message.hasAnimal); - if (error) - return "hasAnimal." + error; - } - return null; - }; - - /** - * Creates a HasHasAnimal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.codec.v1.HasHasAnimal} HasHasAnimal - */ - HasHasAnimal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.codec.v1.HasHasAnimal) - return object; - var message = new $root.cosmos_sdk.codec.v1.HasHasAnimal(); - if (object.hasAnimal != null) { - if (typeof object.hasAnimal !== "object") - throw TypeError(".cosmos_sdk.codec.v1.HasHasAnimal.hasAnimal: object expected"); - message.hasAnimal = $root.google.protobuf.Any.fromObject(object.hasAnimal); - } - return message; - }; - - /** - * Creates a plain object from a HasHasAnimal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @static - * @param {cosmos_sdk.codec.v1.HasHasAnimal} message HasHasAnimal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HasHasAnimal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.hasAnimal = null; - if (message.hasAnimal != null && message.hasOwnProperty("hasAnimal")) - object.hasAnimal = $root.google.protobuf.Any.toObject(message.hasAnimal, options); - return object; - }; - - /** - * Converts this HasHasAnimal to JSON. - * @function toJSON - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @instance - * @returns {Object.} JSON object - */ - HasHasAnimal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return HasHasAnimal; @@ -892,13 +465,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a HasHasHasAnimal. * @implements IHasHasHasAnimal * @constructor - * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal=} [properties] Properties to set + * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal=} [p] Properties to set */ - function HasHasHasAnimal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function HasHasHasAnimal(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]]; } /** @@ -926,29 +499,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal * @static - * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal} message HasHasHasAnimal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal} m HasHasHasAnimal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HasHasHasAnimal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hasHasAnimal != null && Object.hasOwnProperty.call(message, "hasHasAnimal")) - $root.google.protobuf.Any.encode(message.hasHasAnimal, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HasHasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @static - * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal} message HasHasHasAnimal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HasHasHasAnimal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + HasHasHasAnimal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.hasHasAnimal != null && Object.hasOwnProperty.call(m, "hasHasAnimal")) + $root.google.protobuf.Any.encode(m.hasHasAnimal, w.uint32(10).fork()).ldelim(); + return w; }; /** @@ -956,114 +516,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.codec.v1.HasHasHasAnimal} HasHasHasAnimal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HasHasHasAnimal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.HasHasHasAnimal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + HasHasHasAnimal.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.codec.v1.HasHasHasAnimal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.hasHasAnimal = $root.google.protobuf.Any.decode(reader, reader.uint32()); + m.hasHasAnimal = $root.google.protobuf.Any.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a HasHasHasAnimal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.codec.v1.HasHasHasAnimal} HasHasHasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HasHasHasAnimal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HasHasHasAnimal message. - * @function verify - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HasHasHasAnimal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hasHasAnimal != null && message.hasOwnProperty("hasHasAnimal")) { - var error = $root.google.protobuf.Any.verify(message.hasHasAnimal); - if (error) - return "hasHasAnimal." + error; - } - return null; - }; - - /** - * Creates a HasHasHasAnimal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.codec.v1.HasHasHasAnimal} HasHasHasAnimal - */ - HasHasHasAnimal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.codec.v1.HasHasHasAnimal) - return object; - var message = new $root.cosmos_sdk.codec.v1.HasHasHasAnimal(); - if (object.hasHasAnimal != null) { - if (typeof object.hasHasAnimal !== "object") - throw TypeError(".cosmos_sdk.codec.v1.HasHasHasAnimal.hasHasAnimal: object expected"); - message.hasHasAnimal = $root.google.protobuf.Any.fromObject(object.hasHasAnimal); - } - return message; - }; - - /** - * Creates a plain object from a HasHasHasAnimal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @static - * @param {cosmos_sdk.codec.v1.HasHasHasAnimal} message HasHasHasAnimal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HasHasHasAnimal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.hasHasAnimal = null; - if (message.hasHasAnimal != null && message.hasOwnProperty("hasHasAnimal")) - object.hasHasAnimal = $root.google.protobuf.Any.toObject(message.hasHasAnimal, options); - return object; - }; - - /** - * Converts this HasHasHasAnimal to JSON. - * @function toJSON - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @instance - * @returns {Object.} JSON object - */ - HasHasHasAnimal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return HasHasHasAnimal; @@ -1185,13 +659,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an EchoRequest. * @implements IEchoRequest * @constructor - * @param {cosmos_sdk.codec.v1.IEchoRequest=} [properties] Properties to set + * @param {cosmos_sdk.codec.v1.IEchoRequest=} [p] Properties to set */ - function EchoRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function EchoRequest(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]]; } /** @@ -1219,29 +693,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.codec.v1.EchoRequest * @static - * @param {cosmos_sdk.codec.v1.IEchoRequest} message EchoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.codec.v1.IEchoRequest} m EchoRequest message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EchoRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - return writer; - }; - - /** - * Encodes the specified EchoRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @static - * @param {cosmos_sdk.codec.v1.IEchoRequest} message EchoRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EchoRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EchoRequest.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; }; /** @@ -1249,109 +710,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.codec.v1.EchoRequest * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.codec.v1.EchoRequest} EchoRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EchoRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.EchoRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + EchoRequest.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.codec.v1.EchoRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.message = reader.string(); + m.message = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an EchoRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.codec.v1.EchoRequest} EchoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EchoRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EchoRequest message. - * @function verify - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EchoRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates an EchoRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.codec.v1.EchoRequest} EchoRequest - */ - EchoRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.codec.v1.EchoRequest) - return object; - var message = new $root.cosmos_sdk.codec.v1.EchoRequest(); - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from an EchoRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @static - * @param {cosmos_sdk.codec.v1.EchoRequest} message EchoRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EchoRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.message = ""; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this EchoRequest to JSON. - * @function toJSON - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @instance - * @returns {Object.} JSON object - */ - EchoRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return EchoRequest; @@ -1372,13 +752,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an EchoResponse. * @implements IEchoResponse * @constructor - * @param {cosmos_sdk.codec.v1.IEchoResponse=} [properties] Properties to set + * @param {cosmos_sdk.codec.v1.IEchoResponse=} [p] Properties to set */ - function EchoResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function EchoResponse(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]]; } /** @@ -1406,29 +786,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.codec.v1.EchoResponse * @static - * @param {cosmos_sdk.codec.v1.IEchoResponse} message EchoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.codec.v1.IEchoResponse} m EchoResponse message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EchoResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - return writer; - }; - - /** - * Encodes the specified EchoResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @static - * @param {cosmos_sdk.codec.v1.IEchoResponse} message EchoResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EchoResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EchoResponse.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; }; /** @@ -1436,109 +803,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.codec.v1.EchoResponse * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.codec.v1.EchoResponse} EchoResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EchoResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.EchoResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + EchoResponse.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.codec.v1.EchoResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.message = reader.string(); + m.message = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an EchoResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.codec.v1.EchoResponse} EchoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EchoResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EchoResponse message. - * @function verify - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EchoResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates an EchoResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.codec.v1.EchoResponse} EchoResponse - */ - EchoResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.codec.v1.EchoResponse) - return object; - var message = new $root.cosmos_sdk.codec.v1.EchoResponse(); - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from an EchoResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @static - * @param {cosmos_sdk.codec.v1.EchoResponse} message EchoResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EchoResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.message = ""; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this EchoResponse to JSON. - * @function toJSON - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @instance - * @returns {Object.} JSON object - */ - EchoResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return EchoResponse; @@ -1559,13 +845,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a SayHelloRequest. * @implements ISayHelloRequest * @constructor - * @param {cosmos_sdk.codec.v1.ISayHelloRequest=} [properties] Properties to set + * @param {cosmos_sdk.codec.v1.ISayHelloRequest=} [p] Properties to set */ - function SayHelloRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function SayHelloRequest(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]]; } /** @@ -1593,29 +879,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.codec.v1.SayHelloRequest * @static - * @param {cosmos_sdk.codec.v1.ISayHelloRequest} message SayHelloRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.codec.v1.ISayHelloRequest} m SayHelloRequest message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SayHelloRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified SayHelloRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @static - * @param {cosmos_sdk.codec.v1.ISayHelloRequest} message SayHelloRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SayHelloRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SayHelloRequest.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.name != null && Object.hasOwnProperty.call(m, "name")) + w.uint32(10).string(m.name); + return w; }; /** @@ -1623,109 +896,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.codec.v1.SayHelloRequest * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.codec.v1.SayHelloRequest} SayHelloRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SayHelloRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.SayHelloRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + SayHelloRequest.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.codec.v1.SayHelloRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.name = reader.string(); + m.name = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a SayHelloRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.codec.v1.SayHelloRequest} SayHelloRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SayHelloRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SayHelloRequest message. - * @function verify - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SayHelloRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a SayHelloRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.codec.v1.SayHelloRequest} SayHelloRequest - */ - SayHelloRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.codec.v1.SayHelloRequest) - return object; - var message = new $root.cosmos_sdk.codec.v1.SayHelloRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a SayHelloRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @static - * @param {cosmos_sdk.codec.v1.SayHelloRequest} message SayHelloRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SayHelloRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this SayHelloRequest to JSON. - * @function toJSON - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @instance - * @returns {Object.} JSON object - */ - SayHelloRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return SayHelloRequest; @@ -1746,13 +938,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a SayHelloResponse. * @implements ISayHelloResponse * @constructor - * @param {cosmos_sdk.codec.v1.ISayHelloResponse=} [properties] Properties to set + * @param {cosmos_sdk.codec.v1.ISayHelloResponse=} [p] Properties to set */ - function SayHelloResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function SayHelloResponse(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]]; } /** @@ -1780,29 +972,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.codec.v1.SayHelloResponse * @static - * @param {cosmos_sdk.codec.v1.ISayHelloResponse} message SayHelloResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.codec.v1.ISayHelloResponse} m SayHelloResponse message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SayHelloResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.greeting != null && Object.hasOwnProperty.call(message, "greeting")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.greeting); - return writer; - }; - - /** - * Encodes the specified SayHelloResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @static - * @param {cosmos_sdk.codec.v1.ISayHelloResponse} message SayHelloResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SayHelloResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SayHelloResponse.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.greeting != null && Object.hasOwnProperty.call(m, "greeting")) + w.uint32(10).string(m.greeting); + return w; }; /** @@ -1810,109 +989,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.codec.v1.SayHelloResponse * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.codec.v1.SayHelloResponse} SayHelloResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SayHelloResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.codec.v1.SayHelloResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + SayHelloResponse.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.codec.v1.SayHelloResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.greeting = reader.string(); + m.greeting = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a SayHelloResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.codec.v1.SayHelloResponse} SayHelloResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SayHelloResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SayHelloResponse message. - * @function verify - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SayHelloResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.greeting != null && message.hasOwnProperty("greeting")) - if (!$util.isString(message.greeting)) - return "greeting: string expected"; - return null; - }; - - /** - * Creates a SayHelloResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.codec.v1.SayHelloResponse} SayHelloResponse - */ - SayHelloResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.codec.v1.SayHelloResponse) - return object; - var message = new $root.cosmos_sdk.codec.v1.SayHelloResponse(); - if (object.greeting != null) - message.greeting = String(object.greeting); - return message; - }; - - /** - * Creates a plain object from a SayHelloResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @static - * @param {cosmos_sdk.codec.v1.SayHelloResponse} message SayHelloResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SayHelloResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.greeting = ""; - if (message.greeting != null && message.hasOwnProperty("greeting")) - object.greeting = message.greeting; - return object; - }; - - /** - * Converts this SayHelloResponse to JSON. - * @function toJSON - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @instance - * @returns {Object.} JSON object - */ - SayHelloResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return SayHelloResponse; @@ -1962,13 +1060,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a PublicKey. * @implements IPublicKey * @constructor - * @param {cosmos_sdk.crypto.v1.IPublicKey=} [properties] Properties to set + * @param {cosmos_sdk.crypto.v1.IPublicKey=} [p] Properties to set */ - function PublicKey(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -2050,39 +1148,26 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.crypto.v1.PublicKey * @static - * @param {cosmos_sdk.crypto.v1.IPublicKey} message PublicKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.crypto.v1.IPublicKey} m PublicKey message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PublicKey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.secp256k1 != null && Object.hasOwnProperty.call(message, "secp256k1")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.secp256k1); - if (message.ed25519 != null && Object.hasOwnProperty.call(message, "ed25519")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.ed25519); - if (message.sr25519 != null && Object.hasOwnProperty.call(message, "sr25519")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.sr25519); - if (message.multisig != null && Object.hasOwnProperty.call(message, "multisig")) - $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.encode(message.multisig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.secp256r1 != null && Object.hasOwnProperty.call(message, "secp256r1")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.secp256r1); - if (message.anyPubkey != null && Object.hasOwnProperty.call(message, "anyPubkey")) - $root.google.protobuf.Any.encode(message.anyPubkey, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {cosmos_sdk.crypto.v1.IPublicKey} message PublicKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublicKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -2090,222 +1175,43 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.crypto.v1.PublicKey * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PublicKey.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.crypto.v1.PublicKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.secp256k1 = reader.bytes(); + m.secp256k1 = r.bytes(); break; case 2: - message.ed25519 = reader.bytes(); + m.ed25519 = r.bytes(); break; case 3: - message.sr25519 = reader.bytes(); + m.sr25519 = r.bytes(); break; case 4: - message.multisig = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.decode(reader, reader.uint32()); + m.multisig = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.decode(r, r.uint32()); break; case 5: - message.secp256r1 = reader.bytes(); + m.secp256r1 = r.bytes(); break; case 15: - message.anyPubkey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + m.anyPubkey = $root.google.protobuf.Any.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a PublicKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublicKey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublicKey message. - * @function verify - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublicKey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { - properties.sum = 1; - if (!(message.secp256k1 && typeof message.secp256k1.length === "number" || $util.isString(message.secp256k1))) - return "secp256k1: buffer expected"; - } - if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { - if (properties.sum === 1) - return "sum: multiple values"; - properties.sum = 1; - if (!(message.ed25519 && typeof message.ed25519.length === "number" || $util.isString(message.ed25519))) - return "ed25519: buffer expected"; - } - if (message.sr25519 != null && message.hasOwnProperty("sr25519")) { - if (properties.sum === 1) - return "sum: multiple values"; - properties.sum = 1; - if (!(message.sr25519 && typeof message.sr25519.length === "number" || $util.isString(message.sr25519))) - return "sr25519: buffer expected"; - } - if (message.multisig != null && message.hasOwnProperty("multisig")) { - if (properties.sum === 1) - return "sum: multiple values"; - properties.sum = 1; - { - var error = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify(message.multisig); - if (error) - return "multisig." + error; - } - } - if (message.secp256r1 != null && message.hasOwnProperty("secp256r1")) { - if (properties.sum === 1) - return "sum: multiple values"; - properties.sum = 1; - if (!(message.secp256r1 && typeof message.secp256r1.length === "number" || $util.isString(message.secp256r1))) - return "secp256r1: buffer expected"; - } - if (message.anyPubkey != null && message.hasOwnProperty("anyPubkey")) { - if (properties.sum === 1) - return "sum: multiple values"; - properties.sum = 1; - { - var error = $root.google.protobuf.Any.verify(message.anyPubkey); - if (error) - return "anyPubkey." + error; - } - } - return null; - }; - - /** - * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey - */ - PublicKey.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.crypto.v1.PublicKey) - return object; - var message = new $root.cosmos_sdk.crypto.v1.PublicKey(); - if (object.secp256k1 != null) - if (typeof object.secp256k1 === "string") - $util.base64.decode(object.secp256k1, message.secp256k1 = $util.newBuffer($util.base64.length(object.secp256k1)), 0); - else if (object.secp256k1.length) - message.secp256k1 = object.secp256k1; - if (object.ed25519 != null) - if (typeof object.ed25519 === "string") - $util.base64.decode(object.ed25519, message.ed25519 = $util.newBuffer($util.base64.length(object.ed25519)), 0); - else if (object.ed25519.length) - message.ed25519 = object.ed25519; - if (object.sr25519 != null) - if (typeof object.sr25519 === "string") - $util.base64.decode(object.sr25519, message.sr25519 = $util.newBuffer($util.base64.length(object.sr25519)), 0); - else if (object.sr25519.length) - message.sr25519 = object.sr25519; - if (object.multisig != null) { - if (typeof object.multisig !== "object") - throw TypeError(".cosmos_sdk.crypto.v1.PublicKey.multisig: object expected"); - message.multisig = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.fromObject(object.multisig); - } - if (object.secp256r1 != null) - if (typeof object.secp256r1 === "string") - $util.base64.decode(object.secp256r1, message.secp256r1 = $util.newBuffer($util.base64.length(object.secp256r1)), 0); - else if (object.secp256r1.length) - message.secp256r1 = object.secp256r1; - if (object.anyPubkey != null) { - if (typeof object.anyPubkey !== "object") - throw TypeError(".cosmos_sdk.crypto.v1.PublicKey.anyPubkey: object expected"); - message.anyPubkey = $root.google.protobuf.Any.fromObject(object.anyPubkey); - } - return message; - }; - - /** - * Creates a plain object from a PublicKey message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {cosmos_sdk.crypto.v1.PublicKey} message PublicKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublicKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.secp256k1 != null && message.hasOwnProperty("secp256k1")) { - object.secp256k1 = options.bytes === String ? $util.base64.encode(message.secp256k1, 0, message.secp256k1.length) : options.bytes === Array ? Array.prototype.slice.call(message.secp256k1) : message.secp256k1; - if (options.oneofs) - object.sum = "secp256k1"; - } - if (message.ed25519 != null && message.hasOwnProperty("ed25519")) { - object.ed25519 = options.bytes === String ? $util.base64.encode(message.ed25519, 0, message.ed25519.length) : options.bytes === Array ? Array.prototype.slice.call(message.ed25519) : message.ed25519; - if (options.oneofs) - object.sum = "ed25519"; - } - if (message.sr25519 != null && message.hasOwnProperty("sr25519")) { - object.sr25519 = options.bytes === String ? $util.base64.encode(message.sr25519, 0, message.sr25519.length) : options.bytes === Array ? Array.prototype.slice.call(message.sr25519) : message.sr25519; - if (options.oneofs) - object.sum = "sr25519"; - } - if (message.multisig != null && message.hasOwnProperty("multisig")) { - object.multisig = $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.toObject(message.multisig, options); - if (options.oneofs) - object.sum = "multisig"; - } - if (message.secp256r1 != null && message.hasOwnProperty("secp256r1")) { - object.secp256r1 = options.bytes === String ? $util.base64.encode(message.secp256r1, 0, message.secp256r1.length) : options.bytes === Array ? Array.prototype.slice.call(message.secp256r1) : message.secp256r1; - if (options.oneofs) - object.sum = "secp256r1"; - } - if (message.anyPubkey != null && message.hasOwnProperty("anyPubkey")) { - object.anyPubkey = $root.google.protobuf.Any.toObject(message.anyPubkey, options); - if (options.oneofs) - object.sum = "anyPubkey"; - } - return object; - }; - - /** - * Converts this PublicKey to JSON. - * @function toJSON - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - * @returns {Object.} JSON object - */ - PublicKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return PublicKey; @@ -2318,7 +1224,7 @@ $root.cosmos_sdk = (function() { * @memberof cosmos_sdk.crypto.v1 * @interface IPubKeyMultisigThreshold * @property {number|null} [threshold] PubKeyMultisigThreshold threshold - * @property {Array.|null} [pubkeys] PubKeyMultisigThreshold pubkeys + * @property {Array.|null} [publicKeys] PubKeyMultisigThreshold publicKeys */ /** @@ -2327,14 +1233,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a PubKeyMultisigThreshold. * @implements IPubKeyMultisigThreshold * @constructor - * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [properties] Properties to set + * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [p] Properties to set */ - function PubKeyMultisigThreshold(properties) { - this.pubkeys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -2346,12 +1252,12 @@ $root.cosmos_sdk = (function() { PubKeyMultisigThreshold.prototype.threshold = 0; /** - * PubKeyMultisigThreshold pubkeys. - * @member {Array.} pubkeys + * PubKeyMultisigThreshold publicKeys. + * @member {Array.} publicKeys * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold * @instance */ - PubKeyMultisigThreshold.prototype.pubkeys = $util.emptyArray; + PubKeyMultisigThreshold.prototype.publicKeys = $util.emptyArray; /** * Creates a new PubKeyMultisigThreshold instance using the specified properties. @@ -2370,32 +1276,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold * @static - * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold} message PubKeyMultisigThreshold message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold} m PubKeyMultisigThreshold message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PubKeyMultisigThreshold.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.threshold != null && Object.hasOwnProperty.call(message, "threshold")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.threshold); - if (message.pubkeys != null && message.pubkeys.length) - for (var i = 0; i < message.pubkeys.length; ++i) - $root.cosmos_sdk.crypto.v1.PublicKey.encode(message.pubkeys[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PubKeyMultisigThreshold message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold} message PubKeyMultisigThreshold message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubKeyMultisigThreshold.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -2403,140 +1297,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PubKeyMultisigThreshold.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.threshold = reader.uint32(); + m.threshold = r.uint32(); break; case 2: - if (!(message.pubkeys && message.pubkeys.length)) - message.pubkeys = []; - message.pubkeys.push($root.cosmos_sdk.crypto.v1.PublicKey.decode(reader, reader.uint32())); + if (!(m.publicKeys && m.publicKeys.length)) + m.publicKeys = []; + m.publicKeys.push($root.cosmos_sdk.crypto.v1.PublicKey.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubKeyMultisigThreshold.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PubKeyMultisigThreshold message. - * @function verify - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PubKeyMultisigThreshold.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.threshold != null && message.hasOwnProperty("threshold")) - if (!$util.isInteger(message.threshold)) - return "threshold: integer expected"; - if (message.pubkeys != null && message.hasOwnProperty("pubkeys")) { - if (!Array.isArray(message.pubkeys)) - return "pubkeys: array expected"; - for (var i = 0; i < message.pubkeys.length; ++i) { - var error = $root.cosmos_sdk.crypto.v1.PublicKey.verify(message.pubkeys[i]); - if (error) - return "pubkeys." + error; - } - } - return null; - }; - - /** - * Creates a PubKeyMultisigThreshold message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold - */ - PubKeyMultisigThreshold.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold) - return object; - var message = new $root.cosmos_sdk.crypto.v1.PubKeyMultisigThreshold(); - if (object.threshold != null) - message.threshold = object.threshold >>> 0; - if (object.pubkeys) { - if (!Array.isArray(object.pubkeys)) - throw TypeError(".cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.pubkeys: array expected"); - message.pubkeys = []; - for (var i = 0; i < object.pubkeys.length; ++i) { - if (typeof object.pubkeys[i] !== "object") - throw TypeError(".cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.pubkeys: object expected"); - message.pubkeys[i] = $root.cosmos_sdk.crypto.v1.PublicKey.fromObject(object.pubkeys[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PubKeyMultisigThreshold message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} message PubKeyMultisigThreshold - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PubKeyMultisigThreshold.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pubkeys = []; - if (options.defaults) - object.threshold = 0; - if (message.threshold != null && message.hasOwnProperty("threshold")) - object.threshold = message.threshold; - if (message.pubkeys && message.pubkeys.length) { - object.pubkeys = []; - for (var j = 0; j < message.pubkeys.length; ++j) - object.pubkeys[j] = $root.cosmos_sdk.crypto.v1.PublicKey.toObject(message.pubkeys[j], options); - } - return object; - }; - - /** - * Converts this PubKeyMultisigThreshold to JSON. - * @function toJSON - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @instance - * @returns {Object.} JSON object - */ - PubKeyMultisigThreshold.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return PubKeyMultisigThreshold; @@ -2548,7 +1335,7 @@ $root.cosmos_sdk = (function() { * Properties of a MultiSignature. * @memberof cosmos_sdk.crypto.v1 * @interface IMultiSignature - * @property {Array.|null} [sigs] MultiSignature sigs + * @property {Array.|null} [signatures] MultiSignature signatures */ /** @@ -2557,23 +1344,23 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MultiSignature. * @implements IMultiSignature * @constructor - * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [properties] Properties to set + * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [p] Properties to set */ - function MultiSignature(properties) { - this.sigs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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 sigs. - * @member {Array.} sigs + * MultiSignature signatures. + * @member {Array.} signatures * @memberof cosmos_sdk.crypto.v1.MultiSignature * @instance */ - MultiSignature.prototype.sigs = $util.emptyArray; + MultiSignature.prototype.signatures = $util.emptyArray; /** * Creates a new MultiSignature instance using the specified properties. @@ -2592,30 +1379,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.crypto.v1.MultiSignature * @static - * @param {cosmos_sdk.crypto.v1.IMultiSignature} message MultiSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.crypto.v1.IMultiSignature} m MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MultiSignature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sigs != null && message.sigs.length) - for (var i = 0; i < message.sigs.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sigs[i]); - return writer; - }; - - /** - * Encodes the specified MultiSignature message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {cosmos_sdk.crypto.v1.IMultiSignature} message MultiSignature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MultiSignature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -2623,126 +1398,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.crypto.v1.MultiSignature * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MultiSignature.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.crypto.v1.MultiSignature(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.sigs && message.sigs.length)) - message.sigs = []; - message.sigs.push(reader.bytes()); + if (!(m.signatures && m.signatures.length)) + m.signatures = []; + m.signatures.push(r.bytes()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MultiSignature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MultiSignature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MultiSignature message. - * @function verify - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MultiSignature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sigs != null && message.hasOwnProperty("sigs")) { - if (!Array.isArray(message.sigs)) - return "sigs: array expected"; - for (var i = 0; i < message.sigs.length; ++i) - if (!(message.sigs[i] && typeof message.sigs[i].length === "number" || $util.isString(message.sigs[i]))) - return "sigs: buffer[] expected"; - } - return null; - }; - - /** - * Creates a MultiSignature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature - */ - MultiSignature.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.crypto.v1.MultiSignature) - return object; - var message = new $root.cosmos_sdk.crypto.v1.MultiSignature(); - if (object.sigs) { - if (!Array.isArray(object.sigs)) - throw TypeError(".cosmos_sdk.crypto.v1.MultiSignature.sigs: array expected"); - message.sigs = []; - for (var i = 0; i < object.sigs.length; ++i) - if (typeof object.sigs[i] === "string") - $util.base64.decode(object.sigs[i], message.sigs[i] = $util.newBuffer($util.base64.length(object.sigs[i])), 0); - else if (object.sigs[i].length) - message.sigs[i] = object.sigs[i]; - } - return message; - }; - - /** - * Creates a plain object from a MultiSignature message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {cosmos_sdk.crypto.v1.MultiSignature} message MultiSignature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MultiSignature.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.sigs = []; - if (message.sigs && message.sigs.length) { - object.sigs = []; - for (var j = 0; j < message.sigs.length; ++j) - object.sigs[j] = options.bytes === String ? $util.base64.encode(message.sigs[j], 0, message.sigs[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.sigs[j]) : message.sigs[j]; - } - return object; - }; - - /** - * Converts this MultiSignature to JSON. - * @function toJSON - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @instance - * @returns {Object.} JSON object - */ - MultiSignature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MultiSignature; @@ -2764,13 +1443,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a CompactBitArray. * @implements ICompactBitArray * @constructor - * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [properties] Properties to set + * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [p] Properties to set */ - function CompactBitArray(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -2806,31 +1485,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.crypto.v1.CompactBitArray * @static - * @param {cosmos_sdk.crypto.v1.ICompactBitArray} message CompactBitArray message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.crypto.v1.ICompactBitArray} m CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CompactBitArray.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.extraBitsStored != null && Object.hasOwnProperty.call(message, "extraBitsStored")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.extraBitsStored); - if (message.elems != null && Object.hasOwnProperty.call(message, "elems")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.elems); - return writer; - }; - - /** - * Encodes the specified CompactBitArray message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {cosmos_sdk.crypto.v1.ICompactBitArray} message CompactBitArray message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CompactBitArray.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -2838,130 +1504,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.crypto.v1.CompactBitArray * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CompactBitArray.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.crypto.v1.CompactBitArray(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.extraBitsStored = reader.uint32(); + m.extraBitsStored = r.uint32(); break; case 2: - message.elems = reader.bytes(); + m.elems = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a CompactBitArray message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CompactBitArray.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CompactBitArray message. - * @function verify - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CompactBitArray.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) - if (!$util.isInteger(message.extraBitsStored)) - return "extraBitsStored: integer expected"; - if (message.elems != null && message.hasOwnProperty("elems")) - if (!(message.elems && typeof message.elems.length === "number" || $util.isString(message.elems))) - return "elems: buffer expected"; - return null; - }; - - /** - * Creates a CompactBitArray message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray - */ - CompactBitArray.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.crypto.v1.CompactBitArray) - return object; - var message = new $root.cosmos_sdk.crypto.v1.CompactBitArray(); - if (object.extraBitsStored != null) - message.extraBitsStored = object.extraBitsStored >>> 0; - if (object.elems != null) - if (typeof object.elems === "string") - $util.base64.decode(object.elems, message.elems = $util.newBuffer($util.base64.length(object.elems)), 0); - else if (object.elems.length) - message.elems = object.elems; - return message; - }; - - /** - * Creates a plain object from a CompactBitArray message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {cosmos_sdk.crypto.v1.CompactBitArray} message CompactBitArray - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CompactBitArray.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.extraBitsStored = 0; - if (options.bytes === String) - object.elems = ""; - else { - object.elems = []; - if (options.bytes !== Array) - object.elems = $util.newBuffer(object.elems); - } - } - if (message.extraBitsStored != null && message.hasOwnProperty("extraBitsStored")) - object.extraBitsStored = message.extraBitsStored; - if (message.elems != null && message.hasOwnProperty("elems")) - object.elems = options.bytes === String ? $util.base64.encode(message.elems, 0, message.elems.length) : options.bytes === Array ? Array.prototype.slice.call(message.elems) : message.elems; - return object; - }; - - /** - * Converts this CompactBitArray to JSON. - * @function toJSON - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @instance - * @returns {Object.} JSON object - */ - CompactBitArray.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return CompactBitArray; @@ -2982,6 +1549,48 @@ $root.cosmos_sdk = (function() { */ var tx = {}; + tx.signing = (function() { + + /** + * Namespace signing. + * @memberof cosmos_sdk.tx + * @namespace + */ + var signing = {}; + + signing.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.tx.signing + * @namespace + */ + var v1 = {}; + + /** + * SignMode enum. + * @name cosmos_sdk.tx.signing.v1.SignMode + * @enum {number} + * @property {number} SIGN_MODE_UNSPECIFIED=0 SIGN_MODE_UNSPECIFIED value + * @property {number} SIGN_MODE_DIRECT=1 SIGN_MODE_DIRECT value + * @property {number} SIGN_MODE_TEXTUAL=2 SIGN_MODE_TEXTUAL value + * @property {number} SIGN_MODE_LEGACY_AMINO_JSON=127 SIGN_MODE_LEGACY_AMINO_JSON value + */ + 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; + })(); + tx.v1 = (function() { /** @@ -3008,14 +1617,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Tx. * @implements ITx * @constructor - * @param {cosmos_sdk.tx.v1.ITx=} [properties] Properties to set + * @param {cosmos_sdk.tx.v1.ITx=} [p] Properties to set */ - function Tx(properties) { + function Tx(p) { this.signatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -3059,34 +1668,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.tx.v1.Tx * @static - * @param {cosmos_sdk.tx.v1.ITx} message Tx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.tx.v1.ITx} m Tx message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Tx.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.cosmos_sdk.tx.v1.TxBody.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) - $root.cosmos_sdk.tx.v1.AuthInfo.encode(message.authInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.signatures != null && message.signatures.length) - for (var i = 0; i < message.signatures.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signatures[i]); - return writer; - }; - - /** - * Encodes the specified Tx message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.tx.v1.Tx - * @static - * @param {cosmos_sdk.tx.v1.ITx} message Tx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Tx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -3094,160 +1691,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.tx.v1.Tx * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.tx.v1.Tx} Tx * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Tx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.Tx(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.body = $root.cosmos_sdk.tx.v1.TxBody.decode(reader, reader.uint32()); + m.body = $root.cosmos_sdk.tx.v1.TxBody.decode(r, r.uint32()); break; case 2: - message.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.decode(reader, reader.uint32()); + m.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.decode(r, r.uint32()); break; case 3: - if (!(message.signatures && message.signatures.length)) - message.signatures = []; - message.signatures.push(reader.bytes()); + if (!(m.signatures && m.signatures.length)) + m.signatures = []; + m.signatures.push(r.bytes()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Tx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.tx.v1.Tx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.tx.v1.Tx} Tx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Tx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Tx message. - * @function verify - * @memberof cosmos_sdk.tx.v1.Tx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Tx.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.cosmos_sdk.tx.v1.TxBody.verify(message.body); - if (error) - return "body." + error; - } - if (message.authInfo != null && message.hasOwnProperty("authInfo")) { - var error = $root.cosmos_sdk.tx.v1.AuthInfo.verify(message.authInfo); - if (error) - return "authInfo." + error; - } - if (message.signatures != null && message.hasOwnProperty("signatures")) { - if (!Array.isArray(message.signatures)) - return "signatures: array expected"; - for (var i = 0; i < message.signatures.length; ++i) - if (!(message.signatures[i] && typeof message.signatures[i].length === "number" || $util.isString(message.signatures[i]))) - return "signatures: buffer[] expected"; - } - return null; - }; - - /** - * Creates a Tx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.tx.v1.Tx - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.tx.v1.Tx} Tx - */ - Tx.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.tx.v1.Tx) - return object; - var message = new $root.cosmos_sdk.tx.v1.Tx(); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".cosmos_sdk.tx.v1.Tx.body: object expected"); - message.body = $root.cosmos_sdk.tx.v1.TxBody.fromObject(object.body); - } - if (object.authInfo != null) { - if (typeof object.authInfo !== "object") - throw TypeError(".cosmos_sdk.tx.v1.Tx.authInfo: object expected"); - message.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.fromObject(object.authInfo); - } - if (object.signatures) { - if (!Array.isArray(object.signatures)) - throw TypeError(".cosmos_sdk.tx.v1.Tx.signatures: array expected"); - message.signatures = []; - for (var i = 0; i < object.signatures.length; ++i) - if (typeof object.signatures[i] === "string") - $util.base64.decode(object.signatures[i], message.signatures[i] = $util.newBuffer($util.base64.length(object.signatures[i])), 0); - else if (object.signatures[i].length) - message.signatures[i] = object.signatures[i]; - } - return message; - }; - - /** - * Creates a plain object from a Tx message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.tx.v1.Tx - * @static - * @param {cosmos_sdk.tx.v1.Tx} message Tx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Tx.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.signatures = []; - if (options.defaults) { - object.body = null; - object.authInfo = null; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.cosmos_sdk.tx.v1.TxBody.toObject(message.body, options); - if (message.authInfo != null && message.hasOwnProperty("authInfo")) - object.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.toObject(message.authInfo, options); - if (message.signatures && message.signatures.length) { - object.signatures = []; - for (var j = 0; j < message.signatures.length; ++j) - object.signatures[j] = options.bytes === String ? $util.base64.encode(message.signatures[j], 0, message.signatures[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.signatures[j]) : message.signatures[j]; - } - return object; - }; - - /** - * Converts this Tx to JSON. - * @function toJSON - * @memberof cosmos_sdk.tx.v1.Tx - * @instance - * @returns {Object.} JSON object - */ - Tx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Tx; @@ -3272,13 +1745,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a SignDoc. * @implements ISignDoc * @constructor - * @param {cosmos_sdk.tx.v1.ISignDoc=} [properties] Properties to set + * @param {cosmos_sdk.tx.v1.ISignDoc=} [p] Properties to set */ - function SignDoc(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -3338,37 +1811,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.tx.v1.SignDoc * @static - * @param {cosmos_sdk.tx.v1.ISignDoc} message SignDoc message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.tx.v1.ISignDoc} m SignDoc message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SignDoc.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - $root.cosmos_sdk.tx.v1.TxBody.encode(message.body, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.authInfo != null && Object.hasOwnProperty.call(message, "authInfo")) - $root.cosmos_sdk.tx.v1.AuthInfo.encode(message.authInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.chainId); - if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.accountNumber); - if (message.accountSequence != null && Object.hasOwnProperty.call(message, "accountSequence")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.accountSequence); - return writer; - }; - - /** - * Encodes the specified SignDoc message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.tx.v1.SignDoc - * @static - * @param {cosmos_sdk.tx.v1.ISignDoc} message SignDoc message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignDoc.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -3376,192 +1836,40 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.tx.v1.SignDoc * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.tx.v1.SignDoc} SignDoc * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SignDoc.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.SignDoc(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.body = $root.cosmos_sdk.tx.v1.TxBody.decode(reader, reader.uint32()); + m.body = $root.cosmos_sdk.tx.v1.TxBody.decode(r, r.uint32()); break; case 2: - message.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.decode(reader, reader.uint32()); + m.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.decode(r, r.uint32()); break; case 3: - message.chainId = reader.string(); + m.chainId = r.string(); break; case 4: - message.accountNumber = reader.uint64(); + m.accountNumber = r.uint64(); break; case 5: - message.accountSequence = reader.uint64(); + m.accountSequence = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a SignDoc message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.tx.v1.SignDoc - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.tx.v1.SignDoc} SignDoc - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignDoc.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignDoc message. - * @function verify - * @memberof cosmos_sdk.tx.v1.SignDoc - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignDoc.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.body != null && message.hasOwnProperty("body")) { - var error = $root.cosmos_sdk.tx.v1.TxBody.verify(message.body); - if (error) - return "body." + error; - } - if (message.authInfo != null && message.hasOwnProperty("authInfo")) { - var error = $root.cosmos_sdk.tx.v1.AuthInfo.verify(message.authInfo); - if (error) - return "authInfo." + error; - } - if (message.chainId != null && message.hasOwnProperty("chainId")) - if (!$util.isString(message.chainId)) - return "chainId: string expected"; - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - if (!$util.isInteger(message.accountNumber) && !(message.accountNumber && $util.isInteger(message.accountNumber.low) && $util.isInteger(message.accountNumber.high))) - return "accountNumber: integer|Long expected"; - if (message.accountSequence != null && message.hasOwnProperty("accountSequence")) - if (!$util.isInteger(message.accountSequence) && !(message.accountSequence && $util.isInteger(message.accountSequence.low) && $util.isInteger(message.accountSequence.high))) - return "accountSequence: integer|Long expected"; - return null; - }; - - /** - * Creates a SignDoc message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.tx.v1.SignDoc - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.tx.v1.SignDoc} SignDoc - */ - SignDoc.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.tx.v1.SignDoc) - return object; - var message = new $root.cosmos_sdk.tx.v1.SignDoc(); - if (object.body != null) { - if (typeof object.body !== "object") - throw TypeError(".cosmos_sdk.tx.v1.SignDoc.body: object expected"); - message.body = $root.cosmos_sdk.tx.v1.TxBody.fromObject(object.body); - } - if (object.authInfo != null) { - if (typeof object.authInfo !== "object") - throw TypeError(".cosmos_sdk.tx.v1.SignDoc.authInfo: object expected"); - message.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.fromObject(object.authInfo); - } - if (object.chainId != null) - message.chainId = String(object.chainId); - if (object.accountNumber != null) - if ($util.Long) - (message.accountNumber = $util.Long.fromValue(object.accountNumber)).unsigned = true; - else if (typeof object.accountNumber === "string") - message.accountNumber = parseInt(object.accountNumber, 10); - else if (typeof object.accountNumber === "number") - message.accountNumber = object.accountNumber; - else if (typeof object.accountNumber === "object") - message.accountNumber = new $util.LongBits(object.accountNumber.low >>> 0, object.accountNumber.high >>> 0).toNumber(true); - if (object.accountSequence != null) - if ($util.Long) - (message.accountSequence = $util.Long.fromValue(object.accountSequence)).unsigned = true; - else if (typeof object.accountSequence === "string") - message.accountSequence = parseInt(object.accountSequence, 10); - else if (typeof object.accountSequence === "number") - message.accountSequence = object.accountSequence; - else if (typeof object.accountSequence === "object") - message.accountSequence = new $util.LongBits(object.accountSequence.low >>> 0, object.accountSequence.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a SignDoc message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.tx.v1.SignDoc - * @static - * @param {cosmos_sdk.tx.v1.SignDoc} message SignDoc - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignDoc.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.body = null; - object.authInfo = null; - object.chainId = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.accountNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.accountNumber = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.accountSequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.accountSequence = options.longs === String ? "0" : 0; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = $root.cosmos_sdk.tx.v1.TxBody.toObject(message.body, options); - if (message.authInfo != null && message.hasOwnProperty("authInfo")) - object.authInfo = $root.cosmos_sdk.tx.v1.AuthInfo.toObject(message.authInfo, options); - if (message.chainId != null && message.hasOwnProperty("chainId")) - object.chainId = message.chainId; - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - if (typeof message.accountNumber === "number") - object.accountNumber = options.longs === String ? String(message.accountNumber) : message.accountNumber; - else - object.accountNumber = options.longs === String ? $util.Long.prototype.toString.call(message.accountNumber) : options.longs === Number ? new $util.LongBits(message.accountNumber.low >>> 0, message.accountNumber.high >>> 0).toNumber(true) : message.accountNumber; - if (message.accountSequence != null && message.hasOwnProperty("accountSequence")) - if (typeof message.accountSequence === "number") - object.accountSequence = options.longs === String ? String(message.accountSequence) : message.accountSequence; - else - object.accountSequence = options.longs === String ? $util.Long.prototype.toString.call(message.accountSequence) : options.longs === Number ? new $util.LongBits(message.accountSequence.low >>> 0, message.accountSequence.high >>> 0).toNumber(true) : message.accountSequence; - return object; - }; - - /** - * Converts this SignDoc to JSON. - * @function toJSON - * @memberof cosmos_sdk.tx.v1.SignDoc - * @instance - * @returns {Object.} JSON object - */ - SignDoc.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return SignDoc; @@ -3586,16 +1894,16 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a TxBody. * @implements ITxBody * @constructor - * @param {cosmos_sdk.tx.v1.ITxBody=} [properties] Properties to set + * @param {cosmos_sdk.tx.v1.ITxBody=} [p] Properties to set */ - function TxBody(properties) { + function TxBody(p) { this.messages = []; this.extensionOptions = []; this.nonCriticalExtensionOptions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -3655,40 +1963,30 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.tx.v1.TxBody * @static - * @param {cosmos_sdk.tx.v1.ITxBody} message TxBody message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.tx.v1.ITxBody} m TxBody message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TxBody.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.google.protobuf.Any.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.memo != null && Object.hasOwnProperty.call(message, "memo")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.memo); - if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.timeoutHeight); - if (message.extensionOptions != null && message.extensionOptions.length) - for (var i = 0; i < message.extensionOptions.length; ++i) - $root.google.protobuf.Any.encode(message.extensionOptions[i], writer.uint32(/* id 1023, wireType 2 =*/8186).fork()).ldelim(); - if (message.nonCriticalExtensionOptions != null && message.nonCriticalExtensionOptions.length) - for (var i = 0; i < message.nonCriticalExtensionOptions.length; ++i) - $root.google.protobuf.Any.encode(message.nonCriticalExtensionOptions[i], writer.uint32(/* id 2047, wireType 2 =*/16378).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TxBody message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.tx.v1.TxBody - * @static - * @param {cosmos_sdk.tx.v1.ITxBody} message TxBody message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxBody.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -3696,227 +1994,46 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.tx.v1.TxBody * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.tx.v1.TxBody} TxBody * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TxBody.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.TxBody(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + if (!(m.messages && m.messages.length)) + m.messages = []; + m.messages.push($root.google.protobuf.Any.decode(r, r.uint32())); break; case 2: - message.memo = reader.string(); + m.memo = r.string(); break; case 3: - message.timeoutHeight = reader.int64(); + m.timeoutHeight = r.int64(); break; case 1023: - if (!(message.extensionOptions && message.extensionOptions.length)) - message.extensionOptions = []; - message.extensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + if (!(m.extensionOptions && m.extensionOptions.length)) + m.extensionOptions = []; + m.extensionOptions.push($root.google.protobuf.Any.decode(r, r.uint32())); break; case 2047: - if (!(message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length)) - message.nonCriticalExtensionOptions = []; - message.nonCriticalExtensionOptions.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + if (!(m.nonCriticalExtensionOptions && m.nonCriticalExtensionOptions.length)) + m.nonCriticalExtensionOptions = []; + m.nonCriticalExtensionOptions.push($root.google.protobuf.Any.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a TxBody message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.tx.v1.TxBody - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.tx.v1.TxBody} TxBody - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxBody.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TxBody message. - * @function verify - * @memberof cosmos_sdk.tx.v1.TxBody - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TxBody.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messages != null && message.hasOwnProperty("messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.messages[i]); - if (error) - return "messages." + error; - } - } - if (message.memo != null && message.hasOwnProperty("memo")) - if (!$util.isString(message.memo)) - return "memo: string expected"; - if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) - if (!$util.isInteger(message.timeoutHeight) && !(message.timeoutHeight && $util.isInteger(message.timeoutHeight.low) && $util.isInteger(message.timeoutHeight.high))) - return "timeoutHeight: integer|Long expected"; - if (message.extensionOptions != null && message.hasOwnProperty("extensionOptions")) { - if (!Array.isArray(message.extensionOptions)) - return "extensionOptions: array expected"; - for (var i = 0; i < message.extensionOptions.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.extensionOptions[i]); - if (error) - return "extensionOptions." + error; - } - } - if (message.nonCriticalExtensionOptions != null && message.hasOwnProperty("nonCriticalExtensionOptions")) { - if (!Array.isArray(message.nonCriticalExtensionOptions)) - return "nonCriticalExtensionOptions: array expected"; - for (var i = 0; i < message.nonCriticalExtensionOptions.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.nonCriticalExtensionOptions[i]); - if (error) - return "nonCriticalExtensionOptions." + error; - } - } - return null; - }; - - /** - * Creates a TxBody message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.tx.v1.TxBody - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.tx.v1.TxBody} TxBody - */ - TxBody.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.tx.v1.TxBody) - return object; - var message = new $root.cosmos_sdk.tx.v1.TxBody(); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".cosmos_sdk.tx.v1.TxBody.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (typeof object.messages[i] !== "object") - throw TypeError(".cosmos_sdk.tx.v1.TxBody.messages: object expected"); - message.messages[i] = $root.google.protobuf.Any.fromObject(object.messages[i]); - } - } - if (object.memo != null) - message.memo = String(object.memo); - if (object.timeoutHeight != null) - if ($util.Long) - (message.timeoutHeight = $util.Long.fromValue(object.timeoutHeight)).unsigned = false; - else if (typeof object.timeoutHeight === "string") - message.timeoutHeight = parseInt(object.timeoutHeight, 10); - else if (typeof object.timeoutHeight === "number") - message.timeoutHeight = object.timeoutHeight; - else if (typeof object.timeoutHeight === "object") - message.timeoutHeight = new $util.LongBits(object.timeoutHeight.low >>> 0, object.timeoutHeight.high >>> 0).toNumber(); - if (object.extensionOptions) { - if (!Array.isArray(object.extensionOptions)) - throw TypeError(".cosmos_sdk.tx.v1.TxBody.extensionOptions: array expected"); - message.extensionOptions = []; - for (var i = 0; i < object.extensionOptions.length; ++i) { - if (typeof object.extensionOptions[i] !== "object") - throw TypeError(".cosmos_sdk.tx.v1.TxBody.extensionOptions: object expected"); - message.extensionOptions[i] = $root.google.protobuf.Any.fromObject(object.extensionOptions[i]); - } - } - if (object.nonCriticalExtensionOptions) { - if (!Array.isArray(object.nonCriticalExtensionOptions)) - throw TypeError(".cosmos_sdk.tx.v1.TxBody.nonCriticalExtensionOptions: array expected"); - message.nonCriticalExtensionOptions = []; - for (var i = 0; i < object.nonCriticalExtensionOptions.length; ++i) { - if (typeof object.nonCriticalExtensionOptions[i] !== "object") - throw TypeError(".cosmos_sdk.tx.v1.TxBody.nonCriticalExtensionOptions: object expected"); - message.nonCriticalExtensionOptions[i] = $root.google.protobuf.Any.fromObject(object.nonCriticalExtensionOptions[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TxBody message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.tx.v1.TxBody - * @static - * @param {cosmos_sdk.tx.v1.TxBody} message TxBody - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TxBody.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.messages = []; - object.extensionOptions = []; - object.nonCriticalExtensionOptions = []; - } - if (options.defaults) { - object.memo = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.timeoutHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeoutHeight = options.longs === String ? "0" : 0; - } - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.protobuf.Any.toObject(message.messages[j], options); - } - if (message.memo != null && message.hasOwnProperty("memo")) - object.memo = message.memo; - if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) - if (typeof message.timeoutHeight === "number") - object.timeoutHeight = options.longs === String ? String(message.timeoutHeight) : message.timeoutHeight; - else - object.timeoutHeight = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutHeight) : options.longs === Number ? new $util.LongBits(message.timeoutHeight.low >>> 0, message.timeoutHeight.high >>> 0).toNumber() : message.timeoutHeight; - if (message.extensionOptions && message.extensionOptions.length) { - object.extensionOptions = []; - for (var j = 0; j < message.extensionOptions.length; ++j) - object.extensionOptions[j] = $root.google.protobuf.Any.toObject(message.extensionOptions[j], options); - } - if (message.nonCriticalExtensionOptions && message.nonCriticalExtensionOptions.length) { - object.nonCriticalExtensionOptions = []; - for (var j = 0; j < message.nonCriticalExtensionOptions.length; ++j) - object.nonCriticalExtensionOptions[j] = $root.google.protobuf.Any.toObject(message.nonCriticalExtensionOptions[j], options); - } - return object; - }; - - /** - * Converts this TxBody to JSON. - * @function toJSON - * @memberof cosmos_sdk.tx.v1.TxBody - * @instance - * @returns {Object.} JSON object - */ - TxBody.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return TxBody; @@ -3938,14 +2055,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an AuthInfo. * @implements IAuthInfo * @constructor - * @param {cosmos_sdk.tx.v1.IAuthInfo=} [properties] Properties to set + * @param {cosmos_sdk.tx.v1.IAuthInfo=} [p] Properties to set */ - function AuthInfo(properties) { + function AuthInfo(p) { this.signerInfos = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -3981,32 +2098,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.tx.v1.AuthInfo * @static - * @param {cosmos_sdk.tx.v1.IAuthInfo} message AuthInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.tx.v1.IAuthInfo} m AuthInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AuthInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signerInfos != null && message.signerInfos.length) - for (var i = 0; i < message.signerInfos.length; ++i) - $root.cosmos_sdk.tx.v1.SignerInfo.encode(message.signerInfos[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fee != null && Object.hasOwnProperty.call(message, "fee")) - $root.cosmos_sdk.tx.v1.Fee.encode(message.fee, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AuthInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @static - * @param {cosmos_sdk.tx.v1.IAuthInfo} message AuthInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AuthInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -4014,145 +2119,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.tx.v1.AuthInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.tx.v1.AuthInfo} AuthInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AuthInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.AuthInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.signerInfos && message.signerInfos.length)) - message.signerInfos = []; - message.signerInfos.push($root.cosmos_sdk.tx.v1.SignerInfo.decode(reader, reader.uint32())); + if (!(m.signerInfos && m.signerInfos.length)) + m.signerInfos = []; + m.signerInfos.push($root.cosmos_sdk.tx.v1.SignerInfo.decode(r, r.uint32())); break; case 2: - message.fee = $root.cosmos_sdk.tx.v1.Fee.decode(reader, reader.uint32()); + m.fee = $root.cosmos_sdk.tx.v1.Fee.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an AuthInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.tx.v1.AuthInfo} AuthInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AuthInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AuthInfo message. - * @function verify - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AuthInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signerInfos != null && message.hasOwnProperty("signerInfos")) { - if (!Array.isArray(message.signerInfos)) - return "signerInfos: array expected"; - for (var i = 0; i < message.signerInfos.length; ++i) { - var error = $root.cosmos_sdk.tx.v1.SignerInfo.verify(message.signerInfos[i]); - if (error) - return "signerInfos." + error; - } - } - if (message.fee != null && message.hasOwnProperty("fee")) { - var error = $root.cosmos_sdk.tx.v1.Fee.verify(message.fee); - if (error) - return "fee." + error; - } - return null; - }; - - /** - * Creates an AuthInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.tx.v1.AuthInfo} AuthInfo - */ - AuthInfo.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.tx.v1.AuthInfo) - return object; - var message = new $root.cosmos_sdk.tx.v1.AuthInfo(); - if (object.signerInfos) { - if (!Array.isArray(object.signerInfos)) - throw TypeError(".cosmos_sdk.tx.v1.AuthInfo.signerInfos: array expected"); - message.signerInfos = []; - for (var i = 0; i < object.signerInfos.length; ++i) { - if (typeof object.signerInfos[i] !== "object") - throw TypeError(".cosmos_sdk.tx.v1.AuthInfo.signerInfos: object expected"); - message.signerInfos[i] = $root.cosmos_sdk.tx.v1.SignerInfo.fromObject(object.signerInfos[i]); - } - } - if (object.fee != null) { - if (typeof object.fee !== "object") - throw TypeError(".cosmos_sdk.tx.v1.AuthInfo.fee: object expected"); - message.fee = $root.cosmos_sdk.tx.v1.Fee.fromObject(object.fee); - } - return message; - }; - - /** - * Creates a plain object from an AuthInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @static - * @param {cosmos_sdk.tx.v1.AuthInfo} message AuthInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AuthInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.signerInfos = []; - if (options.defaults) - object.fee = null; - if (message.signerInfos && message.signerInfos.length) { - object.signerInfos = []; - for (var j = 0; j < message.signerInfos.length; ++j) - object.signerInfos[j] = $root.cosmos_sdk.tx.v1.SignerInfo.toObject(message.signerInfos[j], options); - } - if (message.fee != null && message.hasOwnProperty("fee")) - object.fee = $root.cosmos_sdk.tx.v1.Fee.toObject(message.fee, options); - return object; - }; - - /** - * Converts this AuthInfo to JSON. - * @function toJSON - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @instance - * @returns {Object.} JSON object - */ - AuthInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return AuthInfo; @@ -4174,13 +2167,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a SignerInfo. * @implements ISignerInfo * @constructor - * @param {cosmos_sdk.tx.v1.ISignerInfo=} [properties] Properties to set + * @param {cosmos_sdk.tx.v1.ISignerInfo=} [p] Properties to set */ - function SignerInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -4216,31 +2209,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.tx.v1.SignerInfo * @static - * @param {cosmos_sdk.tx.v1.ISignerInfo} message SignerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.tx.v1.ISignerInfo} m SignerInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SignerInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.publicKey != null && Object.hasOwnProperty.call(message, "publicKey")) - $root.google.protobuf.Any.encode(message.publicKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.modeInfo != null && Object.hasOwnProperty.call(message, "modeInfo")) - $root.cosmos_sdk.tx.v1.ModeInfo.encode(message.modeInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SignerInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @static - * @param {cosmos_sdk.tx.v1.ISignerInfo} message SignerInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SignerInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -4248,131 +2228,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.tx.v1.SignerInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.tx.v1.SignerInfo} SignerInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SignerInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.SignerInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.publicKey = $root.google.protobuf.Any.decode(reader, reader.uint32()); + m.publicKey = $root.google.protobuf.Any.decode(r, r.uint32()); break; case 2: - message.modeInfo = $root.cosmos_sdk.tx.v1.ModeInfo.decode(reader, reader.uint32()); + m.modeInfo = $root.cosmos_sdk.tx.v1.ModeInfo.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a SignerInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.tx.v1.SignerInfo} SignerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SignerInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SignerInfo message. - * @function verify - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SignerInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.publicKey != null && message.hasOwnProperty("publicKey")) { - var error = $root.google.protobuf.Any.verify(message.publicKey); - if (error) - return "publicKey." + error; - } - if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) { - var error = $root.cosmos_sdk.tx.v1.ModeInfo.verify(message.modeInfo); - if (error) - return "modeInfo." + error; - } - return null; - }; - - /** - * Creates a SignerInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.tx.v1.SignerInfo} SignerInfo - */ - SignerInfo.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.tx.v1.SignerInfo) - return object; - var message = new $root.cosmos_sdk.tx.v1.SignerInfo(); - if (object.publicKey != null) { - if (typeof object.publicKey !== "object") - throw TypeError(".cosmos_sdk.tx.v1.SignerInfo.publicKey: object expected"); - message.publicKey = $root.google.protobuf.Any.fromObject(object.publicKey); - } - if (object.modeInfo != null) { - if (typeof object.modeInfo !== "object") - throw TypeError(".cosmos_sdk.tx.v1.SignerInfo.modeInfo: object expected"); - message.modeInfo = $root.cosmos_sdk.tx.v1.ModeInfo.fromObject(object.modeInfo); - } - return message; - }; - - /** - * Creates a plain object from a SignerInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @static - * @param {cosmos_sdk.tx.v1.SignerInfo} message SignerInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SignerInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.publicKey = null; - object.modeInfo = null; - } - if (message.publicKey != null && message.hasOwnProperty("publicKey")) - object.publicKey = $root.google.protobuf.Any.toObject(message.publicKey, options); - if (message.modeInfo != null && message.hasOwnProperty("modeInfo")) - object.modeInfo = $root.cosmos_sdk.tx.v1.ModeInfo.toObject(message.modeInfo, options); - return object; - }; - - /** - * Converts this SignerInfo to JSON. - * @function toJSON - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @instance - * @returns {Object.} JSON object - */ - SignerInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return SignerInfo; @@ -4394,13 +2274,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ModeInfo. * @implements IModeInfo * @constructor - * @param {cosmos_sdk.tx.v1.IModeInfo=} [properties] Properties to set + * @param {cosmos_sdk.tx.v1.IModeInfo=} [p] Properties to set */ - function ModeInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -4450,31 +2330,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.tx.v1.ModeInfo * @static - * @param {cosmos_sdk.tx.v1.IModeInfo} message ModeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.tx.v1.IModeInfo} m ModeInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.single != null && Object.hasOwnProperty.call(message, "single")) - $root.cosmos_sdk.tx.v1.ModeInfo.Single.encode(message.single, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.multi != null && Object.hasOwnProperty.call(message, "multi")) - $root.cosmos_sdk.tx.v1.ModeInfo.Multi.encode(message.multi, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ModeInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @static - * @param {cosmos_sdk.tx.v1.IModeInfo} message ModeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -4482,142 +2349,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.tx.v1.ModeInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.tx.v1.ModeInfo} ModeInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.ModeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.single = $root.cosmos_sdk.tx.v1.ModeInfo.Single.decode(reader, reader.uint32()); + m.single = $root.cosmos_sdk.tx.v1.ModeInfo.Single.decode(r, r.uint32()); break; case 2: - message.multi = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.decode(reader, reader.uint32()); + m.multi = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ModeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.tx.v1.ModeInfo} ModeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModeInfo message. - * @function verify - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.single != null && message.hasOwnProperty("single")) { - properties.sum = 1; - { - var error = $root.cosmos_sdk.tx.v1.ModeInfo.Single.verify(message.single); - if (error) - return "single." + error; - } - } - if (message.multi != null && message.hasOwnProperty("multi")) { - if (properties.sum === 1) - return "sum: multiple values"; - properties.sum = 1; - { - var error = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.verify(message.multi); - if (error) - return "multi." + error; - } - } - return null; - }; - - /** - * Creates a ModeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.tx.v1.ModeInfo} ModeInfo - */ - ModeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.tx.v1.ModeInfo) - return object; - var message = new $root.cosmos_sdk.tx.v1.ModeInfo(); - if (object.single != null) { - if (typeof object.single !== "object") - throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.single: object expected"); - message.single = $root.cosmos_sdk.tx.v1.ModeInfo.Single.fromObject(object.single); - } - if (object.multi != null) { - if (typeof object.multi !== "object") - throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.multi: object expected"); - message.multi = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.fromObject(object.multi); - } - return message; - }; - - /** - * Creates a plain object from a ModeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @static - * @param {cosmos_sdk.tx.v1.ModeInfo} message ModeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.single != null && message.hasOwnProperty("single")) { - object.single = $root.cosmos_sdk.tx.v1.ModeInfo.Single.toObject(message.single, options); - if (options.oneofs) - object.sum = "single"; - } - if (message.multi != null && message.hasOwnProperty("multi")) { - object.multi = $root.cosmos_sdk.tx.v1.ModeInfo.Multi.toObject(message.multi, options); - if (options.oneofs) - object.sum = "multi"; - } - return object; - }; - - /** - * Converts this ModeInfo to JSON. - * @function toJSON - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @instance - * @returns {Object.} JSON object - */ - ModeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; ModeInfo.Single = (function() { @@ -4626,7 +2382,7 @@ $root.cosmos_sdk = (function() { * Properties of a Single. * @memberof cosmos_sdk.tx.v1.ModeInfo * @interface ISingle - * @property {cosmos_sdk.tx.v1.SignMode|null} [mode] Single mode + * @property {cosmos_sdk.tx.signing.v1.SignMode|null} [mode] Single mode */ /** @@ -4635,18 +2391,18 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Single. * @implements ISingle * @constructor - * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle=} [properties] Properties to set + * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle=} [p] Properties to set */ - function Single(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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 mode. - * @member {cosmos_sdk.tx.v1.SignMode} mode + * @member {cosmos_sdk.tx.signing.v1.SignMode} mode * @memberof cosmos_sdk.tx.v1.ModeInfo.Single * @instance */ @@ -4669,29 +2425,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.tx.v1.ModeInfo.Single * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle} message Single message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle} m Single message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Single.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - return writer; - }; - - /** - * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle} message Single message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Single.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -4699,132 +2442,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.tx.v1.ModeInfo.Single * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.tx.v1.ModeInfo.Single} Single * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Single.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.ModeInfo.Single(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.mode = reader.int32(); + m.mode = r.int32(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Single message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.tx.v1.ModeInfo.Single} Single - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Single.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Single message. - * @function verify - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Single.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 127: - break; - } - return null; - }; - - /** - * Creates a Single message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.tx.v1.ModeInfo.Single} Single - */ - Single.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.tx.v1.ModeInfo.Single) - return object; - var message = new $root.cosmos_sdk.tx.v1.ModeInfo.Single(); - switch (object.mode) { - case "SIGN_MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "SIGN_MODE_DIRECT": - case 1: - message.mode = 1; - break; - case "SIGN_MODE_TEXTUAL": - case 2: - message.mode = 2; - break; - case "SIGN_MODE_LEGACY_AMINO_JSON": - case 127: - message.mode = 127; - break; - } - return message; - }; - - /** - * Creates a plain object from a Single message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.Single} message Single - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Single.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.mode = options.enums === String ? "SIGN_MODE_UNSPECIFIED" : 0; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.cosmos_sdk.tx.v1.SignMode[message.mode] : message.mode; - return object; - }; - - /** - * Converts this Single to JSON. - * @function toJSON - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @instance - * @returns {Object.} JSON object - */ - Single.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Single; @@ -4846,14 +2485,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Multi. * @implements IMulti * @constructor - * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti=} [properties] Properties to set + * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti=} [p] Properties to set */ - function Multi(properties) { + function Multi(p) { this.modeInfos = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -4889,32 +2528,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti} message Multi message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti} m Multi message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Multi.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bitarray != null && Object.hasOwnProperty.call(message, "bitarray")) - $root.cosmos_sdk.crypto.v1.CompactBitArray.encode(message.bitarray, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.modeInfos != null && message.modeInfos.length) - for (var i = 0; i < message.modeInfos.length; ++i) - $root.cosmos_sdk.tx.v1.ModeInfo.encode(message.modeInfos[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti} message Multi message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Multi.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -4922,145 +2549,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.tx.v1.ModeInfo.Multi} Multi * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Multi.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.ModeInfo.Multi(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.bitarray = $root.cosmos_sdk.crypto.v1.CompactBitArray.decode(reader, reader.uint32()); + m.bitarray = $root.cosmos_sdk.crypto.v1.CompactBitArray.decode(r, r.uint32()); break; case 2: - if (!(message.modeInfos && message.modeInfos.length)) - message.modeInfos = []; - message.modeInfos.push($root.cosmos_sdk.tx.v1.ModeInfo.decode(reader, reader.uint32())); + if (!(m.modeInfos && m.modeInfos.length)) + m.modeInfos = []; + m.modeInfos.push($root.cosmos_sdk.tx.v1.ModeInfo.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Multi message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.tx.v1.ModeInfo.Multi} Multi - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Multi.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Multi message. - * @function verify - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Multi.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bitarray != null && message.hasOwnProperty("bitarray")) { - var error = $root.cosmos_sdk.crypto.v1.CompactBitArray.verify(message.bitarray); - if (error) - return "bitarray." + error; - } - if (message.modeInfos != null && message.hasOwnProperty("modeInfos")) { - if (!Array.isArray(message.modeInfos)) - return "modeInfos: array expected"; - for (var i = 0; i < message.modeInfos.length; ++i) { - var error = $root.cosmos_sdk.tx.v1.ModeInfo.verify(message.modeInfos[i]); - if (error) - return "modeInfos." + error; - } - } - return null; - }; - - /** - * Creates a Multi message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.tx.v1.ModeInfo.Multi} Multi - */ - Multi.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.tx.v1.ModeInfo.Multi) - return object; - var message = new $root.cosmos_sdk.tx.v1.ModeInfo.Multi(); - if (object.bitarray != null) { - if (typeof object.bitarray !== "object") - throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.Multi.bitarray: object expected"); - message.bitarray = $root.cosmos_sdk.crypto.v1.CompactBitArray.fromObject(object.bitarray); - } - if (object.modeInfos) { - if (!Array.isArray(object.modeInfos)) - throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.Multi.modeInfos: array expected"); - message.modeInfos = []; - for (var i = 0; i < object.modeInfos.length; ++i) { - if (typeof object.modeInfos[i] !== "object") - throw TypeError(".cosmos_sdk.tx.v1.ModeInfo.Multi.modeInfos: object expected"); - message.modeInfos[i] = $root.cosmos_sdk.tx.v1.ModeInfo.fromObject(object.modeInfos[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Multi message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.Multi} message Multi - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Multi.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.modeInfos = []; - if (options.defaults) - object.bitarray = null; - if (message.bitarray != null && message.hasOwnProperty("bitarray")) - object.bitarray = $root.cosmos_sdk.crypto.v1.CompactBitArray.toObject(message.bitarray, options); - if (message.modeInfos && message.modeInfos.length) { - object.modeInfos = []; - for (var j = 0; j < message.modeInfos.length; ++j) - object.modeInfos[j] = $root.cosmos_sdk.tx.v1.ModeInfo.toObject(message.modeInfos[j], options); - } - return object; - }; - - /** - * Converts this Multi to JSON. - * @function toJSON - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @instance - * @returns {Object.} JSON object - */ - Multi.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Multi; @@ -5069,24 +2584,6 @@ $root.cosmos_sdk = (function() { return ModeInfo; })(); - /** - * SignMode enum. - * @name cosmos_sdk.tx.v1.SignMode - * @enum {number} - * @property {number} SIGN_MODE_UNSPECIFIED=0 SIGN_MODE_UNSPECIFIED value - * @property {number} SIGN_MODE_DIRECT=1 SIGN_MODE_DIRECT value - * @property {number} SIGN_MODE_TEXTUAL=2 SIGN_MODE_TEXTUAL value - * @property {number} SIGN_MODE_LEGACY_AMINO_JSON=127 SIGN_MODE_LEGACY_AMINO_JSON value - */ - 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; - })(); - v1.Fee = (function() { /** @@ -5103,14 +2600,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Fee. * @implements IFee * @constructor - * @param {cosmos_sdk.tx.v1.IFee=} [properties] Properties to set + * @param {cosmos_sdk.tx.v1.IFee=} [p] Properties to set */ - function Fee(properties) { + function Fee(p) { this.amount = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -5146,32 +2643,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.tx.v1.Fee * @static - * @param {cosmos_sdk.tx.v1.IFee} message Fee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.tx.v1.IFee} m Fee message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Fee.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.gasLimit != null && Object.hasOwnProperty.call(message, "gasLimit")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.gasLimit); - return writer; - }; - - /** - * Encodes the specified Fee message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.tx.v1.Fee - * @static - * @param {cosmos_sdk.tx.v1.IFee} message Fee message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fee.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -5179,154 +2664,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.tx.v1.Fee * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.tx.v1.Fee} Fee * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Fee.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.tx.v1.Fee(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.amount && m.amount.length)) + m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; case 2: - message.gasLimit = reader.uint64(); + m.gasLimit = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Fee message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.tx.v1.Fee - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.tx.v1.Fee} Fee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Fee.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Fee message. - * @function verify - * @memberof cosmos_sdk.tx.v1.Fee - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Fee.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (var i = 0; i < message.amount.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) - if (!$util.isInteger(message.gasLimit) && !(message.gasLimit && $util.isInteger(message.gasLimit.low) && $util.isInteger(message.gasLimit.high))) - return "gasLimit: integer|Long expected"; - return null; - }; - - /** - * Creates a Fee message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.tx.v1.Fee - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.tx.v1.Fee} Fee - */ - Fee.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.tx.v1.Fee) - return object; - var message = new $root.cosmos_sdk.tx.v1.Fee(); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos_sdk.tx.v1.Fee.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos_sdk.tx.v1.Fee.amount: object expected"); - message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); - } - } - if (object.gasLimit != null) - if ($util.Long) - (message.gasLimit = $util.Long.fromValue(object.gasLimit)).unsigned = true; - else if (typeof object.gasLimit === "string") - message.gasLimit = parseInt(object.gasLimit, 10); - else if (typeof object.gasLimit === "number") - message.gasLimit = object.gasLimit; - else if (typeof object.gasLimit === "object") - message.gasLimit = new $util.LongBits(object.gasLimit.low >>> 0, object.gasLimit.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Fee message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.tx.v1.Fee - * @static - * @param {cosmos_sdk.tx.v1.Fee} message Fee - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Fee.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.gasLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasLimit = options.longs === String ? "0" : 0; - if (message.amount && message.amount.length) { - object.amount = []; - for (var j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); - } - if (message.gasLimit != null && message.hasOwnProperty("gasLimit")) - if (typeof message.gasLimit === "number") - object.gasLimit = options.longs === String ? String(message.gasLimit) : message.gasLimit; - else - object.gasLimit = options.longs === String ? $util.Long.prototype.toString.call(message.gasLimit) : options.longs === Number ? new $util.LongBits(message.gasLimit.low >>> 0, message.gasLimit.high >>> 0).toNumber(true) : message.gasLimit; - return object; - }; - - /** - * Converts this Fee to JSON. - * @function toJSON - * @memberof cosmos_sdk.tx.v1.Fee - * @instance - * @returns {Object.} JSON object - */ - Fee.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Fee; @@ -5363,13 +2727,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Coin. * @implements ICoin * @constructor - * @param {cosmos_sdk.v1.ICoin=} [properties] Properties to set + * @param {cosmos_sdk.v1.ICoin=} [p] Properties to set */ - function Coin(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -5405,31 +2769,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.Coin * @static - * @param {cosmos_sdk.v1.ICoin} message Coin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.ICoin} m Coin message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Coin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); - return writer; - }; - - /** - * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {cosmos_sdk.v1.ICoin} message Coin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Coin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -5437,121 +2788,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.Coin * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.Coin} Coin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Coin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.Coin(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.denom = reader.string(); + m.denom = r.string(); break; case 2: - message.amount = reader.string(); + m.amount = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Coin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.Coin} Coin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Coin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Coin message. - * @function verify - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Coin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) - if (!$util.isString(message.amount)) - return "amount: string expected"; - return null; - }; - - /** - * Creates a Coin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.Coin} Coin - */ - Coin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.Coin) - return object; - var message = new $root.cosmos_sdk.v1.Coin(); - if (object.denom != null) - message.denom = String(object.denom); - if (object.amount != null) - message.amount = String(object.amount); - return message; - }; - - /** - * Creates a plain object from a Coin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {cosmos_sdk.v1.Coin} message Coin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Coin.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.denom = ""; - object.amount = ""; - } - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = message.amount; - return object; - }; - - /** - * Converts this Coin to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.Coin - * @instance - * @returns {Object.} JSON object - */ - Coin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Coin; @@ -5573,13 +2834,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a DecCoin. * @implements IDecCoin * @constructor - * @param {cosmos_sdk.v1.IDecCoin=} [properties] Properties to set + * @param {cosmos_sdk.v1.IDecCoin=} [p] Properties to set */ - function DecCoin(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -5615,31 +2876,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.DecCoin * @static - * @param {cosmos_sdk.v1.IDecCoin} message DecCoin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.IDecCoin} m DecCoin message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DecCoin.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.amount); - return writer; - }; - - /** - * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {cosmos_sdk.v1.IDecCoin} message DecCoin message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecCoin.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -5647,121 +2895,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.DecCoin * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.DecCoin} DecCoin * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DecCoin.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.DecCoin(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.denom = reader.string(); + m.denom = r.string(); break; case 2: - message.amount = reader.string(); + m.amount = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a DecCoin message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.DecCoin} DecCoin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecCoin.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DecCoin message. - * @function verify - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DecCoin.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) - if (!$util.isString(message.amount)) - return "amount: string expected"; - return null; - }; - - /** - * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.DecCoin} DecCoin - */ - DecCoin.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.DecCoin) - return object; - var message = new $root.cosmos_sdk.v1.DecCoin(); - if (object.denom != null) - message.denom = String(object.denom); - if (object.amount != null) - message.amount = String(object.amount); - return message; - }; - - /** - * Creates a plain object from a DecCoin message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {cosmos_sdk.v1.DecCoin} message DecCoin - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DecCoin.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.denom = ""; - object.amount = ""; - } - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = message.amount; - return object; - }; - - /** - * Converts this DecCoin to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.DecCoin - * @instance - * @returns {Object.} JSON object - */ - DecCoin.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return DecCoin; @@ -5782,13 +2940,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an IntProto. * @implements IIntProto * @constructor - * @param {cosmos_sdk.v1.IIntProto=} [properties] Properties to set + * @param {cosmos_sdk.v1.IIntProto=} [p] Properties to set */ - function IntProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -5816,29 +2974,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.IntProto * @static - * @param {cosmos_sdk.v1.IIntProto} message IntProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.IIntProto} m IntProto message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - IntProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.int != null && Object.hasOwnProperty.call(message, "int")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.int); - return writer; - }; - - /** - * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {cosmos_sdk.v1.IIntProto} message IntProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IntProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -5846,109 +2991,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.IntProto * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.IntProto} IntProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - IntProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.IntProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.int = reader.string(); + m.int = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an IntProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.IntProto} IntProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IntProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IntProto message. - * @function verify - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IntProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.int != null && message.hasOwnProperty("int")) - if (!$util.isString(message.int)) - return "int: string expected"; - return null; - }; - - /** - * Creates an IntProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.IntProto} IntProto - */ - IntProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.IntProto) - return object; - var message = new $root.cosmos_sdk.v1.IntProto(); - if (object.int != null) - message.int = String(object.int); - return message; - }; - - /** - * Creates a plain object from an IntProto message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {cosmos_sdk.v1.IntProto} message IntProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IntProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.int = ""; - if (message.int != null && message.hasOwnProperty("int")) - object.int = message.int; - return object; - }; - - /** - * Converts this IntProto to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.IntProto - * @instance - * @returns {Object.} JSON object - */ - IntProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return IntProto; @@ -5969,13 +3033,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a DecProto. * @implements IDecProto * @constructor - * @param {cosmos_sdk.v1.IDecProto=} [properties] Properties to set + * @param {cosmos_sdk.v1.IDecProto=} [p] Properties to set */ - function DecProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -6003,29 +3067,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.DecProto * @static - * @param {cosmos_sdk.v1.IDecProto} message DecProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.IDecProto} m DecProto message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DecProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.dec != null && Object.hasOwnProperty.call(message, "dec")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.dec); - return writer; - }; - - /** - * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {cosmos_sdk.v1.IDecProto} message DecProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DecProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -6033,109 +3084,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.DecProto * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.DecProto} DecProto * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DecProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.DecProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.dec = reader.string(); + m.dec = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a DecProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.DecProto} DecProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DecProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DecProto message. - * @function verify - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DecProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.dec != null && message.hasOwnProperty("dec")) - if (!$util.isString(message.dec)) - return "dec: string expected"; - return null; - }; - - /** - * Creates a DecProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.DecProto} DecProto - */ - DecProto.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.DecProto) - return object; - var message = new $root.cosmos_sdk.v1.DecProto(); - if (object.dec != null) - message.dec = String(object.dec); - return message; - }; - - /** - * Creates a plain object from a DecProto message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {cosmos_sdk.v1.DecProto} message DecProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DecProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.dec = ""; - if (message.dec != null && message.hasOwnProperty("dec")) - object.dec = message.dec; - return object; - }; - - /** - * Converts this DecProto to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.DecProto - * @instance - * @returns {Object.} JSON object - */ - DecProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return DecProto; @@ -6156,14 +3126,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ValAddresses. * @implements IValAddresses * @constructor - * @param {cosmos_sdk.v1.IValAddresses=} [properties] Properties to set + * @param {cosmos_sdk.v1.IValAddresses=} [p] Properties to set */ - function ValAddresses(properties) { + function ValAddresses(p) { this.addresses = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -6191,30 +3161,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.ValAddresses * @static - * @param {cosmos_sdk.v1.IValAddresses} message ValAddresses message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.IValAddresses} m ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValAddresses.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.addresses != null && message.addresses.length) - for (var i = 0; i < message.addresses.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.addresses[i]); - return writer; - }; - - /** - * Encodes the specified ValAddresses message, length delimited. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {cosmos_sdk.v1.IValAddresses} message ValAddresses message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValAddresses.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -6222,126 +3180,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.ValAddresses * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValAddresses.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.ValAddresses(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.addresses && message.addresses.length)) - message.addresses = []; - message.addresses.push(reader.bytes()); + if (!(m.addresses && m.addresses.length)) + m.addresses = []; + m.addresses.push(r.bytes()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValAddresses message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValAddresses.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValAddresses message. - * @function verify - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValAddresses.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.addresses != null && message.hasOwnProperty("addresses")) { - if (!Array.isArray(message.addresses)) - return "addresses: array expected"; - for (var i = 0; i < message.addresses.length; ++i) - if (!(message.addresses[i] && typeof message.addresses[i].length === "number" || $util.isString(message.addresses[i]))) - return "addresses: buffer[] expected"; - } - return null; - }; - - /** - * Creates a ValAddresses message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses - */ - ValAddresses.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.ValAddresses) - return object; - var message = new $root.cosmos_sdk.v1.ValAddresses(); - if (object.addresses) { - if (!Array.isArray(object.addresses)) - throw TypeError(".cosmos_sdk.v1.ValAddresses.addresses: array expected"); - message.addresses = []; - for (var i = 0; i < object.addresses.length; ++i) - if (typeof object.addresses[i] === "string") - $util.base64.decode(object.addresses[i], message.addresses[i] = $util.newBuffer($util.base64.length(object.addresses[i])), 0); - else if (object.addresses[i].length) - message.addresses[i] = object.addresses[i]; - } - return message; - }; - - /** - * Creates a plain object from a ValAddresses message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {cosmos_sdk.v1.ValAddresses} message ValAddresses - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValAddresses.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.addresses = []; - if (message.addresses && message.addresses.length) { - object.addresses = []; - for (var j = 0; j < message.addresses.length; ++j) - object.addresses[j] = options.bytes === String ? $util.base64.encode(message.addresses[j], 0, message.addresses[j].length) : options.bytes === Array ? Array.prototype.slice.call(message.addresses[j]) : message.addresses[j]; - } - return object; - }; - - /** - * Converts this ValAddresses to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.ValAddresses - * @instance - * @returns {Object.} JSON object - */ - ValAddresses.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValAddresses; @@ -6363,13 +3225,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a GasInfo. * @implements IGasInfo * @constructor - * @param {cosmos_sdk.v1.IGasInfo=} [properties] Properties to set + * @param {cosmos_sdk.v1.IGasInfo=} [p] Properties to set */ - function GasInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -6405,31 +3267,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.GasInfo * @static - * @param {cosmos_sdk.v1.IGasInfo} message GasInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.IGasInfo} m GasInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GasInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.gasWanted); - if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.gasUsed); - return writer; - }; - - /** - * Encodes the specified GasInfo message, length delimited. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {cosmos_sdk.v1.IGasInfo} message GasInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GasInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -6437,149 +3286,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.GasInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.GasInfo} GasInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GasInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.GasInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.gasWanted = reader.uint64(); + m.gasWanted = r.uint64(); break; case 2: - message.gasUsed = reader.uint64(); + m.gasUsed = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a GasInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.GasInfo} GasInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GasInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GasInfo message. - * @function verify - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GasInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) - return "gasWanted: integer|Long expected"; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) - return "gasUsed: integer|Long expected"; - return null; - }; - - /** - * Creates a GasInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.GasInfo} GasInfo - */ - GasInfo.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.GasInfo) - return object; - var message = new $root.cosmos_sdk.v1.GasInfo(); - if (object.gasWanted != null) - if ($util.Long) - (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = true; - else if (typeof object.gasWanted === "string") - message.gasWanted = parseInt(object.gasWanted, 10); - else if (typeof object.gasWanted === "number") - message.gasWanted = object.gasWanted; - else if (typeof object.gasWanted === "object") - message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(true); - if (object.gasUsed != null) - if ($util.Long) - (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = true; - else if (typeof object.gasUsed === "string") - message.gasUsed = parseInt(object.gasUsed, 10); - else if (typeof object.gasUsed === "number") - message.gasUsed = object.gasUsed; - else if (typeof object.gasUsed === "object") - message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a GasInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {cosmos_sdk.v1.GasInfo} message GasInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GasInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasWanted = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasUsed = options.longs === String ? "0" : 0; - } - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (typeof message.gasWanted === "number") - object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; - else - object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber(true) : message.gasWanted; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (typeof message.gasUsed === "number") - object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; - else - object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber(true) : message.gasUsed; - return object; - }; - - /** - * Converts this GasInfo to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.GasInfo - * @instance - * @returns {Object.} JSON object - */ - GasInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return GasInfo; @@ -6602,14 +3333,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Result. * @implements IResult * @constructor - * @param {cosmos_sdk.v1.IResult=} [properties] Properties to set + * @param {cosmos_sdk.v1.IResult=} [p] Properties to set */ - function Result(properties) { + function Result(p) { this.events = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -6653,34 +3384,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.Result * @static - * @param {cosmos_sdk.v1.IResult} message Result message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.IResult} m Result message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Result.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); - if (message.log != null && Object.hasOwnProperty.call(message, "log")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.log); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.Result - * @static - * @param {cosmos_sdk.v1.IResult} message Result message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Result.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -6688,161 +3407,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.Result * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.Result} Result * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Result.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.Result(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.data = reader.bytes(); + m.data = r.bytes(); break; case 2: - message.log = reader.string(); + m.log = r.string(); break; case 3: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + if (!(m.events && m.events.length)) + m.events = []; + m.events.push($root.tendermint.abci.types.Event.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Result message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.Result - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.Result} Result - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Result.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Result message. - * @function verify - * @memberof cosmos_sdk.v1.Result - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Result.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - if (message.log != null && message.hasOwnProperty("log")) - if (!$util.isString(message.log)) - return "log: string expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.tendermint.abci.types.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - return null; - }; - - /** - * Creates a Result message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.Result - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.Result} Result - */ - Result.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.Result) - return object; - var message = new $root.cosmos_sdk.v1.Result(); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - if (object.log != null) - message.log = String(object.log); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".cosmos_sdk.v1.Result.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".cosmos_sdk.v1.Result.events: object expected"); - message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Result message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.Result - * @static - * @param {cosmos_sdk.v1.Result} message Result - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Result.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (options.defaults) { - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.log = ""; - } - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.log != null && message.hasOwnProperty("log")) - object.log = message.log; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this Result to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.Result - * @instance - * @returns {Object.} JSON object - */ - Result.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Result; @@ -6864,13 +3458,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a SimulationResponse. * @implements ISimulationResponse * @constructor - * @param {cosmos_sdk.v1.ISimulationResponse=} [properties] Properties to set + * @param {cosmos_sdk.v1.ISimulationResponse=} [p] Properties to set */ - function SimulationResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -6906,31 +3500,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.SimulationResponse * @static - * @param {cosmos_sdk.v1.ISimulationResponse} message SimulationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.ISimulationResponse} m SimulationResponse message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SimulationResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gasInfo != null && Object.hasOwnProperty.call(message, "gasInfo")) - $root.cosmos_sdk.v1.GasInfo.encode(message.gasInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.result != null && Object.hasOwnProperty.call(message, "result")) - $root.cosmos_sdk.v1.Result.encode(message.result, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SimulationResponse message, length delimited. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {cosmos_sdk.v1.ISimulationResponse} message SimulationResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SimulationResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -6938,131 +3519,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.SimulationResponse * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SimulationResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.SimulationResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.gasInfo = $root.cosmos_sdk.v1.GasInfo.decode(reader, reader.uint32()); + m.gasInfo = $root.cosmos_sdk.v1.GasInfo.decode(r, r.uint32()); break; case 2: - message.result = $root.cosmos_sdk.v1.Result.decode(reader, reader.uint32()); + m.result = $root.cosmos_sdk.v1.Result.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulationResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SimulationResponse message. - * @function verify - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SimulationResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) { - var error = $root.cosmos_sdk.v1.GasInfo.verify(message.gasInfo); - if (error) - return "gasInfo." + error; - } - if (message.result != null && message.hasOwnProperty("result")) { - var error = $root.cosmos_sdk.v1.Result.verify(message.result); - if (error) - return "result." + error; - } - return null; - }; - - /** - * Creates a SimulationResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse - */ - SimulationResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.SimulationResponse) - return object; - var message = new $root.cosmos_sdk.v1.SimulationResponse(); - if (object.gasInfo != null) { - if (typeof object.gasInfo !== "object") - throw TypeError(".cosmos_sdk.v1.SimulationResponse.gasInfo: object expected"); - message.gasInfo = $root.cosmos_sdk.v1.GasInfo.fromObject(object.gasInfo); - } - if (object.result != null) { - if (typeof object.result !== "object") - throw TypeError(".cosmos_sdk.v1.SimulationResponse.result: object expected"); - message.result = $root.cosmos_sdk.v1.Result.fromObject(object.result); - } - return message; - }; - - /** - * Creates a plain object from a SimulationResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {cosmos_sdk.v1.SimulationResponse} message SimulationResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SimulationResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gasInfo = null; - object.result = null; - } - if (message.gasInfo != null && message.hasOwnProperty("gasInfo")) - object.gasInfo = $root.cosmos_sdk.v1.GasInfo.toObject(message.gasInfo, options); - if (message.result != null && message.hasOwnProperty("result")) - object.result = $root.cosmos_sdk.v1.Result.toObject(message.result, options); - return object; - }; - - /** - * Converts this SimulationResponse to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.SimulationResponse - * @instance - * @returns {Object.} JSON object - */ - SimulationResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return SimulationResponse; @@ -7084,13 +3565,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgData. * @implements IMsgData * @constructor - * @param {cosmos_sdk.v1.IMsgData=} [properties] Properties to set + * @param {cosmos_sdk.v1.IMsgData=} [p] Properties to set */ - function MsgData(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -7126,31 +3607,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.MsgData * @static - * @param {cosmos_sdk.v1.IMsgData} message MsgData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.IMsgData} m MsgData message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.msgType != null && Object.hasOwnProperty.call(message, "msgType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.msgType); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified MsgData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {cosmos_sdk.v1.IMsgData} message MsgData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -7158,130 +3626,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.MsgData * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.MsgData} MsgData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.MsgData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.msgType = reader.string(); + m.msgType = r.string(); break; case 2: - message.data = reader.bytes(); + m.data = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.MsgData} MsgData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgData message. - * @function verify - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.msgType != null && message.hasOwnProperty("msgType")) - if (!$util.isString(message.msgType)) - return "msgType: string expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - return null; - }; - - /** - * Creates a MsgData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.MsgData} MsgData - */ - MsgData.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.MsgData) - return object; - var message = new $root.cosmos_sdk.v1.MsgData(); - if (object.msgType != null) - message.msgType = String(object.msgType); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - return message; - }; - - /** - * Creates a plain object from a MsgData message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {cosmos_sdk.v1.MsgData} message MsgData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.msgType = ""; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - if (message.msgType != null && message.hasOwnProperty("msgType")) - object.msgType = message.msgType; - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - return object; - }; - - /** - * Converts this MsgData to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.MsgData - * @instance - * @returns {Object.} JSON object - */ - MsgData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgData; @@ -7302,14 +3671,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a TxData. * @implements ITxData * @constructor - * @param {cosmos_sdk.v1.ITxData=} [properties] Properties to set + * @param {cosmos_sdk.v1.ITxData=} [p] Properties to set */ - function TxData(properties) { + function TxData(p) { this.data = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -7337,30 +3706,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.v1.TxData * @static - * @param {cosmos_sdk.v1.ITxData} message TxData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.v1.ITxData} m TxData message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TxData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.data != null && message.data.length) - for (var i = 0; i < message.data.length; ++i) - $root.cosmos_sdk.v1.MsgData.encode(message.data[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TxData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {cosmos_sdk.v1.ITxData} message TxData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TxData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -7368,128 +3725,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.v1.TxData * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.v1.TxData} TxData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TxData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.v1.TxData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.data && message.data.length)) - message.data = []; - message.data.push($root.cosmos_sdk.v1.MsgData.decode(reader, reader.uint32())); + if (!(m.data && m.data.length)) + m.data = []; + m.data.push($root.cosmos_sdk.v1.MsgData.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a TxData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.v1.TxData} TxData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TxData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TxData message. - * @function verify - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TxData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.data != null && message.hasOwnProperty("data")) { - if (!Array.isArray(message.data)) - return "data: array expected"; - for (var i = 0; i < message.data.length; ++i) { - var error = $root.cosmos_sdk.v1.MsgData.verify(message.data[i]); - if (error) - return "data." + error; - } - } - return null; - }; - - /** - * Creates a TxData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.v1.TxData} TxData - */ - TxData.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.v1.TxData) - return object; - var message = new $root.cosmos_sdk.v1.TxData(); - if (object.data) { - if (!Array.isArray(object.data)) - throw TypeError(".cosmos_sdk.v1.TxData.data: array expected"); - message.data = []; - for (var i = 0; i < object.data.length; ++i) { - if (typeof object.data[i] !== "object") - throw TypeError(".cosmos_sdk.v1.TxData.data: object expected"); - message.data[i] = $root.cosmos_sdk.v1.MsgData.fromObject(object.data[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TxData message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {cosmos_sdk.v1.TxData} message TxData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TxData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.data = []; - if (message.data && message.data.length) { - object.data = []; - for (var j = 0; j < message.data.length; ++j) - object.data[j] = $root.cosmos_sdk.v1.MsgData.toObject(message.data[j], options); - } - return object; - }; - - /** - * Converts this TxData to JSON. - * @function toJSON - * @memberof cosmos_sdk.v1.TxData - * @instance - * @returns {Object.} JSON object - */ - TxData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return TxData; @@ -7543,13 +3802,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a BaseAccount. * @implements IBaseAccount * @constructor - * @param {cosmos_sdk.x.auth.v1.IBaseAccount=} [properties] Properties to set + * @param {cosmos_sdk.x.auth.v1.IBaseAccount=} [p] Properties to set */ - function BaseAccount(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function BaseAccount(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]]; } /** @@ -7601,35 +3860,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.auth.v1.BaseAccount * @static - * @param {cosmos_sdk.x.auth.v1.IBaseAccount} message BaseAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.auth.v1.IBaseAccount} m BaseAccount message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BaseAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); - if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.pubKey); - if (message.accountNumber != null && Object.hasOwnProperty.call(message, "accountNumber")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.accountNumber); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sequence); - return writer; - }; - - /** - * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @static - * @param {cosmos_sdk.x.auth.v1.IBaseAccount} message BaseAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + BaseAccount.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.pubKey != null && Object.hasOwnProperty.call(m, "pubKey")) + w.uint32(18).bytes(m.pubKey); + if (m.accountNumber != null && Object.hasOwnProperty.call(m, "accountNumber")) + w.uint32(24).uint64(m.accountNumber); + if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence")) + w.uint32(32).uint64(m.sequence); + return w; }; /** @@ -7637,189 +3883,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.auth.v1.BaseAccount * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.auth.v1.BaseAccount} BaseAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BaseAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.v1.BaseAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + BaseAccount.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.auth.v1.BaseAccount(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.address = reader.bytes(); + m.address = r.bytes(); break; case 2: - message.pubKey = reader.bytes(); + m.pubKey = r.bytes(); break; case 3: - message.accountNumber = reader.uint64(); + m.accountNumber = r.uint64(); break; case 4: - message.sequence = reader.uint64(); + m.sequence = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a BaseAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.auth.v1.BaseAccount} BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BaseAccount message. - * @function verify - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BaseAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) - return "address: buffer expected"; - if (message.pubKey != null && message.hasOwnProperty("pubKey")) - if (!(message.pubKey && typeof message.pubKey.length === "number" || $util.isString(message.pubKey))) - return "pubKey: buffer expected"; - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - if (!$util.isInteger(message.accountNumber) && !(message.accountNumber && $util.isInteger(message.accountNumber.low) && $util.isInteger(message.accountNumber.high))) - return "accountNumber: integer|Long expected"; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) - return "sequence: integer|Long expected"; - return null; - }; - - /** - * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.auth.v1.BaseAccount} BaseAccount - */ - BaseAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.auth.v1.BaseAccount) - return object; - var message = new $root.cosmos_sdk.x.auth.v1.BaseAccount(); - if (object.address != null) - if (typeof object.address === "string") - $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); - else if (object.address.length) - message.address = object.address; - if (object.pubKey != null) - if (typeof object.pubKey === "string") - $util.base64.decode(object.pubKey, message.pubKey = $util.newBuffer($util.base64.length(object.pubKey)), 0); - else if (object.pubKey.length) - message.pubKey = object.pubKey; - if (object.accountNumber != null) - if ($util.Long) - (message.accountNumber = $util.Long.fromValue(object.accountNumber)).unsigned = true; - else if (typeof object.accountNumber === "string") - message.accountNumber = parseInt(object.accountNumber, 10); - else if (typeof object.accountNumber === "number") - message.accountNumber = object.accountNumber; - else if (typeof object.accountNumber === "object") - message.accountNumber = new $util.LongBits(object.accountNumber.low >>> 0, object.accountNumber.high >>> 0).toNumber(true); - if (object.sequence != null) - if ($util.Long) - (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; - else if (typeof object.sequence === "string") - message.sequence = parseInt(object.sequence, 10); - else if (typeof object.sequence === "number") - message.sequence = object.sequence; - else if (typeof object.sequence === "object") - message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @static - * @param {cosmos_sdk.x.auth.v1.BaseAccount} message BaseAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BaseAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.address = ""; - else { - object.address = []; - if (options.bytes !== Array) - object.address = $util.newBuffer(object.address); - } - if (options.bytes === String) - object.pubKey = ""; - else { - object.pubKey = []; - if (options.bytes !== Array) - object.pubKey = $util.newBuffer(object.pubKey); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.accountNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.accountNumber = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; - if (message.pubKey != null && message.hasOwnProperty("pubKey")) - object.pubKey = options.bytes === String ? $util.base64.encode(message.pubKey, 0, message.pubKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.pubKey) : message.pubKey; - if (message.accountNumber != null && message.hasOwnProperty("accountNumber")) - if (typeof message.accountNumber === "number") - object.accountNumber = options.longs === String ? String(message.accountNumber) : message.accountNumber; - else - object.accountNumber = options.longs === String ? $util.Long.prototype.toString.call(message.accountNumber) : options.longs === Number ? new $util.LongBits(message.accountNumber.low >>> 0, message.accountNumber.high >>> 0).toNumber(true) : message.accountNumber; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (typeof message.sequence === "number") - object.sequence = options.longs === String ? String(message.sequence) : message.sequence; - else - object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; - return object; - }; - - /** - * Converts this BaseAccount to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @instance - * @returns {Object.} JSON object - */ - BaseAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return BaseAccount; @@ -7842,14 +3936,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ModuleAccount. * @implements IModuleAccount * @constructor - * @param {cosmos_sdk.x.auth.v1.IModuleAccount=} [properties] Properties to set + * @param {cosmos_sdk.x.auth.v1.IModuleAccount=} [p] Properties to set */ - function ModuleAccount(properties) { + function ModuleAccount(p) { this.permissions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -7893,34 +3987,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.auth.v1.ModuleAccount * @static - * @param {cosmos_sdk.x.auth.v1.IModuleAccount} message ModuleAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.auth.v1.IModuleAccount} m ModuleAccount message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ModuleAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baseAccount != null && Object.hasOwnProperty.call(message, "baseAccount")) - $root.cosmos_sdk.x.auth.v1.BaseAccount.encode(message.baseAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.permissions != null && message.permissions.length) - for (var i = 0; i < message.permissions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.permissions[i]); - return writer; - }; - - /** - * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @static - * @param {cosmos_sdk.x.auth.v1.IModuleAccount} message ModuleAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ModuleAccount.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.baseAccount != null && Object.hasOwnProperty.call(m, "baseAccount")) + $root.cosmos_sdk.x.auth.v1.BaseAccount.encode(m.baseAccount, w.uint32(10).fork()).ldelim(); + if (m.name != null && Object.hasOwnProperty.call(m, "name")) + w.uint32(18).string(m.name); + if (m.permissions != null && m.permissions.length) { + for (var i = 0; i < m.permissions.length; ++i) + w.uint32(26).string(m.permissions[i]); + } + return w; }; /** @@ -7928,152 +4010,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.auth.v1.ModuleAccount * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.auth.v1.ModuleAccount} ModuleAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ModuleAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.v1.ModuleAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ModuleAccount.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.auth.v1.ModuleAccount(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.decode(reader, reader.uint32()); + m.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.decode(r, r.uint32()); break; case 2: - message.name = reader.string(); + m.name = r.string(); break; case 3: - if (!(message.permissions && message.permissions.length)) - message.permissions = []; - message.permissions.push(reader.string()); + if (!(m.permissions && m.permissions.length)) + m.permissions = []; + m.permissions.push(r.string()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.auth.v1.ModuleAccount} ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModuleAccount message. - * @function verify - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModuleAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) { - var error = $root.cosmos_sdk.x.auth.v1.BaseAccount.verify(message.baseAccount); - if (error) - return "baseAccount." + error; - } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.permissions != null && message.hasOwnProperty("permissions")) { - if (!Array.isArray(message.permissions)) - return "permissions: array expected"; - for (var i = 0; i < message.permissions.length; ++i) - if (!$util.isString(message.permissions[i])) - return "permissions: string[] expected"; - } - return null; - }; - - /** - * Creates a ModuleAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.auth.v1.ModuleAccount} ModuleAccount - */ - ModuleAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.auth.v1.ModuleAccount) - return object; - var message = new $root.cosmos_sdk.x.auth.v1.ModuleAccount(); - if (object.baseAccount != null) { - if (typeof object.baseAccount !== "object") - throw TypeError(".cosmos_sdk.x.auth.v1.ModuleAccount.baseAccount: object expected"); - message.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.fromObject(object.baseAccount); - } - if (object.name != null) - message.name = String(object.name); - if (object.permissions) { - if (!Array.isArray(object.permissions)) - throw TypeError(".cosmos_sdk.x.auth.v1.ModuleAccount.permissions: array expected"); - message.permissions = []; - for (var i = 0; i < object.permissions.length; ++i) - message.permissions[i] = String(object.permissions[i]); - } - return message; - }; - - /** - * Creates a plain object from a ModuleAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @static - * @param {cosmos_sdk.x.auth.v1.ModuleAccount} message ModuleAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModuleAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.permissions = []; - if (options.defaults) { - object.baseAccount = null; - object.name = ""; - } - if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) - object.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.toObject(message.baseAccount, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.permissions && message.permissions.length) { - object.permissions = []; - for (var j = 0; j < message.permissions.length; ++j) - object.permissions[j] = message.permissions[j]; - } - return object; - }; - - /** - * Converts this ModuleAccount to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @instance - * @returns {Object.} JSON object - */ - ModuleAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ModuleAccount; @@ -8098,13 +4064,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Params. * @implements IParams * @constructor - * @param {cosmos_sdk.x.auth.v1.IParams=} [properties] Properties to set + * @param {cosmos_sdk.x.auth.v1.IParams=} [p] Properties to set */ - function Params(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Params(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]]; } /** @@ -8164,37 +4130,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.auth.v1.Params * @static - * @param {cosmos_sdk.x.auth.v1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.auth.v1.IParams} m Params message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxMemoCharacters != null && Object.hasOwnProperty.call(message, "maxMemoCharacters")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.maxMemoCharacters); - if (message.txSigLimit != null && Object.hasOwnProperty.call(message, "txSigLimit")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.txSigLimit); - if (message.txSizeCostPerByte != null && Object.hasOwnProperty.call(message, "txSizeCostPerByte")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.txSizeCostPerByte); - if (message.sigVerifyCostEd25519 != null && Object.hasOwnProperty.call(message, "sigVerifyCostEd25519")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.sigVerifyCostEd25519); - if (message.sigVerifyCostSecp256k1 != null && Object.hasOwnProperty.call(message, "sigVerifyCostSecp256k1")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.sigVerifyCostSecp256k1); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.auth.v1.Params - * @static - * @param {cosmos_sdk.x.auth.v1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Params.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.maxMemoCharacters != null && Object.hasOwnProperty.call(m, "maxMemoCharacters")) + w.uint32(8).uint64(m.maxMemoCharacters); + if (m.txSigLimit != null && Object.hasOwnProperty.call(m, "txSigLimit")) + w.uint32(16).uint64(m.txSigLimit); + if (m.txSizeCostPerByte != null && Object.hasOwnProperty.call(m, "txSizeCostPerByte")) + w.uint32(24).uint64(m.txSizeCostPerByte); + if (m.sigVerifyCostEd25519 != null && Object.hasOwnProperty.call(m, "sigVerifyCostEd25519")) + w.uint32(32).uint64(m.sigVerifyCostEd25519); + if (m.sigVerifyCostSecp256k1 != null && Object.hasOwnProperty.call(m, "sigVerifyCostSecp256k1")) + w.uint32(40).uint64(m.sigVerifyCostSecp256k1); + return w; }; /** @@ -8202,224 +4155,40 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.auth.v1.Params * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.auth.v1.Params} Params * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Params.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.cosmos_sdk.x.auth.v1.Params(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.maxMemoCharacters = reader.uint64(); + m.maxMemoCharacters = r.uint64(); break; case 2: - message.txSigLimit = reader.uint64(); + m.txSigLimit = r.uint64(); break; case 3: - message.txSizeCostPerByte = reader.uint64(); + m.txSizeCostPerByte = r.uint64(); break; case 4: - message.sigVerifyCostEd25519 = reader.uint64(); + m.sigVerifyCostEd25519 = r.uint64(); break; case 5: - message.sigVerifyCostSecp256k1 = reader.uint64(); + m.sigVerifyCostSecp256k1 = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.auth.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.auth.v1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof cosmos_sdk.x.auth.v1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.maxMemoCharacters != null && message.hasOwnProperty("maxMemoCharacters")) - if (!$util.isInteger(message.maxMemoCharacters) && !(message.maxMemoCharacters && $util.isInteger(message.maxMemoCharacters.low) && $util.isInteger(message.maxMemoCharacters.high))) - return "maxMemoCharacters: integer|Long expected"; - if (message.txSigLimit != null && message.hasOwnProperty("txSigLimit")) - if (!$util.isInteger(message.txSigLimit) && !(message.txSigLimit && $util.isInteger(message.txSigLimit.low) && $util.isInteger(message.txSigLimit.high))) - return "txSigLimit: integer|Long expected"; - if (message.txSizeCostPerByte != null && message.hasOwnProperty("txSizeCostPerByte")) - if (!$util.isInteger(message.txSizeCostPerByte) && !(message.txSizeCostPerByte && $util.isInteger(message.txSizeCostPerByte.low) && $util.isInteger(message.txSizeCostPerByte.high))) - return "txSizeCostPerByte: integer|Long expected"; - if (message.sigVerifyCostEd25519 != null && message.hasOwnProperty("sigVerifyCostEd25519")) - if (!$util.isInteger(message.sigVerifyCostEd25519) && !(message.sigVerifyCostEd25519 && $util.isInteger(message.sigVerifyCostEd25519.low) && $util.isInteger(message.sigVerifyCostEd25519.high))) - return "sigVerifyCostEd25519: integer|Long expected"; - if (message.sigVerifyCostSecp256k1 != null && message.hasOwnProperty("sigVerifyCostSecp256k1")) - if (!$util.isInteger(message.sigVerifyCostSecp256k1) && !(message.sigVerifyCostSecp256k1 && $util.isInteger(message.sigVerifyCostSecp256k1.low) && $util.isInteger(message.sigVerifyCostSecp256k1.high))) - return "sigVerifyCostSecp256k1: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.auth.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.auth.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.auth.v1.Params) - return object; - var message = new $root.cosmos_sdk.x.auth.v1.Params(); - if (object.maxMemoCharacters != null) - if ($util.Long) - (message.maxMemoCharacters = $util.Long.fromValue(object.maxMemoCharacters)).unsigned = true; - else if (typeof object.maxMemoCharacters === "string") - message.maxMemoCharacters = parseInt(object.maxMemoCharacters, 10); - else if (typeof object.maxMemoCharacters === "number") - message.maxMemoCharacters = object.maxMemoCharacters; - else if (typeof object.maxMemoCharacters === "object") - message.maxMemoCharacters = new $util.LongBits(object.maxMemoCharacters.low >>> 0, object.maxMemoCharacters.high >>> 0).toNumber(true); - if (object.txSigLimit != null) - if ($util.Long) - (message.txSigLimit = $util.Long.fromValue(object.txSigLimit)).unsigned = true; - else if (typeof object.txSigLimit === "string") - message.txSigLimit = parseInt(object.txSigLimit, 10); - else if (typeof object.txSigLimit === "number") - message.txSigLimit = object.txSigLimit; - else if (typeof object.txSigLimit === "object") - message.txSigLimit = new $util.LongBits(object.txSigLimit.low >>> 0, object.txSigLimit.high >>> 0).toNumber(true); - if (object.txSizeCostPerByte != null) - if ($util.Long) - (message.txSizeCostPerByte = $util.Long.fromValue(object.txSizeCostPerByte)).unsigned = true; - else if (typeof object.txSizeCostPerByte === "string") - message.txSizeCostPerByte = parseInt(object.txSizeCostPerByte, 10); - else if (typeof object.txSizeCostPerByte === "number") - message.txSizeCostPerByte = object.txSizeCostPerByte; - else if (typeof object.txSizeCostPerByte === "object") - message.txSizeCostPerByte = new $util.LongBits(object.txSizeCostPerByte.low >>> 0, object.txSizeCostPerByte.high >>> 0).toNumber(true); - if (object.sigVerifyCostEd25519 != null) - if ($util.Long) - (message.sigVerifyCostEd25519 = $util.Long.fromValue(object.sigVerifyCostEd25519)).unsigned = true; - else if (typeof object.sigVerifyCostEd25519 === "string") - message.sigVerifyCostEd25519 = parseInt(object.sigVerifyCostEd25519, 10); - else if (typeof object.sigVerifyCostEd25519 === "number") - message.sigVerifyCostEd25519 = object.sigVerifyCostEd25519; - else if (typeof object.sigVerifyCostEd25519 === "object") - message.sigVerifyCostEd25519 = new $util.LongBits(object.sigVerifyCostEd25519.low >>> 0, object.sigVerifyCostEd25519.high >>> 0).toNumber(true); - if (object.sigVerifyCostSecp256k1 != null) - if ($util.Long) - (message.sigVerifyCostSecp256k1 = $util.Long.fromValue(object.sigVerifyCostSecp256k1)).unsigned = true; - else if (typeof object.sigVerifyCostSecp256k1 === "string") - message.sigVerifyCostSecp256k1 = parseInt(object.sigVerifyCostSecp256k1, 10); - else if (typeof object.sigVerifyCostSecp256k1 === "number") - message.sigVerifyCostSecp256k1 = object.sigVerifyCostSecp256k1; - else if (typeof object.sigVerifyCostSecp256k1 === "object") - message.sigVerifyCostSecp256k1 = new $util.LongBits(object.sigVerifyCostSecp256k1.low >>> 0, object.sigVerifyCostSecp256k1.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.auth.v1.Params - * @static - * @param {cosmos_sdk.x.auth.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.maxMemoCharacters = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxMemoCharacters = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.txSigLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.txSigLimit = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.txSizeCostPerByte = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.txSizeCostPerByte = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.sigVerifyCostEd25519 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sigVerifyCostEd25519 = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.sigVerifyCostSecp256k1 = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sigVerifyCostSecp256k1 = options.longs === String ? "0" : 0; - } - if (message.maxMemoCharacters != null && message.hasOwnProperty("maxMemoCharacters")) - if (typeof message.maxMemoCharacters === "number") - object.maxMemoCharacters = options.longs === String ? String(message.maxMemoCharacters) : message.maxMemoCharacters; - else - object.maxMemoCharacters = options.longs === String ? $util.Long.prototype.toString.call(message.maxMemoCharacters) : options.longs === Number ? new $util.LongBits(message.maxMemoCharacters.low >>> 0, message.maxMemoCharacters.high >>> 0).toNumber(true) : message.maxMemoCharacters; - if (message.txSigLimit != null && message.hasOwnProperty("txSigLimit")) - if (typeof message.txSigLimit === "number") - object.txSigLimit = options.longs === String ? String(message.txSigLimit) : message.txSigLimit; - else - object.txSigLimit = options.longs === String ? $util.Long.prototype.toString.call(message.txSigLimit) : options.longs === Number ? new $util.LongBits(message.txSigLimit.low >>> 0, message.txSigLimit.high >>> 0).toNumber(true) : message.txSigLimit; - if (message.txSizeCostPerByte != null && message.hasOwnProperty("txSizeCostPerByte")) - if (typeof message.txSizeCostPerByte === "number") - object.txSizeCostPerByte = options.longs === String ? String(message.txSizeCostPerByte) : message.txSizeCostPerByte; - else - object.txSizeCostPerByte = options.longs === String ? $util.Long.prototype.toString.call(message.txSizeCostPerByte) : options.longs === Number ? new $util.LongBits(message.txSizeCostPerByte.low >>> 0, message.txSizeCostPerByte.high >>> 0).toNumber(true) : message.txSizeCostPerByte; - if (message.sigVerifyCostEd25519 != null && message.hasOwnProperty("sigVerifyCostEd25519")) - if (typeof message.sigVerifyCostEd25519 === "number") - object.sigVerifyCostEd25519 = options.longs === String ? String(message.sigVerifyCostEd25519) : message.sigVerifyCostEd25519; - else - object.sigVerifyCostEd25519 = options.longs === String ? $util.Long.prototype.toString.call(message.sigVerifyCostEd25519) : options.longs === Number ? new $util.LongBits(message.sigVerifyCostEd25519.low >>> 0, message.sigVerifyCostEd25519.high >>> 0).toNumber(true) : message.sigVerifyCostEd25519; - if (message.sigVerifyCostSecp256k1 != null && message.hasOwnProperty("sigVerifyCostSecp256k1")) - if (typeof message.sigVerifyCostSecp256k1 === "number") - object.sigVerifyCostSecp256k1 = options.longs === String ? String(message.sigVerifyCostSecp256k1) : message.sigVerifyCostSecp256k1; - else - object.sigVerifyCostSecp256k1 = options.longs === String ? $util.Long.prototype.toString.call(message.sigVerifyCostSecp256k1) : options.longs === Number ? new $util.LongBits(message.sigVerifyCostSecp256k1.low >>> 0, message.sigVerifyCostSecp256k1.high >>> 0).toNumber(true) : message.sigVerifyCostSecp256k1; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.auth.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Params; @@ -8465,16 +4234,16 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a BaseVestingAccount. * @implements IBaseVestingAccount * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount=} [properties] Properties to set + * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount=} [p] Properties to set */ - function BaseVestingAccount(properties) { + function BaseVestingAccount(p) { this.originalVesting = []; this.delegatedFree = []; this.delegatedVesting = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -8534,40 +4303,30 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount} message BaseVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount} m BaseVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BaseVestingAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baseAccount != null && Object.hasOwnProperty.call(message, "baseAccount")) - $root.cosmos_sdk.x.auth.v1.BaseAccount.encode(message.baseAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.originalVesting != null && message.originalVesting.length) - for (var i = 0; i < message.originalVesting.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.originalVesting[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.delegatedFree != null && message.delegatedFree.length) - for (var i = 0; i < message.delegatedFree.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.delegatedFree[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.delegatedVesting != null && message.delegatedVesting.length) - for (var i = 0; i < message.delegatedVesting.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.delegatedVesting[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.endTime); - return writer; - }; - - /** - * Encodes the specified BaseVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount} message BaseVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + BaseVestingAccount.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.baseAccount != null && Object.hasOwnProperty.call(m, "baseAccount")) + $root.cosmos_sdk.x.auth.v1.BaseAccount.encode(m.baseAccount, w.uint32(10).fork()).ldelim(); + if (m.originalVesting != null && m.originalVesting.length) { + for (var i = 0; i < m.originalVesting.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(m.originalVesting[i], w.uint32(18).fork()).ldelim(); + } + if (m.delegatedFree != null && m.delegatedFree.length) { + for (var i = 0; i < m.delegatedFree.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(m.delegatedFree[i], w.uint32(26).fork()).ldelim(); + } + if (m.delegatedVesting != null && m.delegatedVesting.length) { + for (var i = 0; i < m.delegatedVesting.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(m.delegatedVesting[i], w.uint32(34).fork()).ldelim(); + } + if (m.endTime != null && Object.hasOwnProperty.call(m, "endTime")) + w.uint32(40).int64(m.endTime); + return w; }; /** @@ -8575,232 +4334,46 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} BaseVestingAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BaseVestingAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + BaseVestingAccount.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.auth.vesting.v1.BaseVestingAccount(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.decode(reader, reader.uint32()); + m.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.decode(r, r.uint32()); break; case 2: - if (!(message.originalVesting && message.originalVesting.length)) - message.originalVesting = []; - message.originalVesting.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.originalVesting && m.originalVesting.length)) + m.originalVesting = []; + m.originalVesting.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; case 3: - if (!(message.delegatedFree && message.delegatedFree.length)) - message.delegatedFree = []; - message.delegatedFree.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.delegatedFree && m.delegatedFree.length)) + m.delegatedFree = []; + m.delegatedFree.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; case 4: - if (!(message.delegatedVesting && message.delegatedVesting.length)) - message.delegatedVesting = []; - message.delegatedVesting.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.delegatedVesting && m.delegatedVesting.length)) + m.delegatedVesting = []; + m.delegatedVesting.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; case 5: - message.endTime = reader.int64(); + m.endTime = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a BaseVestingAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} BaseVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseVestingAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BaseVestingAccount message. - * @function verify - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BaseVestingAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) { - var error = $root.cosmos_sdk.x.auth.v1.BaseAccount.verify(message.baseAccount); - if (error) - return "baseAccount." + error; - } - if (message.originalVesting != null && message.hasOwnProperty("originalVesting")) { - if (!Array.isArray(message.originalVesting)) - return "originalVesting: array expected"; - for (var i = 0; i < message.originalVesting.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.originalVesting[i]); - if (error) - return "originalVesting." + error; - } - } - if (message.delegatedFree != null && message.hasOwnProperty("delegatedFree")) { - if (!Array.isArray(message.delegatedFree)) - return "delegatedFree: array expected"; - for (var i = 0; i < message.delegatedFree.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.delegatedFree[i]); - if (error) - return "delegatedFree." + error; - } - } - if (message.delegatedVesting != null && message.hasOwnProperty("delegatedVesting")) { - if (!Array.isArray(message.delegatedVesting)) - return "delegatedVesting: array expected"; - for (var i = 0; i < message.delegatedVesting.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.delegatedVesting[i]); - if (error) - return "delegatedVesting." + error; - } - } - if (message.endTime != null && message.hasOwnProperty("endTime")) - if (!$util.isInteger(message.endTime) && !(message.endTime && $util.isInteger(message.endTime.low) && $util.isInteger(message.endTime.high))) - return "endTime: integer|Long expected"; - return null; - }; - - /** - * Creates a BaseVestingAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} BaseVestingAccount - */ - BaseVestingAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount) - return object; - var message = new $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount(); - if (object.baseAccount != null) { - if (typeof object.baseAccount !== "object") - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.baseAccount: object expected"); - message.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.fromObject(object.baseAccount); - } - if (object.originalVesting) { - if (!Array.isArray(object.originalVesting)) - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.originalVesting: array expected"); - message.originalVesting = []; - for (var i = 0; i < object.originalVesting.length; ++i) { - if (typeof object.originalVesting[i] !== "object") - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.originalVesting: object expected"); - message.originalVesting[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.originalVesting[i]); - } - } - if (object.delegatedFree) { - if (!Array.isArray(object.delegatedFree)) - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.delegatedFree: array expected"); - message.delegatedFree = []; - for (var i = 0; i < object.delegatedFree.length; ++i) { - if (typeof object.delegatedFree[i] !== "object") - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.delegatedFree: object expected"); - message.delegatedFree[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.delegatedFree[i]); - } - } - if (object.delegatedVesting) { - if (!Array.isArray(object.delegatedVesting)) - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.delegatedVesting: array expected"); - message.delegatedVesting = []; - for (var i = 0; i < object.delegatedVesting.length; ++i) { - if (typeof object.delegatedVesting[i] !== "object") - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.delegatedVesting: object expected"); - message.delegatedVesting[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.delegatedVesting[i]); - } - } - if (object.endTime != null) - if ($util.Long) - (message.endTime = $util.Long.fromValue(object.endTime)).unsigned = false; - else if (typeof object.endTime === "string") - message.endTime = parseInt(object.endTime, 10); - else if (typeof object.endTime === "number") - message.endTime = object.endTime; - else if (typeof object.endTime === "object") - message.endTime = new $util.LongBits(object.endTime.low >>> 0, object.endTime.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BaseVestingAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} message BaseVestingAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BaseVestingAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.originalVesting = []; - object.delegatedFree = []; - object.delegatedVesting = []; - } - if (options.defaults) { - object.baseAccount = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.endTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.endTime = options.longs === String ? "0" : 0; - } - if (message.baseAccount != null && message.hasOwnProperty("baseAccount")) - object.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.toObject(message.baseAccount, options); - if (message.originalVesting && message.originalVesting.length) { - object.originalVesting = []; - for (var j = 0; j < message.originalVesting.length; ++j) - object.originalVesting[j] = $root.cosmos_sdk.v1.Coin.toObject(message.originalVesting[j], options); - } - if (message.delegatedFree && message.delegatedFree.length) { - object.delegatedFree = []; - for (var j = 0; j < message.delegatedFree.length; ++j) - object.delegatedFree[j] = $root.cosmos_sdk.v1.Coin.toObject(message.delegatedFree[j], options); - } - if (message.delegatedVesting && message.delegatedVesting.length) { - object.delegatedVesting = []; - for (var j = 0; j < message.delegatedVesting.length; ++j) - object.delegatedVesting[j] = $root.cosmos_sdk.v1.Coin.toObject(message.delegatedVesting[j], options); - } - if (message.endTime != null && message.hasOwnProperty("endTime")) - if (typeof message.endTime === "number") - object.endTime = options.longs === String ? String(message.endTime) : message.endTime; - else - object.endTime = options.longs === String ? $util.Long.prototype.toString.call(message.endTime) : options.longs === Number ? new $util.LongBits(message.endTime.low >>> 0, message.endTime.high >>> 0).toNumber() : message.endTime; - return object; - }; - - /** - * Converts this BaseVestingAccount to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @instance - * @returns {Object.} JSON object - */ - BaseVestingAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return BaseVestingAccount; @@ -8822,13 +4395,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ContinuousVestingAccount. * @implements IContinuousVestingAccount * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount=} [properties] Properties to set + * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount=} [p] Properties to set */ - function ContinuousVestingAccount(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function ContinuousVestingAccount(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]]; } /** @@ -8864,31 +4437,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount} message ContinuousVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount} m ContinuousVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ContinuousVestingAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baseVestingAccount != null && Object.hasOwnProperty.call(message, "baseVestingAccount")) - $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.startTime); - return writer; - }; - - /** - * Encodes the specified ContinuousVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount} message ContinuousVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContinuousVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ContinuousVestingAccount.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.baseVestingAccount != null && Object.hasOwnProperty.call(m, "baseVestingAccount")) + $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(m.baseVestingAccount, w.uint32(10).fork()).ldelim(); + if (m.startTime != null && Object.hasOwnProperty.call(m, "startTime")) + w.uint32(16).int64(m.startTime); + return w; }; /** @@ -8896,140 +4456,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} ContinuousVestingAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ContinuousVestingAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ContinuousVestingAccount.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.auth.vesting.v1.ContinuousVestingAccount(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(reader, reader.uint32()); + m.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(r, r.uint32()); break; case 2: - message.startTime = reader.int64(); + m.startTime = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ContinuousVestingAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} ContinuousVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContinuousVestingAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ContinuousVestingAccount message. - * @function verify - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ContinuousVestingAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) { - var error = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify(message.baseVestingAccount); - if (error) - return "baseVestingAccount." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) - return "startTime: integer|Long expected"; - return null; - }; - - /** - * Creates a ContinuousVestingAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} ContinuousVestingAccount - */ - ContinuousVestingAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount) - return object; - var message = new $root.cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount(); - if (object.baseVestingAccount != null) { - if (typeof object.baseVestingAccount !== "object") - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.baseVestingAccount: object expected"); - message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.fromObject(object.baseVestingAccount); - } - if (object.startTime != null) - if ($util.Long) - (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false; - else if (typeof object.startTime === "string") - message.startTime = parseInt(object.startTime, 10); - else if (typeof object.startTime === "number") - message.startTime = object.startTime; - else if (typeof object.startTime === "object") - message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ContinuousVestingAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} message ContinuousVestingAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ContinuousVestingAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.baseVestingAccount = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startTime = options.longs === String ? "0" : 0; - } - if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) - object.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.toObject(message.baseVestingAccount, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (typeof message.startTime === "number") - object.startTime = options.longs === String ? String(message.startTime) : message.startTime; - else - object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; - return object; - }; - - /** - * Converts this ContinuousVestingAccount to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @instance - * @returns {Object.} JSON object - */ - ContinuousVestingAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ContinuousVestingAccount; @@ -9050,13 +4501,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a DelayedVestingAccount. * @implements IDelayedVestingAccount * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount=} [properties] Properties to set + * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount=} [p] Properties to set */ - function DelayedVestingAccount(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function DelayedVestingAccount(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]]; } /** @@ -9084,29 +4535,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount} message DelayedVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount} m DelayedVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DelayedVestingAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baseVestingAccount != null && Object.hasOwnProperty.call(message, "baseVestingAccount")) - $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DelayedVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount} message DelayedVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DelayedVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DelayedVestingAccount.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.baseVestingAccount != null && Object.hasOwnProperty.call(m, "baseVestingAccount")) + $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(m.baseVestingAccount, w.uint32(10).fork()).ldelim(); + return w; }; /** @@ -9114,114 +4552,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} DelayedVestingAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DelayedVestingAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + DelayedVestingAccount.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.auth.vesting.v1.DelayedVestingAccount(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(reader, reader.uint32()); + m.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a DelayedVestingAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} DelayedVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DelayedVestingAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DelayedVestingAccount message. - * @function verify - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DelayedVestingAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) { - var error = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify(message.baseVestingAccount); - if (error) - return "baseVestingAccount." + error; - } - return null; - }; - - /** - * Creates a DelayedVestingAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} DelayedVestingAccount - */ - DelayedVestingAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount) - return object; - var message = new $root.cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount(); - if (object.baseVestingAccount != null) { - if (typeof object.baseVestingAccount !== "object") - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.baseVestingAccount: object expected"); - message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.fromObject(object.baseVestingAccount); - } - return message; - }; - - /** - * Creates a plain object from a DelayedVestingAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} message DelayedVestingAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DelayedVestingAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.baseVestingAccount = null; - if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) - object.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.toObject(message.baseVestingAccount, options); - return object; - }; - - /** - * Converts this DelayedVestingAccount to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @instance - * @returns {Object.} JSON object - */ - DelayedVestingAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return DelayedVestingAccount; @@ -9243,14 +4595,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Period. * @implements IPeriod * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod=} [properties] Properties to set + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod=} [p] Properties to set */ - function Period(properties) { + function Period(p) { this.amount = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -9286,32 +4638,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.auth.vesting.v1.Period * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod} message Period message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod} m Period message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Period.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.length != null && Object.hasOwnProperty.call(message, "length")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.length); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Period message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod} message Period message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Period.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Period.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.length != null && Object.hasOwnProperty.call(m, "length")) + w.uint32(8).int64(m.length); + 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(18).fork()).ldelim(); + } + return w; }; /** @@ -9319,154 +4659,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.auth.vesting.v1.Period * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.auth.vesting.v1.Period} Period * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Period.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.Period(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Period.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.auth.vesting.v1.Period(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.length = reader.int64(); + m.length = r.int64(); break; case 2: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.amount && m.amount.length)) + m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Period message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.auth.vesting.v1.Period} Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Period.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Period message. - * @function verify - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Period.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.length != null && message.hasOwnProperty("length")) - if (!$util.isInteger(message.length) && !(message.length && $util.isInteger(message.length.low) && $util.isInteger(message.length.high))) - return "length: integer|Long expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (var i = 0; i < message.amount.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - return null; - }; - - /** - * Creates a Period message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.auth.vesting.v1.Period} Period - */ - Period.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.Period) - return object; - var message = new $root.cosmos_sdk.x.auth.vesting.v1.Period(); - if (object.length != null) - if ($util.Long) - (message.length = $util.Long.fromValue(object.length)).unsigned = false; - else if (typeof object.length === "string") - message.length = parseInt(object.length, 10); - else if (typeof object.length === "number") - message.length = object.length; - else if (typeof object.length === "object") - message.length = new $util.LongBits(object.length.low >>> 0, object.length.high >>> 0).toNumber(); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.Period.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.Period.amount: object expected"); - message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Period message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.Period} message Period - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Period.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.length = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.length = options.longs === String ? "0" : 0; - if (message.length != null && message.hasOwnProperty("length")) - if (typeof message.length === "number") - object.length = options.longs === String ? String(message.length) : message.length; - else - object.length = options.longs === String ? $util.Long.prototype.toString.call(message.length) : options.longs === Number ? new $util.LongBits(message.length.low >>> 0, message.length.high >>> 0).toNumber() : message.length; - if (message.amount && message.amount.length) { - object.amount = []; - for (var j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this Period to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @instance - * @returns {Object.} JSON object - */ - Period.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Period; @@ -9489,14 +4708,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a PeriodicVestingAccount. * @implements IPeriodicVestingAccount * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount=} [properties] Properties to set + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount=} [p] Properties to set */ - function PeriodicVestingAccount(properties) { + function PeriodicVestingAccount(p) { this.vestingPeriods = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -9540,34 +4759,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount} message PeriodicVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount} m PeriodicVestingAccount message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PeriodicVestingAccount.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.baseVestingAccount != null && Object.hasOwnProperty.call(message, "baseVestingAccount")) - $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(message.baseVestingAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.startTime); - if (message.vestingPeriods != null && message.vestingPeriods.length) - for (var i = 0; i < message.vestingPeriods.length; ++i) - $root.cosmos_sdk.x.auth.vesting.v1.Period.encode(message.vestingPeriods[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PeriodicVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount} message PeriodicVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeriodicVestingAccount.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + PeriodicVestingAccount.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.baseVestingAccount != null && Object.hasOwnProperty.call(m, "baseVestingAccount")) + $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(m.baseVestingAccount, w.uint32(10).fork()).ldelim(); + if (m.startTime != null && Object.hasOwnProperty.call(m, "startTime")) + w.uint32(16).int64(m.startTime); + if (m.vestingPeriods != null && m.vestingPeriods.length) { + for (var i = 0; i < m.vestingPeriods.length; ++i) + $root.cosmos_sdk.x.auth.vesting.v1.Period.encode(m.vestingPeriods[i], w.uint32(26).fork()).ldelim(); + } + return w; }; /** @@ -9575,171 +4782,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} PeriodicVestingAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PeriodicVestingAccount.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + PeriodicVestingAccount.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.auth.vesting.v1.PeriodicVestingAccount(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(reader, reader.uint32()); + m.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(r, r.uint32()); break; case 2: - message.startTime = reader.int64(); + m.startTime = r.int64(); break; case 3: - if (!(message.vestingPeriods && message.vestingPeriods.length)) - message.vestingPeriods = []; - message.vestingPeriods.push($root.cosmos_sdk.x.auth.vesting.v1.Period.decode(reader, reader.uint32())); + if (!(m.vestingPeriods && m.vestingPeriods.length)) + m.vestingPeriods = []; + m.vestingPeriods.push($root.cosmos_sdk.x.auth.vesting.v1.Period.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a PeriodicVestingAccount message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} PeriodicVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeriodicVestingAccount.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PeriodicVestingAccount message. - * @function verify - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PeriodicVestingAccount.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) { - var error = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify(message.baseVestingAccount); - if (error) - return "baseVestingAccount." + error; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (!$util.isInteger(message.startTime) && !(message.startTime && $util.isInteger(message.startTime.low) && $util.isInteger(message.startTime.high))) - return "startTime: integer|Long expected"; - if (message.vestingPeriods != null && message.hasOwnProperty("vestingPeriods")) { - if (!Array.isArray(message.vestingPeriods)) - return "vestingPeriods: array expected"; - for (var i = 0; i < message.vestingPeriods.length; ++i) { - var error = $root.cosmos_sdk.x.auth.vesting.v1.Period.verify(message.vestingPeriods[i]); - if (error) - return "vestingPeriods." + error; - } - } - return null; - }; - - /** - * Creates a PeriodicVestingAccount message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} PeriodicVestingAccount - */ - PeriodicVestingAccount.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount) - return object; - var message = new $root.cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount(); - if (object.baseVestingAccount != null) { - if (typeof object.baseVestingAccount !== "object") - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.baseVestingAccount: object expected"); - message.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.fromObject(object.baseVestingAccount); - } - if (object.startTime != null) - if ($util.Long) - (message.startTime = $util.Long.fromValue(object.startTime)).unsigned = false; - else if (typeof object.startTime === "string") - message.startTime = parseInt(object.startTime, 10); - else if (typeof object.startTime === "number") - message.startTime = object.startTime; - else if (typeof object.startTime === "object") - message.startTime = new $util.LongBits(object.startTime.low >>> 0, object.startTime.high >>> 0).toNumber(); - if (object.vestingPeriods) { - if (!Array.isArray(object.vestingPeriods)) - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.vestingPeriods: array expected"); - message.vestingPeriods = []; - for (var i = 0; i < object.vestingPeriods.length; ++i) { - if (typeof object.vestingPeriods[i] !== "object") - throw TypeError(".cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.vestingPeriods: object expected"); - message.vestingPeriods[i] = $root.cosmos_sdk.x.auth.vesting.v1.Period.fromObject(object.vestingPeriods[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PeriodicVestingAccount message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} message PeriodicVestingAccount - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PeriodicVestingAccount.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.vestingPeriods = []; - if (options.defaults) { - object.baseVestingAccount = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startTime = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startTime = options.longs === String ? "0" : 0; - } - if (message.baseVestingAccount != null && message.hasOwnProperty("baseVestingAccount")) - object.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.toObject(message.baseVestingAccount, options); - if (message.startTime != null && message.hasOwnProperty("startTime")) - if (typeof message.startTime === "number") - object.startTime = options.longs === String ? String(message.startTime) : message.startTime; - else - object.startTime = options.longs === String ? $util.Long.prototype.toString.call(message.startTime) : options.longs === Number ? new $util.LongBits(message.startTime.low >>> 0, message.startTime.high >>> 0).toNumber() : message.startTime; - if (message.vestingPeriods && message.vestingPeriods.length) { - object.vestingPeriods = []; - for (var j = 0; j < message.vestingPeriods.length; ++j) - object.vestingPeriods[j] = $root.cosmos_sdk.x.auth.vesting.v1.Period.toObject(message.vestingPeriods[j], options); - } - return object; - }; - - /** - * Converts this PeriodicVestingAccount to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @instance - * @returns {Object.} JSON object - */ - PeriodicVestingAccount.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return PeriodicVestingAccount; @@ -9955,13 +5027,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a QueryBalanceRequest. * @implements IQueryBalanceRequest * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest=} [p] Properties to set */ - function QueryBalanceRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function QueryBalanceRequest(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]]; } /** @@ -9997,31 +5069,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest * @static - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} message QueryBalanceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} m QueryBalanceRequest message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryBalanceRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.denom); - return writer; - }; - - /** - * Encodes the specified QueryBalanceRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} message QueryBalanceRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBalanceRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryBalanceRequest.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.denom != null && Object.hasOwnProperty.call(m, "denom")) + w.uint32(18).string(m.denom); + return w; }; /** @@ -10029,130 +5088,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.QueryBalanceRequest} QueryBalanceRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryBalanceRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryBalanceRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + QueryBalanceRequest.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.QueryBalanceRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.address = reader.bytes(); + m.address = r.bytes(); break; case 2: - message.denom = reader.string(); + m.denom = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a QueryBalanceRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.QueryBalanceRequest} QueryBalanceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBalanceRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryBalanceRequest message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryBalanceRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) - return "address: buffer expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - return null; - }; - - /** - * Creates a QueryBalanceRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.QueryBalanceRequest} QueryBalanceRequest - */ - QueryBalanceRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryBalanceRequest) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.QueryBalanceRequest(); - if (object.address != null) - if (typeof object.address === "string") - $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); - else if (object.address.length) - message.address = object.address; - if (object.denom != null) - message.denom = String(object.denom); - return message; - }; - - /** - * Creates a plain object from a QueryBalanceRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @static - * @param {cosmos_sdk.x.bank.v1.QueryBalanceRequest} message QueryBalanceRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryBalanceRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.address = ""; - else { - object.address = []; - if (options.bytes !== Array) - object.address = $util.newBuffer(object.address); - } - object.denom = ""; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - return object; - }; - - /** - * Converts this QueryBalanceRequest to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @instance - * @returns {Object.} JSON object - */ - QueryBalanceRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return QueryBalanceRequest; @@ -10173,13 +5133,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a QueryBalanceResponse. * @implements IQueryBalanceResponse * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse=} [p] Properties to set */ - function QueryBalanceResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function QueryBalanceResponse(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]]; } /** @@ -10207,29 +5167,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse * @static - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse} message QueryBalanceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse} m QueryBalanceResponse message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryBalanceResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) - $root.cosmos_sdk.v1.Coin.encode(message.balance, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryBalanceResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse} message QueryBalanceResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBalanceResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryBalanceResponse.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.balance != null && Object.hasOwnProperty.call(m, "balance")) + $root.cosmos_sdk.v1.Coin.encode(m.balance, w.uint32(10).fork()).ldelim(); + return w; }; /** @@ -10237,114 +5184,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.QueryBalanceResponse} QueryBalanceResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryBalanceResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryBalanceResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + QueryBalanceResponse.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.QueryBalanceResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.balance = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + m.balance = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a QueryBalanceResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.QueryBalanceResponse} QueryBalanceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBalanceResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryBalanceResponse message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryBalanceResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.balance != null && message.hasOwnProperty("balance")) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.balance); - if (error) - return "balance." + error; - } - return null; - }; - - /** - * Creates a QueryBalanceResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.QueryBalanceResponse} QueryBalanceResponse - */ - QueryBalanceResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryBalanceResponse) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.QueryBalanceResponse(); - if (object.balance != null) { - if (typeof object.balance !== "object") - throw TypeError(".cosmos_sdk.x.bank.v1.QueryBalanceResponse.balance: object expected"); - message.balance = $root.cosmos_sdk.v1.Coin.fromObject(object.balance); - } - return message; - }; - - /** - * Creates a plain object from a QueryBalanceResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @static - * @param {cosmos_sdk.x.bank.v1.QueryBalanceResponse} message QueryBalanceResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryBalanceResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.balance = null; - if (message.balance != null && message.hasOwnProperty("balance")) - object.balance = $root.cosmos_sdk.v1.Coin.toObject(message.balance, options); - return object; - }; - - /** - * Converts this QueryBalanceResponse to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @instance - * @returns {Object.} JSON object - */ - QueryBalanceResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return QueryBalanceResponse; @@ -10365,13 +5226,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a QueryAllBalancesRequest. * @implements IQueryAllBalancesRequest * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest=} [p] Properties to set */ - function QueryAllBalancesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function QueryAllBalancesRequest(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]]; } /** @@ -10399,29 +5260,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest * @static - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} message QueryAllBalancesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} m QueryAllBalancesRequest message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryAllBalancesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); - return writer; - }; - - /** - * Encodes the specified QueryAllBalancesRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} message QueryAllBalancesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAllBalancesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryAllBalancesRequest.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); + return w; }; /** @@ -10429,118 +5277,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} QueryAllBalancesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryAllBalancesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryAllBalancesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + QueryAllBalancesRequest.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.QueryAllBalancesRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.address = reader.bytes(); + m.address = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a QueryAllBalancesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} QueryAllBalancesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAllBalancesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAllBalancesRequest message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAllBalancesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) - return "address: buffer expected"; - return null; - }; - - /** - * Creates a QueryAllBalancesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} QueryAllBalancesRequest - */ - QueryAllBalancesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryAllBalancesRequest) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.QueryAllBalancesRequest(); - if (object.address != null) - if (typeof object.address === "string") - $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); - else if (object.address.length) - message.address = object.address; - return message; - }; - - /** - * Creates a plain object from a QueryAllBalancesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @static - * @param {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} message QueryAllBalancesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAllBalancesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.address = ""; - else { - object.address = []; - if (options.bytes !== Array) - object.address = $util.newBuffer(object.address); - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; - return object; - }; - - /** - * Converts this QueryAllBalancesRequest to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @instance - * @returns {Object.} JSON object - */ - QueryAllBalancesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return QueryAllBalancesRequest; @@ -10561,14 +5319,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a QueryAllBalancesResponse. * @implements IQueryAllBalancesResponse * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse=} [p] Properties to set */ - function QueryAllBalancesResponse(properties) { + function QueryAllBalancesResponse(p) { this.balances = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -10596,30 +5354,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse * @static - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse} message QueryAllBalancesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse} m QueryAllBalancesResponse message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryAllBalancesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.balances != null && message.balances.length) - for (var i = 0; i < message.balances.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.balances[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryAllBalancesResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse} message QueryAllBalancesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAllBalancesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryAllBalancesResponse.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.balances != null && m.balances.length) { + for (var i = 0; i < m.balances.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(m.balances[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -10627,128 +5373,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} QueryAllBalancesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryAllBalancesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryAllBalancesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + QueryAllBalancesResponse.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.QueryAllBalancesResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.balances && message.balances.length)) - message.balances = []; - message.balances.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.balances && m.balances.length)) + m.balances = []; + m.balances.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a QueryAllBalancesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} QueryAllBalancesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAllBalancesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryAllBalancesResponse message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryAllBalancesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.balances != null && message.hasOwnProperty("balances")) { - if (!Array.isArray(message.balances)) - return "balances: array expected"; - for (var i = 0; i < message.balances.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.balances[i]); - if (error) - return "balances." + error; - } - } - return null; - }; - - /** - * Creates a QueryAllBalancesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} QueryAllBalancesResponse - */ - QueryAllBalancesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryAllBalancesResponse) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.QueryAllBalancesResponse(); - if (object.balances) { - if (!Array.isArray(object.balances)) - throw TypeError(".cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.balances: array expected"); - message.balances = []; - for (var i = 0; i < object.balances.length; ++i) { - if (typeof object.balances[i] !== "object") - throw TypeError(".cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.balances: object expected"); - message.balances[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.balances[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryAllBalancesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @static - * @param {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} message QueryAllBalancesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryAllBalancesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.balances = []; - if (message.balances && message.balances.length) { - object.balances = []; - for (var j = 0; j < message.balances.length; ++j) - object.balances[j] = $root.cosmos_sdk.v1.Coin.toObject(message.balances[j], options); - } - return object; - }; - - /** - * Converts this QueryAllBalancesResponse to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @instance - * @returns {Object.} JSON object - */ - QueryAllBalancesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return QueryAllBalancesResponse; @@ -10768,13 +5416,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a QueryTotalSupplyRequest. * @implements IQueryTotalSupplyRequest * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest=} [p] Properties to set */ - function QueryTotalSupplyRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function QueryTotalSupplyRequest(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]]; } /** @@ -10794,27 +5442,14 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest * @static - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} message QueryTotalSupplyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} m QueryTotalSupplyRequest message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryTotalSupplyRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified QueryTotalSupplyRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} message QueryTotalSupplyRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalSupplyRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryTotalSupplyRequest.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + return w; }; /** @@ -10822,93 +5457,25 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} QueryTotalSupplyRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryTotalSupplyRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + QueryTotalSupplyRequest.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.QueryTotalSupplyRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} QueryTotalSupplyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalSupplyRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalSupplyRequest message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalSupplyRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a QueryTotalSupplyRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} QueryTotalSupplyRequest - */ - QueryTotalSupplyRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest) - return object; - return new $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest(); - }; - - /** - * Creates a plain object from a QueryTotalSupplyRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest - * @static - * @param {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} message QueryTotalSupplyRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalSupplyRequest.toObject = function toObject() { - return {}; - }; - - /** - * Converts this QueryTotalSupplyRequest to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest - * @instance - * @returns {Object.} JSON object - */ - QueryTotalSupplyRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return QueryTotalSupplyRequest; @@ -10929,14 +5496,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a QueryTotalSupplyResponse. * @implements IQueryTotalSupplyResponse * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse=} [p] Properties to set */ - function QueryTotalSupplyResponse(properties) { + function QueryTotalSupplyResponse(p) { this.supply = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -10964,30 +5531,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse * @static - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse} message QueryTotalSupplyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse} m QueryTotalSupplyResponse message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryTotalSupplyResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.supply != null && message.supply.length) - for (var i = 0; i < message.supply.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.supply[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QueryTotalSupplyResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse} message QueryTotalSupplyResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalSupplyResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QueryTotalSupplyResponse.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.supply != null && m.supply.length) { + for (var i = 0; i < m.supply.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(m.supply[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -10995,128 +5550,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} QueryTotalSupplyResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryTotalSupplyResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + QueryTotalSupplyResponse.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.QueryTotalSupplyResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.supply && message.supply.length)) - message.supply = []; - message.supply.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.supply && m.supply.length)) + m.supply = []; + m.supply.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} QueryTotalSupplyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalSupplyResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QueryTotalSupplyResponse message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QueryTotalSupplyResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.supply != null && message.hasOwnProperty("supply")) { - if (!Array.isArray(message.supply)) - return "supply: array expected"; - for (var i = 0; i < message.supply.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.supply[i]); - if (error) - return "supply." + error; - } - } - return null; - }; - - /** - * Creates a QueryTotalSupplyResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} QueryTotalSupplyResponse - */ - QueryTotalSupplyResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse(); - if (object.supply) { - if (!Array.isArray(object.supply)) - throw TypeError(".cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.supply: array expected"); - message.supply = []; - for (var i = 0; i < object.supply.length; ++i) { - if (typeof object.supply[i] !== "object") - throw TypeError(".cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.supply: object expected"); - message.supply[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.supply[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QueryTotalSupplyResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @static - * @param {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} message QueryTotalSupplyResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QueryTotalSupplyResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.supply = []; - if (message.supply && message.supply.length) { - object.supply = []; - for (var j = 0; j < message.supply.length; ++j) - object.supply[j] = $root.cosmos_sdk.v1.Coin.toObject(message.supply[j], options); - } - return object; - }; - - /** - * Converts this QueryTotalSupplyResponse to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @instance - * @returns {Object.} JSON object - */ - QueryTotalSupplyResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return QueryTotalSupplyResponse; @@ -11137,13 +5594,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a QuerySupplyOfRequest. * @implements IQuerySupplyOfRequest * @constructor - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest=} [p] Properties to set */ - function QuerySupplyOfRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function QuerySupplyOfRequest(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]]; } /** @@ -11171,29 +5628,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest * @static - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} message QuerySupplyOfRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} m QuerySupplyOfRequest message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuerySupplyOfRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.denom != null && Object.hasOwnProperty.call(message, "denom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.denom); - return writer; - }; - - /** - * Encodes the specified QuerySupplyOfRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} message QuerySupplyOfRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySupplyOfRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QuerySupplyOfRequest.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); + return w; }; /** @@ -11201,109 +5645,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} QuerySupplyOfRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuerySupplyOfRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QuerySupplyOfRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + QuerySupplyOfRequest.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.QuerySupplyOfRequest(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.denom = reader.string(); + m.denom = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a QuerySupplyOfRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} QuerySupplyOfRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySupplyOfRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuerySupplyOfRequest message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuerySupplyOfRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.denom != null && message.hasOwnProperty("denom")) - if (!$util.isString(message.denom)) - return "denom: string expected"; - return null; - }; - - /** - * Creates a QuerySupplyOfRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} QuerySupplyOfRequest - */ - QuerySupplyOfRequest.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.QuerySupplyOfRequest) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.QuerySupplyOfRequest(); - if (object.denom != null) - message.denom = String(object.denom); - return message; - }; - - /** - * Creates a plain object from a QuerySupplyOfRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @static - * @param {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} message QuerySupplyOfRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuerySupplyOfRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.denom = ""; - if (message.denom != null && message.hasOwnProperty("denom")) - object.denom = message.denom; - return object; - }; - - /** - * Converts this QuerySupplyOfRequest to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @instance - * @returns {Object.} JSON object - */ - QuerySupplyOfRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return QuerySupplyOfRequest; @@ -11324,13 +5687,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a QuerySupplyOfResponse. * @implements IQuerySupplyOfResponse * @constructor - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse=} [p] Properties to set */ - function QuerySupplyOfResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function QuerySupplyOfResponse(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]]; } /** @@ -11358,29 +5721,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse * @static - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse} message QuerySupplyOfResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse} m QuerySupplyOfResponse message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QuerySupplyOfResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.amount); - return writer; - }; - - /** - * Encodes the specified QuerySupplyOfResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse} message QuerySupplyOfResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySupplyOfResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + QuerySupplyOfResponse.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) + w.uint32(10).string(m.amount); + return w; }; /** @@ -11388,109 +5738,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} QuerySupplyOfResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QuerySupplyOfResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.QuerySupplyOfResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + QuerySupplyOfResponse.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.QuerySupplyOfResponse(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.amount = reader.string(); + m.amount = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a QuerySupplyOfResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} QuerySupplyOfResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySupplyOfResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuerySupplyOfResponse message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuerySupplyOfResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.amount != null && message.hasOwnProperty("amount")) - if (!$util.isString(message.amount)) - return "amount: string expected"; - return null; - }; - - /** - * Creates a QuerySupplyOfResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} QuerySupplyOfResponse - */ - QuerySupplyOfResponse.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.QuerySupplyOfResponse) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.QuerySupplyOfResponse(); - if (object.amount != null) - message.amount = String(object.amount); - return message; - }; - - /** - * Creates a plain object from a QuerySupplyOfResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @static - * @param {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} message QuerySupplyOfResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuerySupplyOfResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.amount = ""; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = message.amount; - return object; - }; - - /** - * Converts this QuerySupplyOfResponse to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @instance - * @returns {Object.} JSON object - */ - QuerySupplyOfResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return QuerySupplyOfResponse; @@ -11513,14 +5782,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgSend. * @implements IMsgSend * @constructor - * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [p] Properties to set */ - function MsgSend(properties) { + function MsgSend(p) { this.amount = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -11564,34 +5833,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.MsgSend * @static - * @param {cosmos_sdk.x.bank.v1.IMsgSend} message MsgSend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IMsgSend} m MsgSend message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgSend.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fromAddress != null && Object.hasOwnProperty.call(message, "fromAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.fromAddress); - if (message.toAddress != null && Object.hasOwnProperty.call(message, "toAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.toAddress); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgSend} message MsgSend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -11599,170 +5856,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.MsgSend * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgSend.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.MsgSend(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.fromAddress = reader.bytes(); + m.fromAddress = r.bytes(); break; case 2: - message.toAddress = reader.bytes(); + m.toAddress = r.bytes(); break; case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.amount && m.amount.length)) + m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgSend message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSend.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSend message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSend.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) - if (!(message.fromAddress && typeof message.fromAddress.length === "number" || $util.isString(message.fromAddress))) - return "fromAddress: buffer expected"; - if (message.toAddress != null && message.hasOwnProperty("toAddress")) - if (!(message.toAddress && typeof message.toAddress.length === "number" || $util.isString(message.toAddress))) - return "toAddress: buffer expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (var i = 0; i < message.amount.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - return null; - }; - - /** - * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend - */ - MsgSend.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.MsgSend) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.MsgSend(); - if (object.fromAddress != null) - if (typeof object.fromAddress === "string") - $util.base64.decode(object.fromAddress, message.fromAddress = $util.newBuffer($util.base64.length(object.fromAddress)), 0); - else if (object.fromAddress.length) - message.fromAddress = object.fromAddress; - if (object.toAddress != null) - if (typeof object.toAddress === "string") - $util.base64.decode(object.toAddress, message.toAddress = $util.newBuffer($util.base64.length(object.toAddress)), 0); - else if (object.toAddress.length) - message.toAddress = object.toAddress; - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos_sdk.x.bank.v1.MsgSend.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos_sdk.x.bank.v1.MsgSend.amount: object expected"); - message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MsgSend message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {cosmos_sdk.x.bank.v1.MsgSend} message MsgSend - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSend.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - if (options.bytes === String) - object.fromAddress = ""; - else { - object.fromAddress = []; - if (options.bytes !== Array) - object.fromAddress = $util.newBuffer(object.fromAddress); - } - if (options.bytes === String) - object.toAddress = ""; - else { - object.toAddress = []; - if (options.bytes !== Array) - object.toAddress = $util.newBuffer(object.toAddress); - } - } - if (message.fromAddress != null && message.hasOwnProperty("fromAddress")) - object.fromAddress = options.bytes === String ? $util.base64.encode(message.fromAddress, 0, message.fromAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.fromAddress) : message.fromAddress; - if (message.toAddress != null && message.hasOwnProperty("toAddress")) - object.toAddress = options.bytes === String ? $util.base64.encode(message.toAddress, 0, message.toAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.toAddress) : message.toAddress; - if (message.amount && message.amount.length) { - object.amount = []; - for (var j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this MsgSend to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @instance - * @returns {Object.} JSON object - */ - MsgSend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgSend; @@ -11784,14 +5907,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an Input. * @implements IInput * @constructor - * @param {cosmos_sdk.x.bank.v1.IInput=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IInput=} [p] Properties to set */ - function Input(properties) { + function Input(p) { this.coins = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -11827,32 +5950,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.Input * @static - * @param {cosmos_sdk.x.bank.v1.IInput} message Input message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IInput} m Input message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Input.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); - if (message.coins != null && message.coins.length) - for (var i = 0; i < message.coins.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {cosmos_sdk.x.bank.v1.IInput} message Input message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Input.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -11860,149 +5971,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.Input * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.Input} Input * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Input.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.Input(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.address = reader.bytes(); + m.address = r.bytes(); break; case 2: - if (!(message.coins && message.coins.length)) - message.coins = []; - message.coins.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.coins && m.coins.length)) + m.coins = []; + m.coins.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an Input message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.Input} Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Input.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Input message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Input.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) - return "address: buffer expected"; - if (message.coins != null && message.hasOwnProperty("coins")) { - if (!Array.isArray(message.coins)) - return "coins: array expected"; - for (var i = 0; i < message.coins.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.coins[i]); - if (error) - return "coins." + error; - } - } - return null; - }; - - /** - * Creates an Input message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.Input} Input - */ - Input.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.Input) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.Input(); - if (object.address != null) - if (typeof object.address === "string") - $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); - else if (object.address.length) - message.address = object.address; - if (object.coins) { - if (!Array.isArray(object.coins)) - throw TypeError(".cosmos_sdk.x.bank.v1.Input.coins: array expected"); - message.coins = []; - for (var i = 0; i < object.coins.length; ++i) { - if (typeof object.coins[i] !== "object") - throw TypeError(".cosmos_sdk.x.bank.v1.Input.coins: object expected"); - message.coins[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.coins[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Input message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {cosmos_sdk.x.bank.v1.Input} message Input - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Input.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.coins = []; - if (options.defaults) - if (options.bytes === String) - object.address = ""; - else { - object.address = []; - if (options.bytes !== Array) - object.address = $util.newBuffer(object.address); - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; - if (message.coins && message.coins.length) { - object.coins = []; - for (var j = 0; j < message.coins.length; ++j) - object.coins[j] = $root.cosmos_sdk.v1.Coin.toObject(message.coins[j], options); - } - return object; - }; - - /** - * Converts this Input to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.Input - * @instance - * @returns {Object.} JSON object - */ - Input.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Input; @@ -12024,14 +6019,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an Output. * @implements IOutput * @constructor - * @param {cosmos_sdk.x.bank.v1.IOutput=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IOutput=} [p] Properties to set */ - function Output(properties) { + function Output(p) { this.coins = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -12067,32 +6062,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.Output * @static - * @param {cosmos_sdk.x.bank.v1.IOutput} message Output message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IOutput} m Output message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Output.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); - if (message.coins != null && message.coins.length) - for (var i = 0; i < message.coins.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.coins[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {cosmos_sdk.x.bank.v1.IOutput} message Output message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Output.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -12100,149 +6083,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.Output * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.Output} Output * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Output.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.Output(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.address = reader.bytes(); + m.address = r.bytes(); break; case 2: - if (!(message.coins && message.coins.length)) - message.coins = []; - message.coins.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.coins && m.coins.length)) + m.coins = []; + m.coins.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an Output message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.Output} Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Output.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Output message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Output.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) - return "address: buffer expected"; - if (message.coins != null && message.hasOwnProperty("coins")) { - if (!Array.isArray(message.coins)) - return "coins: array expected"; - for (var i = 0; i < message.coins.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.coins[i]); - if (error) - return "coins." + error; - } - } - return null; - }; - - /** - * Creates an Output message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.Output} Output - */ - Output.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.Output) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.Output(); - if (object.address != null) - if (typeof object.address === "string") - $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); - else if (object.address.length) - message.address = object.address; - if (object.coins) { - if (!Array.isArray(object.coins)) - throw TypeError(".cosmos_sdk.x.bank.v1.Output.coins: array expected"); - message.coins = []; - for (var i = 0; i < object.coins.length; ++i) { - if (typeof object.coins[i] !== "object") - throw TypeError(".cosmos_sdk.x.bank.v1.Output.coins: object expected"); - message.coins[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.coins[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Output message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {cosmos_sdk.x.bank.v1.Output} message Output - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Output.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.coins = []; - if (options.defaults) - if (options.bytes === String) - object.address = ""; - else { - object.address = []; - if (options.bytes !== Array) - object.address = $util.newBuffer(object.address); - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; - if (message.coins && message.coins.length) { - object.coins = []; - for (var j = 0; j < message.coins.length; ++j) - object.coins[j] = $root.cosmos_sdk.v1.Coin.toObject(message.coins[j], options); - } - return object; - }; - - /** - * Converts this Output to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.Output - * @instance - * @returns {Object.} JSON object - */ - Output.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Output; @@ -12264,15 +6131,15 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgMultiSend. * @implements IMsgMultiSend * @constructor - * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [p] Properties to set */ - function MsgMultiSend(properties) { + function MsgMultiSend(p) { this.inputs = []; this.outputs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -12308,33 +6175,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend * @static - * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend} message MsgMultiSend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend} m MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgMultiSend.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputs != null && message.inputs.length) - for (var i = 0; i < message.inputs.length; ++i) - $root.cosmos_sdk.x.bank.v1.Input.encode(message.inputs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.outputs != null && message.outputs.length) - for (var i = 0; i < message.outputs.length; ++i) - $root.cosmos_sdk.x.bank.v1.Output.encode(message.outputs[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend} message MsgMultiSend message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgMultiSend.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -12342,159 +6198,35 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgMultiSend.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.MsgMultiSend(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.inputs && message.inputs.length)) - message.inputs = []; - message.inputs.push($root.cosmos_sdk.x.bank.v1.Input.decode(reader, reader.uint32())); + 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 (!(message.outputs && message.outputs.length)) - message.outputs = []; - message.outputs.push($root.cosmos_sdk.x.bank.v1.Output.decode(reader, reader.uint32())); + if (!(m.outputs && m.outputs.length)) + m.outputs = []; + m.outputs.push($root.cosmos_sdk.x.bank.v1.Output.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMultiSend.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgMultiSend message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgMultiSend.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputs != null && message.hasOwnProperty("inputs")) { - if (!Array.isArray(message.inputs)) - return "inputs: array expected"; - for (var i = 0; i < message.inputs.length; ++i) { - var error = $root.cosmos_sdk.x.bank.v1.Input.verify(message.inputs[i]); - if (error) - return "inputs." + error; - } - } - if (message.outputs != null && message.hasOwnProperty("outputs")) { - if (!Array.isArray(message.outputs)) - return "outputs: array expected"; - for (var i = 0; i < message.outputs.length; ++i) { - var error = $root.cosmos_sdk.x.bank.v1.Output.verify(message.outputs[i]); - if (error) - return "outputs." + error; - } - } - return null; - }; - - /** - * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend - */ - MsgMultiSend.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.MsgMultiSend) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.MsgMultiSend(); - if (object.inputs) { - if (!Array.isArray(object.inputs)) - throw TypeError(".cosmos_sdk.x.bank.v1.MsgMultiSend.inputs: array expected"); - message.inputs = []; - for (var i = 0; i < object.inputs.length; ++i) { - if (typeof object.inputs[i] !== "object") - throw TypeError(".cosmos_sdk.x.bank.v1.MsgMultiSend.inputs: object expected"); - message.inputs[i] = $root.cosmos_sdk.x.bank.v1.Input.fromObject(object.inputs[i]); - } - } - if (object.outputs) { - if (!Array.isArray(object.outputs)) - throw TypeError(".cosmos_sdk.x.bank.v1.MsgMultiSend.outputs: array expected"); - message.outputs = []; - for (var i = 0; i < object.outputs.length; ++i) { - if (typeof object.outputs[i] !== "object") - throw TypeError(".cosmos_sdk.x.bank.v1.MsgMultiSend.outputs: object expected"); - message.outputs[i] = $root.cosmos_sdk.x.bank.v1.Output.fromObject(object.outputs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {cosmos_sdk.x.bank.v1.MsgMultiSend} message MsgMultiSend - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgMultiSend.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.inputs = []; - object.outputs = []; - } - if (message.inputs && message.inputs.length) { - object.inputs = []; - for (var j = 0; j < message.inputs.length; ++j) - object.inputs[j] = $root.cosmos_sdk.x.bank.v1.Input.toObject(message.inputs[j], options); - } - if (message.outputs && message.outputs.length) { - object.outputs = []; - for (var j = 0; j < message.outputs.length; ++j) - object.outputs[j] = $root.cosmos_sdk.x.bank.v1.Output.toObject(message.outputs[j], options); - } - return object; - }; - - /** - * Converts this MsgMultiSend to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @instance - * @returns {Object.} JSON object - */ - MsgMultiSend.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgMultiSend; @@ -12515,14 +6247,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Supply. * @implements ISupply * @constructor - * @param {cosmos_sdk.x.bank.v1.ISupply=} [properties] Properties to set + * @param {cosmos_sdk.x.bank.v1.ISupply=} [p] Properties to set */ - function Supply(properties) { + function Supply(p) { this.total = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -12550,30 +6282,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.bank.v1.Supply * @static - * @param {cosmos_sdk.x.bank.v1.ISupply} message Supply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.bank.v1.ISupply} m Supply message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Supply.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.total != null && message.total.length) - for (var i = 0; i < message.total.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.total[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {cosmos_sdk.x.bank.v1.ISupply} message Supply message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Supply.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -12581,128 +6301,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.bank.v1.Supply * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.bank.v1.Supply} Supply * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Supply.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.bank.v1.Supply(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.total && message.total.length)) - message.total = []; - message.total.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.total && m.total.length)) + m.total = []; + m.total.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Supply message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.bank.v1.Supply} Supply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Supply.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Supply message. - * @function verify - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Supply.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.total != null && message.hasOwnProperty("total")) { - if (!Array.isArray(message.total)) - return "total: array expected"; - for (var i = 0; i < message.total.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.total[i]); - if (error) - return "total." + error; - } - } - return null; - }; - - /** - * Creates a Supply message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.bank.v1.Supply} Supply - */ - Supply.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.bank.v1.Supply) - return object; - var message = new $root.cosmos_sdk.x.bank.v1.Supply(); - if (object.total) { - if (!Array.isArray(object.total)) - throw TypeError(".cosmos_sdk.x.bank.v1.Supply.total: array expected"); - message.total = []; - for (var i = 0; i < object.total.length; ++i) { - if (typeof object.total[i] !== "object") - throw TypeError(".cosmos_sdk.x.bank.v1.Supply.total: object expected"); - message.total[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.total[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Supply message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {cosmos_sdk.x.bank.v1.Supply} message Supply - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Supply.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.total = []; - if (message.total && message.total.length) { - object.total = []; - for (var j = 0; j < message.total.length; ++j) - object.total[j] = $root.cosmos_sdk.v1.Coin.toObject(message.total[j], options); - } - return object; - }; - - /** - * Converts this Supply to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.bank.v1.Supply - * @instance - * @returns {Object.} JSON object - */ - Supply.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Supply; @@ -12747,13 +6369,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Capability. * @implements ICapability * @constructor - * @param {cosmos_sdk.x.capability.v1.ICapability=} [properties] Properties to set + * @param {cosmos_sdk.x.capability.v1.ICapability=} [p] Properties to set */ - function Capability(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Capability(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]]; } /** @@ -12781,29 +6403,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.capability.v1.Capability * @static - * @param {cosmos_sdk.x.capability.v1.ICapability} message Capability message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.capability.v1.ICapability} m Capability message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Capability.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.index); - return writer; - }; - - /** - * Encodes the specified Capability message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.capability.v1.Capability - * @static - * @param {cosmos_sdk.x.capability.v1.ICapability} message Capability message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Capability.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Capability.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.index != null && Object.hasOwnProperty.call(m, "index")) + w.uint32(8).uint64(m.index); + return w; }; /** @@ -12811,123 +6420,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.capability.v1.Capability * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.capability.v1.Capability} Capability * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Capability.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.capability.v1.Capability(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Capability.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.capability.v1.Capability(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.index = reader.uint64(); + m.index = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Capability message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.capability.v1.Capability - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.capability.v1.Capability} Capability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Capability.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Capability message. - * @function verify - * @memberof cosmos_sdk.x.capability.v1.Capability - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Capability.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.index != null && message.hasOwnProperty("index")) - if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) - return "index: integer|Long expected"; - return null; - }; - - /** - * Creates a Capability message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.capability.v1.Capability - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.capability.v1.Capability} Capability - */ - Capability.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.capability.v1.Capability) - return object; - var message = new $root.cosmos_sdk.x.capability.v1.Capability(); - if (object.index != null) - if ($util.Long) - (message.index = $util.Long.fromValue(object.index)).unsigned = true; - else if (typeof object.index === "string") - message.index = parseInt(object.index, 10); - else if (typeof object.index === "number") - message.index = object.index; - else if (typeof object.index === "object") - message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Capability message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.capability.v1.Capability - * @static - * @param {cosmos_sdk.x.capability.v1.Capability} message Capability - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Capability.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.index = options.longs === String ? "0" : 0; - if (message.index != null && message.hasOwnProperty("index")) - if (typeof message.index === "number") - object.index = options.longs === String ? String(message.index) : message.index; - else - object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber(true) : message.index; - return object; - }; - - /** - * Converts this Capability to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.capability.v1.Capability - * @instance - * @returns {Object.} JSON object - */ - Capability.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Capability; @@ -12949,13 +6463,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an Owner. * @implements IOwner * @constructor - * @param {cosmos_sdk.x.capability.v1.IOwner=} [properties] Properties to set + * @param {cosmos_sdk.x.capability.v1.IOwner=} [p] Properties to set */ - function Owner(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Owner(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]]; } /** @@ -12991,31 +6505,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.capability.v1.Owner * @static - * @param {cosmos_sdk.x.capability.v1.IOwner} message Owner message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.capability.v1.IOwner} m Owner message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Owner.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.module != null && Object.hasOwnProperty.call(message, "module")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.module); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - return writer; - }; - - /** - * Encodes the specified Owner message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.capability.v1.Owner - * @static - * @param {cosmos_sdk.x.capability.v1.IOwner} message Owner message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Owner.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Owner.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.module != null && Object.hasOwnProperty.call(m, "module")) + w.uint32(10).string(m.module); + if (m.name != null && Object.hasOwnProperty.call(m, "name")) + w.uint32(18).string(m.name); + return w; }; /** @@ -13023,121 +6524,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.capability.v1.Owner * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.capability.v1.Owner} Owner * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Owner.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.capability.v1.Owner(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Owner.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.capability.v1.Owner(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.module = reader.string(); + m.module = r.string(); break; case 2: - message.name = reader.string(); + m.name = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an Owner message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.capability.v1.Owner - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.capability.v1.Owner} Owner - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Owner.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Owner message. - * @function verify - * @memberof cosmos_sdk.x.capability.v1.Owner - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Owner.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.module != null && message.hasOwnProperty("module")) - if (!$util.isString(message.module)) - return "module: string expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates an Owner message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.capability.v1.Owner - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.capability.v1.Owner} Owner - */ - Owner.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.capability.v1.Owner) - return object; - var message = new $root.cosmos_sdk.x.capability.v1.Owner(); - if (object.module != null) - message.module = String(object.module); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from an Owner message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.capability.v1.Owner - * @static - * @param {cosmos_sdk.x.capability.v1.Owner} message Owner - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Owner.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.module = ""; - object.name = ""; - } - if (message.module != null && message.hasOwnProperty("module")) - object.module = message.module; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this Owner to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.capability.v1.Owner - * @instance - * @returns {Object.} JSON object - */ - Owner.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Owner; @@ -13158,14 +6569,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a CapabilityOwners. * @implements ICapabilityOwners * @constructor - * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners=} [properties] Properties to set + * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners=} [p] Properties to set */ - function CapabilityOwners(properties) { + function CapabilityOwners(p) { this.owners = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -13193,30 +6604,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners * @static - * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners} message CapabilityOwners message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners} m CapabilityOwners message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CapabilityOwners.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.owners != null && message.owners.length) - for (var i = 0; i < message.owners.length; ++i) - $root.cosmos_sdk.x.capability.v1.Owner.encode(message.owners[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CapabilityOwners message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @static - * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners} message CapabilityOwners message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CapabilityOwners.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CapabilityOwners.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.owners != null && m.owners.length) { + for (var i = 0; i < m.owners.length; ++i) + $root.cosmos_sdk.x.capability.v1.Owner.encode(m.owners[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -13224,128 +6623,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.capability.v1.CapabilityOwners} CapabilityOwners * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CapabilityOwners.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.capability.v1.CapabilityOwners(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + CapabilityOwners.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.capability.v1.CapabilityOwners(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.owners && message.owners.length)) - message.owners = []; - message.owners.push($root.cosmos_sdk.x.capability.v1.Owner.decode(reader, reader.uint32())); + if (!(m.owners && m.owners.length)) + m.owners = []; + m.owners.push($root.cosmos_sdk.x.capability.v1.Owner.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a CapabilityOwners message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.capability.v1.CapabilityOwners} CapabilityOwners - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CapabilityOwners.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CapabilityOwners message. - * @function verify - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CapabilityOwners.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.owners != null && message.hasOwnProperty("owners")) { - if (!Array.isArray(message.owners)) - return "owners: array expected"; - for (var i = 0; i < message.owners.length; ++i) { - var error = $root.cosmos_sdk.x.capability.v1.Owner.verify(message.owners[i]); - if (error) - return "owners." + error; - } - } - return null; - }; - - /** - * Creates a CapabilityOwners message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.capability.v1.CapabilityOwners} CapabilityOwners - */ - CapabilityOwners.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.capability.v1.CapabilityOwners) - return object; - var message = new $root.cosmos_sdk.x.capability.v1.CapabilityOwners(); - if (object.owners) { - if (!Array.isArray(object.owners)) - throw TypeError(".cosmos_sdk.x.capability.v1.CapabilityOwners.owners: array expected"); - message.owners = []; - for (var i = 0; i < object.owners.length; ++i) { - if (typeof object.owners[i] !== "object") - throw TypeError(".cosmos_sdk.x.capability.v1.CapabilityOwners.owners: object expected"); - message.owners[i] = $root.cosmos_sdk.x.capability.v1.Owner.fromObject(object.owners[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CapabilityOwners message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @static - * @param {cosmos_sdk.x.capability.v1.CapabilityOwners} message CapabilityOwners - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CapabilityOwners.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.owners = []; - if (message.owners && message.owners.length) { - object.owners = []; - for (var j = 0; j < message.owners.length; ++j) - object.owners[j] = $root.cosmos_sdk.x.capability.v1.Owner.toObject(message.owners[j], options); - } - return object; - }; - - /** - * Converts this CapabilityOwners to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @instance - * @returns {Object.} JSON object - */ - CapabilityOwners.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return CapabilityOwners; @@ -13392,13 +6693,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgVerifyInvariant. * @implements IMsgVerifyInvariant * @constructor - * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant=} [properties] Properties to set + * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant=} [p] Properties to set */ - function MsgVerifyInvariant(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgVerifyInvariant(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]]; } /** @@ -13442,33 +6743,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant * @static - * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant} m MsgVerifyInvariant message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgVerifyInvariant.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.sender); - if (message.invariantModuleName != null && Object.hasOwnProperty.call(message, "invariantModuleName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.invariantModuleName); - if (message.invariantRoute != null && Object.hasOwnProperty.call(message, "invariantRoute")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.invariantRoute); - return writer; - }; - - /** - * Encodes the specified MsgVerifyInvariant message, length delimited. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @static - * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant} message MsgVerifyInvariant message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgVerifyInvariant.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgVerifyInvariant.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.sender != null && Object.hasOwnProperty.call(m, "sender")) + w.uint32(10).bytes(m.sender); + if (m.invariantModuleName != null && Object.hasOwnProperty.call(m, "invariantModuleName")) + w.uint32(18).string(m.invariantModuleName); + if (m.invariantRoute != null && Object.hasOwnProperty.call(m, "invariantRoute")) + w.uint32(26).string(m.invariantRoute); + return w; }; /** @@ -13476,141 +6764,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} MsgVerifyInvariant * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgVerifyInvariant.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.crisis.v1.MsgVerifyInvariant(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgVerifyInvariant.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.crisis.v1.MsgVerifyInvariant(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.sender = reader.bytes(); + m.sender = r.bytes(); break; case 2: - message.invariantModuleName = reader.string(); + m.invariantModuleName = r.string(); break; case 3: - message.invariantRoute = reader.string(); + m.invariantRoute = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgVerifyInvariant message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} MsgVerifyInvariant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgVerifyInvariant.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgVerifyInvariant message. - * @function verify - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgVerifyInvariant.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sender != null && message.hasOwnProperty("sender")) - if (!(message.sender && typeof message.sender.length === "number" || $util.isString(message.sender))) - return "sender: buffer expected"; - if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) - if (!$util.isString(message.invariantModuleName)) - return "invariantModuleName: string expected"; - if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) - if (!$util.isString(message.invariantRoute)) - return "invariantRoute: string expected"; - return null; - }; - - /** - * Creates a MsgVerifyInvariant message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} MsgVerifyInvariant - */ - MsgVerifyInvariant.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.crisis.v1.MsgVerifyInvariant) - return object; - var message = new $root.cosmos_sdk.x.crisis.v1.MsgVerifyInvariant(); - if (object.sender != null) - if (typeof object.sender === "string") - $util.base64.decode(object.sender, message.sender = $util.newBuffer($util.base64.length(object.sender)), 0); - else if (object.sender.length) - message.sender = object.sender; - if (object.invariantModuleName != null) - message.invariantModuleName = String(object.invariantModuleName); - if (object.invariantRoute != null) - message.invariantRoute = String(object.invariantRoute); - return message; - }; - - /** - * Creates a plain object from a MsgVerifyInvariant message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @static - * @param {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} message MsgVerifyInvariant - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgVerifyInvariant.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.sender = ""; - else { - object.sender = []; - if (options.bytes !== Array) - object.sender = $util.newBuffer(object.sender); - } - object.invariantModuleName = ""; - object.invariantRoute = ""; - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = options.bytes === String ? $util.base64.encode(message.sender, 0, message.sender.length) : options.bytes === Array ? Array.prototype.slice.call(message.sender) : message.sender; - if (message.invariantModuleName != null && message.hasOwnProperty("invariantModuleName")) - object.invariantModuleName = message.invariantModuleName; - if (message.invariantRoute != null && message.hasOwnProperty("invariantRoute")) - object.invariantRoute = message.invariantRoute; - return object; - }; - - /** - * Converts this MsgVerifyInvariant to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @instance - * @returns {Object.} JSON object - */ - MsgVerifyInvariant.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgVerifyInvariant; @@ -13656,13 +6837,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgSetWithdrawAddress. * @implements IMsgSetWithdrawAddress * @constructor - * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress=} [p] Properties to set */ - function MsgSetWithdrawAddress(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgSetWithdrawAddress(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]]; } /** @@ -13698,31 +6879,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress} m MsgSetWithdrawAddress message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgSetWithdrawAddress.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.withdrawAddress != null && Object.hasOwnProperty.call(message, "withdrawAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.withdrawAddress); - return writer; - }; - - /** - * Encodes the specified MsgSetWithdrawAddress message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress} message MsgSetWithdrawAddress message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetWithdrawAddress.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgSetWithdrawAddress.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.withdrawAddress != null && Object.hasOwnProperty.call(m, "withdrawAddress")) + w.uint32(18).bytes(m.withdrawAddress); + return w; }; /** @@ -13730,139 +6898,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} MsgSetWithdrawAddress * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgSetWithdrawAddress.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgSetWithdrawAddress.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.distribution.v1.MsgSetWithdrawAddress(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.withdrawAddress = reader.bytes(); + m.withdrawAddress = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} MsgSetWithdrawAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetWithdrawAddress.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSetWithdrawAddress message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSetWithdrawAddress.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) - if (!(message.withdrawAddress && typeof message.withdrawAddress.length === "number" || $util.isString(message.withdrawAddress))) - return "withdrawAddress: buffer expected"; - return null; - }; - - /** - * Creates a MsgSetWithdrawAddress message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} MsgSetWithdrawAddress - */ - MsgSetWithdrawAddress.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.withdrawAddress != null) - if (typeof object.withdrawAddress === "string") - $util.base64.decode(object.withdrawAddress, message.withdrawAddress = $util.newBuffer($util.base64.length(object.withdrawAddress)), 0); - else if (object.withdrawAddress.length) - message.withdrawAddress = object.withdrawAddress; - return message; - }; - - /** - * Creates a plain object from a MsgSetWithdrawAddress message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @static - * @param {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} message MsgSetWithdrawAddress - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSetWithdrawAddress.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.withdrawAddress = ""; - else { - object.withdrawAddress = []; - if (options.bytes !== Array) - object.withdrawAddress = $util.newBuffer(object.withdrawAddress); - } - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.withdrawAddress != null && message.hasOwnProperty("withdrawAddress")) - object.withdrawAddress = options.bytes === String ? $util.base64.encode(message.withdrawAddress, 0, message.withdrawAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.withdrawAddress) : message.withdrawAddress; - return object; - }; - - /** - * Converts this MsgSetWithdrawAddress to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @instance - * @returns {Object.} JSON object - */ - MsgSetWithdrawAddress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgSetWithdrawAddress; @@ -13884,13 +6944,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgWithdrawDelegatorReward. * @implements IMsgWithdrawDelegatorReward * @constructor - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward=} [p] Properties to set */ - function MsgWithdrawDelegatorReward(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgWithdrawDelegatorReward(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]]; } /** @@ -13926,31 +6986,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward} m MsgWithdrawDelegatorReward message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgWithdrawDelegatorReward.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); - return writer; - }; - - /** - * Encodes the specified MsgWithdrawDelegatorReward message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgWithdrawDelegatorReward.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgWithdrawDelegatorReward.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(18).bytes(m.validatorAddress); + return w; }; /** @@ -13958,139 +7005,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgWithdrawDelegatorReward.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgWithdrawDelegatorReward.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.distribution.v1.MsgWithdrawDelegatorReward(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.validatorAddress = reader.bytes(); + m.validatorAddress = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgWithdrawDelegatorReward.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgWithdrawDelegatorReward message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgWithdrawDelegatorReward.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) - return "validatorAddress: buffer expected"; - return null; - }; - - /** - * Creates a MsgWithdrawDelegatorReward message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward - */ - MsgWithdrawDelegatorReward.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorAddress != null) - if (typeof object.validatorAddress === "string") - $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); - else if (object.validatorAddress.length) - message.validatorAddress = object.validatorAddress; - return message; - }; - - /** - * Creates a plain object from a MsgWithdrawDelegatorReward message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @static - * @param {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} message MsgWithdrawDelegatorReward - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgWithdrawDelegatorReward.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorAddress = ""; - else { - object.validatorAddress = []; - if (options.bytes !== Array) - object.validatorAddress = $util.newBuffer(object.validatorAddress); - } - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; - return object; - }; - - /** - * Converts this MsgWithdrawDelegatorReward to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @instance - * @returns {Object.} JSON object - */ - MsgWithdrawDelegatorReward.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgWithdrawDelegatorReward; @@ -14111,13 +7050,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgWithdrawValidatorCommission. * @implements IMsgWithdrawValidatorCommission * @constructor - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission=} [p] Properties to set */ - function MsgWithdrawValidatorCommission(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgWithdrawValidatorCommission(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]]; } /** @@ -14145,29 +7084,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission} m MsgWithdrawValidatorCommission message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgWithdrawValidatorCommission.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.validatorAddress); - return writer; - }; - - /** - * Encodes the specified MsgWithdrawValidatorCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgWithdrawValidatorCommission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgWithdrawValidatorCommission.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(10).bytes(m.validatorAddress); + return w; }; /** @@ -14175,118 +7101,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgWithdrawValidatorCommission.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgWithdrawValidatorCommission.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.distribution.v1.MsgWithdrawValidatorCommission(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.validatorAddress = reader.bytes(); + m.validatorAddress = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgWithdrawValidatorCommission.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgWithdrawValidatorCommission message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgWithdrawValidatorCommission.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) - return "validatorAddress: buffer expected"; - return null; - }; - - /** - * Creates a MsgWithdrawValidatorCommission message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission - */ - MsgWithdrawValidatorCommission.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission(); - if (object.validatorAddress != null) - if (typeof object.validatorAddress === "string") - $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); - else if (object.validatorAddress.length) - message.validatorAddress = object.validatorAddress; - return message; - }; - - /** - * Creates a plain object from a MsgWithdrawValidatorCommission message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @static - * @param {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} message MsgWithdrawValidatorCommission - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgWithdrawValidatorCommission.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.validatorAddress = ""; - else { - object.validatorAddress = []; - if (options.bytes !== Array) - object.validatorAddress = $util.newBuffer(object.validatorAddress); - } - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; - return object; - }; - - /** - * Converts this MsgWithdrawValidatorCommission to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @instance - * @returns {Object.} JSON object - */ - MsgWithdrawValidatorCommission.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgWithdrawValidatorCommission; @@ -14308,14 +7144,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgFundCommunityPool. * @implements IMsgFundCommunityPool * @constructor - * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool=} [p] Properties to set */ - function MsgFundCommunityPool(properties) { + function MsgFundCommunityPool(p) { this.amount = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -14351,32 +7187,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool} m MsgFundCommunityPool message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgFundCommunityPool.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.depositor); - return writer; - }; - - /** - * Encodes the specified MsgFundCommunityPool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool} message MsgFundCommunityPool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgFundCommunityPool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgFundCommunityPool.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.depositor != null && Object.hasOwnProperty.call(m, "depositor")) + w.uint32(18).bytes(m.depositor); + return w; }; /** @@ -14384,149 +7208,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} MsgFundCommunityPool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgFundCommunityPool.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.MsgFundCommunityPool(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgFundCommunityPool.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.distribution.v1.MsgFundCommunityPool(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.amount && m.amount.length)) + m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; case 2: - message.depositor = reader.bytes(); + m.depositor = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgFundCommunityPool message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} MsgFundCommunityPool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgFundCommunityPool.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgFundCommunityPool message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgFundCommunityPool.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (var i = 0; i < message.amount.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - if (message.depositor != null && message.hasOwnProperty("depositor")) - if (!(message.depositor && typeof message.depositor.length === "number" || $util.isString(message.depositor))) - return "depositor: buffer expected"; - return null; - }; - - /** - * Creates a MsgFundCommunityPool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} MsgFundCommunityPool - */ - MsgFundCommunityPool.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.MsgFundCommunityPool) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.MsgFundCommunityPool(); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.amount: object expected"); - message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); - } - } - if (object.depositor != null) - if (typeof object.depositor === "string") - $util.base64.decode(object.depositor, message.depositor = $util.newBuffer($util.base64.length(object.depositor)), 0); - else if (object.depositor.length) - message.depositor = object.depositor; - return message; - }; - - /** - * Creates a plain object from a MsgFundCommunityPool message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @static - * @param {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} message MsgFundCommunityPool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgFundCommunityPool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) - if (options.bytes === String) - object.depositor = ""; - else { - object.depositor = []; - if (options.bytes !== Array) - object.depositor = $util.newBuffer(object.depositor); - } - if (message.amount && message.amount.length) { - object.amount = []; - for (var j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); - } - if (message.depositor != null && message.hasOwnProperty("depositor")) - object.depositor = options.bytes === String ? $util.base64.encode(message.depositor, 0, message.depositor.length) : options.bytes === Array ? Array.prototype.slice.call(message.depositor) : message.depositor; - return object; - }; - - /** - * Converts this MsgFundCommunityPool to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @instance - * @returns {Object.} JSON object - */ - MsgFundCommunityPool.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgFundCommunityPool; @@ -14550,13 +7258,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Params. * @implements IParams * @constructor - * @param {cosmos_sdk.x.distribution.v1.IParams=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IParams=} [p] Properties to set */ - function Params(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Params(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]]; } /** @@ -14608,35 +7316,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.Params * @static - * @param {cosmos_sdk.x.distribution.v1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IParams} m Params message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.communityTax != null && Object.hasOwnProperty.call(message, "communityTax")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.communityTax); - if (message.baseProposerReward != null && Object.hasOwnProperty.call(message, "baseProposerReward")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.baseProposerReward); - if (message.bonusProposerReward != null && Object.hasOwnProperty.call(message, "bonusProposerReward")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.bonusProposerReward); - if (message.withdrawAddrEnabled != null && Object.hasOwnProperty.call(message, "withdrawAddrEnabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.withdrawAddrEnabled); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.Params - * @static - * @param {cosmos_sdk.x.distribution.v1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Params.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.communityTax != null && Object.hasOwnProperty.call(m, "communityTax")) + w.uint32(10).string(m.communityTax); + if (m.baseProposerReward != null && Object.hasOwnProperty.call(m, "baseProposerReward")) + w.uint32(18).string(m.baseProposerReward); + if (m.bonusProposerReward != null && Object.hasOwnProperty.call(m, "bonusProposerReward")) + w.uint32(26).string(m.bonusProposerReward); + if (m.withdrawAddrEnabled != null && Object.hasOwnProperty.call(m, "withdrawAddrEnabled")) + w.uint32(32).bool(m.withdrawAddrEnabled); + return w; }; /** @@ -14644,143 +7339,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.Params * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.Params} Params * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Params.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.cosmos_sdk.x.distribution.v1.Params(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.communityTax = reader.string(); + m.communityTax = r.string(); break; case 2: - message.baseProposerReward = reader.string(); + m.baseProposerReward = r.string(); break; case 3: - message.bonusProposerReward = reader.string(); + m.bonusProposerReward = r.string(); break; case 4: - message.withdrawAddrEnabled = reader.bool(); + m.withdrawAddrEnabled = r.bool(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.communityTax != null && message.hasOwnProperty("communityTax")) - if (!$util.isString(message.communityTax)) - return "communityTax: string expected"; - if (message.baseProposerReward != null && message.hasOwnProperty("baseProposerReward")) - if (!$util.isString(message.baseProposerReward)) - return "baseProposerReward: string expected"; - if (message.bonusProposerReward != null && message.hasOwnProperty("bonusProposerReward")) - if (!$util.isString(message.bonusProposerReward)) - return "bonusProposerReward: string expected"; - if (message.withdrawAddrEnabled != null && message.hasOwnProperty("withdrawAddrEnabled")) - if (typeof message.withdrawAddrEnabled !== "boolean") - return "withdrawAddrEnabled: boolean expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.Params) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.Params(); - if (object.communityTax != null) - message.communityTax = String(object.communityTax); - if (object.baseProposerReward != null) - message.baseProposerReward = String(object.baseProposerReward); - if (object.bonusProposerReward != null) - message.bonusProposerReward = String(object.bonusProposerReward); - if (object.withdrawAddrEnabled != null) - message.withdrawAddrEnabled = Boolean(object.withdrawAddrEnabled); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.Params - * @static - * @param {cosmos_sdk.x.distribution.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.communityTax = ""; - object.baseProposerReward = ""; - object.bonusProposerReward = ""; - object.withdrawAddrEnabled = false; - } - if (message.communityTax != null && message.hasOwnProperty("communityTax")) - object.communityTax = message.communityTax; - if (message.baseProposerReward != null && message.hasOwnProperty("baseProposerReward")) - object.baseProposerReward = message.baseProposerReward; - if (message.bonusProposerReward != null && message.hasOwnProperty("bonusProposerReward")) - object.bonusProposerReward = message.bonusProposerReward; - if (message.withdrawAddrEnabled != null && message.hasOwnProperty("withdrawAddrEnabled")) - object.withdrawAddrEnabled = message.withdrawAddrEnabled; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Params; @@ -14802,14 +7391,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ValidatorHistoricalRewards. * @implements IValidatorHistoricalRewards * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards=} [p] Properties to set */ - function ValidatorHistoricalRewards(properties) { + function ValidatorHistoricalRewards(p) { this.cumulativeRewardRatio = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -14845,32 +7434,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards} message ValidatorHistoricalRewards message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards} m ValidatorHistoricalRewards message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidatorHistoricalRewards.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cumulativeRewardRatio != null && message.cumulativeRewardRatio.length) - for (var i = 0; i < message.cumulativeRewardRatio.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(message.cumulativeRewardRatio[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.referenceCount != null && Object.hasOwnProperty.call(message, "referenceCount")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.referenceCount); - return writer; - }; - - /** - * Encodes the specified ValidatorHistoricalRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards} message ValidatorHistoricalRewards message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorHistoricalRewards.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValidatorHistoricalRewards.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.cumulativeRewardRatio != null && m.cumulativeRewardRatio.length) { + for (var i = 0; i < m.cumulativeRewardRatio.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(m.cumulativeRewardRatio[i], w.uint32(10).fork()).ldelim(); + } + if (m.referenceCount != null && Object.hasOwnProperty.call(m, "referenceCount")) + w.uint32(16).uint32(m.referenceCount); + return w; }; /** @@ -14878,140 +7455,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} ValidatorHistoricalRewards * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidatorHistoricalRewards.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ValidatorHistoricalRewards.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.distribution.v1.ValidatorHistoricalRewards(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.cumulativeRewardRatio && message.cumulativeRewardRatio.length)) - message.cumulativeRewardRatio = []; - message.cumulativeRewardRatio.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + if (!(m.cumulativeRewardRatio && m.cumulativeRewardRatio.length)) + m.cumulativeRewardRatio = []; + m.cumulativeRewardRatio.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); break; case 2: - message.referenceCount = reader.uint32(); + m.referenceCount = r.uint32(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} ValidatorHistoricalRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorHistoricalRewards.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorHistoricalRewards message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorHistoricalRewards.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cumulativeRewardRatio != null && message.hasOwnProperty("cumulativeRewardRatio")) { - if (!Array.isArray(message.cumulativeRewardRatio)) - return "cumulativeRewardRatio: array expected"; - for (var i = 0; i < message.cumulativeRewardRatio.length; ++i) { - var error = $root.cosmos_sdk.v1.DecCoin.verify(message.cumulativeRewardRatio[i]); - if (error) - return "cumulativeRewardRatio." + error; - } - } - if (message.referenceCount != null && message.hasOwnProperty("referenceCount")) - if (!$util.isInteger(message.referenceCount)) - return "referenceCount: integer expected"; - return null; - }; - - /** - * Creates a ValidatorHistoricalRewards message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} ValidatorHistoricalRewards - */ - ValidatorHistoricalRewards.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards(); - if (object.cumulativeRewardRatio) { - if (!Array.isArray(object.cumulativeRewardRatio)) - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.cumulativeRewardRatio: array expected"); - message.cumulativeRewardRatio = []; - for (var i = 0; i < object.cumulativeRewardRatio.length; ++i) { - if (typeof object.cumulativeRewardRatio[i] !== "object") - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.cumulativeRewardRatio: object expected"); - message.cumulativeRewardRatio[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.cumulativeRewardRatio[i]); - } - } - if (object.referenceCount != null) - message.referenceCount = object.referenceCount >>> 0; - return message; - }; - - /** - * Creates a plain object from a ValidatorHistoricalRewards message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} message ValidatorHistoricalRewards - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorHistoricalRewards.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cumulativeRewardRatio = []; - if (options.defaults) - object.referenceCount = 0; - if (message.cumulativeRewardRatio && message.cumulativeRewardRatio.length) { - object.cumulativeRewardRatio = []; - for (var j = 0; j < message.cumulativeRewardRatio.length; ++j) - object.cumulativeRewardRatio[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.cumulativeRewardRatio[j], options); - } - if (message.referenceCount != null && message.hasOwnProperty("referenceCount")) - object.referenceCount = message.referenceCount; - return object; - }; - - /** - * Converts this ValidatorHistoricalRewards to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @instance - * @returns {Object.} JSON object - */ - ValidatorHistoricalRewards.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValidatorHistoricalRewards; @@ -15033,14 +7503,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ValidatorCurrentRewards. * @implements IValidatorCurrentRewards * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards=} [p] Properties to set */ - function ValidatorCurrentRewards(properties) { + function ValidatorCurrentRewards(p) { this.rewards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -15076,32 +7546,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards} message ValidatorCurrentRewards message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards} m ValidatorCurrentRewards message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidatorCurrentRewards.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rewards != null && message.rewards.length) - for (var i = 0; i < message.rewards.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(message.rewards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.period != null && Object.hasOwnProperty.call(message, "period")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.period); - return writer; - }; - - /** - * Encodes the specified ValidatorCurrentRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards} message ValidatorCurrentRewards message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorCurrentRewards.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValidatorCurrentRewards.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.rewards != null && m.rewards.length) { + for (var i = 0; i < m.rewards.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(m.rewards[i], w.uint32(10).fork()).ldelim(); + } + if (m.period != null && Object.hasOwnProperty.call(m, "period")) + w.uint32(16).uint64(m.period); + return w; }; /** @@ -15109,154 +7567,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} ValidatorCurrentRewards * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidatorCurrentRewards.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ValidatorCurrentRewards.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.distribution.v1.ValidatorCurrentRewards(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.rewards && message.rewards.length)) - message.rewards = []; - message.rewards.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + if (!(m.rewards && m.rewards.length)) + m.rewards = []; + m.rewards.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); break; case 2: - message.period = reader.uint64(); + m.period = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValidatorCurrentRewards message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} ValidatorCurrentRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorCurrentRewards.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorCurrentRewards message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorCurrentRewards.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rewards != null && message.hasOwnProperty("rewards")) { - if (!Array.isArray(message.rewards)) - return "rewards: array expected"; - for (var i = 0; i < message.rewards.length; ++i) { - var error = $root.cosmos_sdk.v1.DecCoin.verify(message.rewards[i]); - if (error) - return "rewards." + error; - } - } - if (message.period != null && message.hasOwnProperty("period")) - if (!$util.isInteger(message.period) && !(message.period && $util.isInteger(message.period.low) && $util.isInteger(message.period.high))) - return "period: integer|Long expected"; - return null; - }; - - /** - * Creates a ValidatorCurrentRewards message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} ValidatorCurrentRewards - */ - ValidatorCurrentRewards.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards(); - if (object.rewards) { - if (!Array.isArray(object.rewards)) - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.rewards: array expected"); - message.rewards = []; - for (var i = 0; i < object.rewards.length; ++i) { - if (typeof object.rewards[i] !== "object") - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.rewards: object expected"); - message.rewards[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.rewards[i]); - } - } - if (object.period != null) - if ($util.Long) - (message.period = $util.Long.fromValue(object.period)).unsigned = true; - else if (typeof object.period === "string") - message.period = parseInt(object.period, 10); - else if (typeof object.period === "number") - message.period = object.period; - else if (typeof object.period === "object") - message.period = new $util.LongBits(object.period.low >>> 0, object.period.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a ValidatorCurrentRewards message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} message ValidatorCurrentRewards - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorCurrentRewards.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rewards = []; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.period = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.period = options.longs === String ? "0" : 0; - if (message.rewards && message.rewards.length) { - object.rewards = []; - for (var j = 0; j < message.rewards.length; ++j) - object.rewards[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.rewards[j], options); - } - if (message.period != null && message.hasOwnProperty("period")) - if (typeof message.period === "number") - object.period = options.longs === String ? String(message.period) : message.period; - else - object.period = options.longs === String ? $util.Long.prototype.toString.call(message.period) : options.longs === Number ? new $util.LongBits(message.period.low >>> 0, message.period.high >>> 0).toNumber(true) : message.period; - return object; - }; - - /** - * Converts this ValidatorCurrentRewards to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @instance - * @returns {Object.} JSON object - */ - ValidatorCurrentRewards.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValidatorCurrentRewards; @@ -15277,14 +7614,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ValidatorAccumulatedCommission. * @implements IValidatorAccumulatedCommission * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission=} [p] Properties to set */ - function ValidatorAccumulatedCommission(properties) { + function ValidatorAccumulatedCommission(p) { this.commission = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -15312,30 +7649,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission} message ValidatorAccumulatedCommission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission} m ValidatorAccumulatedCommission message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidatorAccumulatedCommission.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.commission != null && message.commission.length) - for (var i = 0; i < message.commission.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(message.commission[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValidatorAccumulatedCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission} message ValidatorAccumulatedCommission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorAccumulatedCommission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValidatorAccumulatedCommission.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.commission != null && m.commission.length) { + for (var i = 0; i < m.commission.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(m.commission[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -15343,128 +7668,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidatorAccumulatedCommission.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ValidatorAccumulatedCommission.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.distribution.v1.ValidatorAccumulatedCommission(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.commission && message.commission.length)) - message.commission = []; - message.commission.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + if (!(m.commission && m.commission.length)) + m.commission = []; + m.commission.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorAccumulatedCommission.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorAccumulatedCommission message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorAccumulatedCommission.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.commission != null && message.hasOwnProperty("commission")) { - if (!Array.isArray(message.commission)) - return "commission: array expected"; - for (var i = 0; i < message.commission.length; ++i) { - var error = $root.cosmos_sdk.v1.DecCoin.verify(message.commission[i]); - if (error) - return "commission." + error; - } - } - return null; - }; - - /** - * Creates a ValidatorAccumulatedCommission message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission - */ - ValidatorAccumulatedCommission.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission(); - if (object.commission) { - if (!Array.isArray(object.commission)) - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.commission: array expected"); - message.commission = []; - for (var i = 0; i < object.commission.length; ++i) { - if (typeof object.commission[i] !== "object") - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.commission: object expected"); - message.commission[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.commission[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ValidatorAccumulatedCommission message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @static - * @param {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} message ValidatorAccumulatedCommission - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorAccumulatedCommission.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.commission = []; - if (message.commission && message.commission.length) { - object.commission = []; - for (var j = 0; j < message.commission.length; ++j) - object.commission[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.commission[j], options); - } - return object; - }; - - /** - * Converts this ValidatorAccumulatedCommission to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @instance - * @returns {Object.} JSON object - */ - ValidatorAccumulatedCommission.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValidatorAccumulatedCommission; @@ -15485,14 +7712,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ValidatorOutstandingRewards. * @implements IValidatorOutstandingRewards * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards=} [p] Properties to set */ - function ValidatorOutstandingRewards(properties) { + function ValidatorOutstandingRewards(p) { this.rewards = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -15520,30 +7747,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards} message ValidatorOutstandingRewards message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards} m ValidatorOutstandingRewards message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidatorOutstandingRewards.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rewards != null && message.rewards.length) - for (var i = 0; i < message.rewards.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(message.rewards[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValidatorOutstandingRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards} message ValidatorOutstandingRewards message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorOutstandingRewards.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValidatorOutstandingRewards.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.rewards != null && m.rewards.length) { + for (var i = 0; i < m.rewards.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(m.rewards[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -15551,128 +7766,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} ValidatorOutstandingRewards * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidatorOutstandingRewards.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ValidatorOutstandingRewards.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.distribution.v1.ValidatorOutstandingRewards(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.rewards && message.rewards.length)) - message.rewards = []; - message.rewards.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + if (!(m.rewards && m.rewards.length)) + m.rewards = []; + m.rewards.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} ValidatorOutstandingRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorOutstandingRewards.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorOutstandingRewards message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorOutstandingRewards.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rewards != null && message.hasOwnProperty("rewards")) { - if (!Array.isArray(message.rewards)) - return "rewards: array expected"; - for (var i = 0; i < message.rewards.length; ++i) { - var error = $root.cosmos_sdk.v1.DecCoin.verify(message.rewards[i]); - if (error) - return "rewards." + error; - } - } - return null; - }; - - /** - * Creates a ValidatorOutstandingRewards message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} ValidatorOutstandingRewards - */ - ValidatorOutstandingRewards.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards(); - if (object.rewards) { - if (!Array.isArray(object.rewards)) - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.rewards: array expected"); - message.rewards = []; - for (var i = 0; i < object.rewards.length; ++i) { - if (typeof object.rewards[i] !== "object") - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.rewards: object expected"); - message.rewards[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.rewards[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ValidatorOutstandingRewards message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} message ValidatorOutstandingRewards - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorOutstandingRewards.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rewards = []; - if (message.rewards && message.rewards.length) { - object.rewards = []; - for (var j = 0; j < message.rewards.length; ++j) - object.rewards[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.rewards[j], options); - } - return object; - }; - - /** - * Converts this ValidatorOutstandingRewards to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @instance - * @returns {Object.} JSON object - */ - ValidatorOutstandingRewards.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValidatorOutstandingRewards; @@ -15694,13 +7811,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ValidatorSlashEvent. * @implements IValidatorSlashEvent * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent=} [p] Properties to set */ - function ValidatorSlashEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function ValidatorSlashEvent(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]]; } /** @@ -15736,31 +7853,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent} message ValidatorSlashEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent} m ValidatorSlashEvent message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidatorSlashEvent.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validatorPeriod != null && Object.hasOwnProperty.call(message, "validatorPeriod")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.validatorPeriod); - if (message.fraction != null && Object.hasOwnProperty.call(message, "fraction")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fraction); - return writer; - }; - - /** - * Encodes the specified ValidatorSlashEvent message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent} message ValidatorSlashEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSlashEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValidatorSlashEvent.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.validatorPeriod != null && Object.hasOwnProperty.call(m, "validatorPeriod")) + w.uint32(8).uint64(m.validatorPeriod); + if (m.fraction != null && Object.hasOwnProperty.call(m, "fraction")) + w.uint32(18).string(m.fraction); + return w; }; /** @@ -15768,135 +7872,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} ValidatorSlashEvent * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidatorSlashEvent.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ValidatorSlashEvent.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.distribution.v1.ValidatorSlashEvent(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.validatorPeriod = reader.uint64(); + m.validatorPeriod = r.uint64(); break; case 2: - message.fraction = reader.string(); + m.fraction = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValidatorSlashEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} ValidatorSlashEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSlashEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorSlashEvent message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorSlashEvent.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validatorPeriod != null && message.hasOwnProperty("validatorPeriod")) - if (!$util.isInteger(message.validatorPeriod) && !(message.validatorPeriod && $util.isInteger(message.validatorPeriod.low) && $util.isInteger(message.validatorPeriod.high))) - return "validatorPeriod: integer|Long expected"; - if (message.fraction != null && message.hasOwnProperty("fraction")) - if (!$util.isString(message.fraction)) - return "fraction: string expected"; - return null; - }; - - /** - * Creates a ValidatorSlashEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} ValidatorSlashEvent - */ - ValidatorSlashEvent.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent(); - if (object.validatorPeriod != null) - if ($util.Long) - (message.validatorPeriod = $util.Long.fromValue(object.validatorPeriod)).unsigned = true; - else if (typeof object.validatorPeriod === "string") - message.validatorPeriod = parseInt(object.validatorPeriod, 10); - else if (typeof object.validatorPeriod === "number") - message.validatorPeriod = object.validatorPeriod; - else if (typeof object.validatorPeriod === "object") - message.validatorPeriod = new $util.LongBits(object.validatorPeriod.low >>> 0, object.validatorPeriod.high >>> 0).toNumber(true); - if (object.fraction != null) - message.fraction = String(object.fraction); - return message; - }; - - /** - * Creates a plain object from a ValidatorSlashEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @static - * @param {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} message ValidatorSlashEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorSlashEvent.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.validatorPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.validatorPeriod = options.longs === String ? "0" : 0; - object.fraction = ""; - } - if (message.validatorPeriod != null && message.hasOwnProperty("validatorPeriod")) - if (typeof message.validatorPeriod === "number") - object.validatorPeriod = options.longs === String ? String(message.validatorPeriod) : message.validatorPeriod; - else - object.validatorPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.validatorPeriod) : options.longs === Number ? new $util.LongBits(message.validatorPeriod.low >>> 0, message.validatorPeriod.high >>> 0).toNumber(true) : message.validatorPeriod; - if (message.fraction != null && message.hasOwnProperty("fraction")) - object.fraction = message.fraction; - return object; - }; - - /** - * Converts this ValidatorSlashEvent to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @instance - * @returns {Object.} JSON object - */ - ValidatorSlashEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValidatorSlashEvent; @@ -15917,14 +7917,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ValidatorSlashEvents. * @implements IValidatorSlashEvents * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents=} [p] Properties to set */ - function ValidatorSlashEvents(properties) { + function ValidatorSlashEvents(p) { this.validatorSlashEvents = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -15952,30 +7952,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents} message ValidatorSlashEvents message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents} m ValidatorSlashEvents message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidatorSlashEvents.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validatorSlashEvents != null && message.validatorSlashEvents.length) - for (var i = 0; i < message.validatorSlashEvents.length; ++i) - $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.encode(message.validatorSlashEvents[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValidatorSlashEvents message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents} message ValidatorSlashEvents message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSlashEvents.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValidatorSlashEvents.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.validatorSlashEvents != null && m.validatorSlashEvents.length) { + for (var i = 0; i < m.validatorSlashEvents.length; ++i) + $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.encode(m.validatorSlashEvents[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -15983,128 +7971,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} ValidatorSlashEvents * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidatorSlashEvents.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvents(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ValidatorSlashEvents.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.distribution.v1.ValidatorSlashEvents(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.validatorSlashEvents && message.validatorSlashEvents.length)) - message.validatorSlashEvents = []; - message.validatorSlashEvents.push($root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.decode(reader, reader.uint32())); + if (!(m.validatorSlashEvents && m.validatorSlashEvents.length)) + m.validatorSlashEvents = []; + m.validatorSlashEvents.push($root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValidatorSlashEvents message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} ValidatorSlashEvents - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSlashEvents.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorSlashEvents message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorSlashEvents.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validatorSlashEvents != null && message.hasOwnProperty("validatorSlashEvents")) { - if (!Array.isArray(message.validatorSlashEvents)) - return "validatorSlashEvents: array expected"; - for (var i = 0; i < message.validatorSlashEvents.length; ++i) { - var error = $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify(message.validatorSlashEvents[i]); - if (error) - return "validatorSlashEvents." + error; - } - } - return null; - }; - - /** - * Creates a ValidatorSlashEvents message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} ValidatorSlashEvents - */ - ValidatorSlashEvents.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvents) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvents(); - if (object.validatorSlashEvents) { - if (!Array.isArray(object.validatorSlashEvents)) - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.validatorSlashEvents: array expected"); - message.validatorSlashEvents = []; - for (var i = 0; i < object.validatorSlashEvents.length; ++i) { - if (typeof object.validatorSlashEvents[i] !== "object") - throw TypeError(".cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.validatorSlashEvents: object expected"); - message.validatorSlashEvents[i] = $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.fromObject(object.validatorSlashEvents[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ValidatorSlashEvents message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @static - * @param {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} message ValidatorSlashEvents - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorSlashEvents.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.validatorSlashEvents = []; - if (message.validatorSlashEvents && message.validatorSlashEvents.length) { - object.validatorSlashEvents = []; - for (var j = 0; j < message.validatorSlashEvents.length; ++j) - object.validatorSlashEvents[j] = $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.toObject(message.validatorSlashEvents[j], options); - } - return object; - }; - - /** - * Converts this ValidatorSlashEvents to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @instance - * @returns {Object.} JSON object - */ - ValidatorSlashEvents.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValidatorSlashEvents; @@ -16125,14 +8015,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a FeePool. * @implements IFeePool * @constructor - * @param {cosmos_sdk.x.distribution.v1.IFeePool=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IFeePool=} [p] Properties to set */ - function FeePool(properties) { + function FeePool(p) { this.communityPool = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -16160,30 +8050,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.FeePool * @static - * @param {cosmos_sdk.x.distribution.v1.IFeePool} message FeePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IFeePool} m FeePool message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeePool.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.communityPool != null && message.communityPool.length) - for (var i = 0; i < message.communityPool.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(message.communityPool[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FeePool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @static - * @param {cosmos_sdk.x.distribution.v1.IFeePool} message FeePool message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeePool.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FeePool.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.communityPool != null && m.communityPool.length) { + for (var i = 0; i < m.communityPool.length; ++i) + $root.cosmos_sdk.v1.DecCoin.encode(m.communityPool[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -16191,128 +8069,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.FeePool * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.FeePool} FeePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeePool.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.FeePool(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + FeePool.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.distribution.v1.FeePool(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.communityPool && message.communityPool.length)) - message.communityPool = []; - message.communityPool.push($root.cosmos_sdk.v1.DecCoin.decode(reader, reader.uint32())); + if (!(m.communityPool && m.communityPool.length)) + m.communityPool = []; + m.communityPool.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a FeePool message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.FeePool} FeePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeePool.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeePool message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeePool.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.communityPool != null && message.hasOwnProperty("communityPool")) { - if (!Array.isArray(message.communityPool)) - return "communityPool: array expected"; - for (var i = 0; i < message.communityPool.length; ++i) { - var error = $root.cosmos_sdk.v1.DecCoin.verify(message.communityPool[i]); - if (error) - return "communityPool." + error; - } - } - return null; - }; - - /** - * Creates a FeePool message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.FeePool} FeePool - */ - FeePool.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.FeePool) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.FeePool(); - if (object.communityPool) { - if (!Array.isArray(object.communityPool)) - throw TypeError(".cosmos_sdk.x.distribution.v1.FeePool.communityPool: array expected"); - message.communityPool = []; - for (var i = 0; i < object.communityPool.length; ++i) { - if (typeof object.communityPool[i] !== "object") - throw TypeError(".cosmos_sdk.x.distribution.v1.FeePool.communityPool: object expected"); - message.communityPool[i] = $root.cosmos_sdk.v1.DecCoin.fromObject(object.communityPool[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FeePool message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @static - * @param {cosmos_sdk.x.distribution.v1.FeePool} message FeePool - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeePool.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.communityPool = []; - if (message.communityPool && message.communityPool.length) { - object.communityPool = []; - for (var j = 0; j < message.communityPool.length; ++j) - object.communityPool[j] = $root.cosmos_sdk.v1.DecCoin.toObject(message.communityPool[j], options); - } - return object; - }; - - /** - * Converts this FeePool to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @instance - * @returns {Object.} JSON object - */ - FeePool.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return FeePool; @@ -16336,14 +8116,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a CommunityPoolSpendProposal. * @implements ICommunityPoolSpendProposal * @constructor - * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal=} [p] Properties to set */ - function CommunityPoolSpendProposal(properties) { + function CommunityPoolSpendProposal(p) { this.amount = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -16395,36 +8175,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal * @static - * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal} message CommunityPoolSpendProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal} m CommunityPoolSpendProposal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommunityPoolSpendProposal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.recipient != null && Object.hasOwnProperty.call(message, "recipient")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.recipient); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CommunityPoolSpendProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @static - * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal} message CommunityPoolSpendProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommunityPoolSpendProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CommunityPoolSpendProposal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.title != null && Object.hasOwnProperty.call(m, "title")) + w.uint32(10).string(m.title); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + w.uint32(18).string(m.description); + if (m.recipient != null && Object.hasOwnProperty.call(m, "recipient")) + w.uint32(26).bytes(m.recipient); + 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(34).fork()).ldelim(); + } + return w; }; /** @@ -16432,172 +8200,39 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} CommunityPoolSpendProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommunityPoolSpendProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + CommunityPoolSpendProposal.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.distribution.v1.CommunityPoolSpendProposal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.title = reader.string(); + m.title = r.string(); break; case 2: - message.description = reader.string(); + m.description = r.string(); break; case 3: - message.recipient = reader.bytes(); + m.recipient = r.bytes(); break; case 4: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.amount && m.amount.length)) + m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} CommunityPoolSpendProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommunityPoolSpendProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommunityPoolSpendProposal message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommunityPoolSpendProposal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.recipient != null && message.hasOwnProperty("recipient")) - if (!(message.recipient && typeof message.recipient.length === "number" || $util.isString(message.recipient))) - return "recipient: buffer expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (var i = 0; i < message.amount.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - return null; - }; - - /** - * Creates a CommunityPoolSpendProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} CommunityPoolSpendProposal - */ - CommunityPoolSpendProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.recipient != null) - if (typeof object.recipient === "string") - $util.base64.decode(object.recipient, message.recipient = $util.newBuffer($util.base64.length(object.recipient)), 0); - else if (object.recipient.length) - message.recipient = object.recipient; - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.amount: object expected"); - message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a CommunityPoolSpendProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @static - * @param {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} message CommunityPoolSpendProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommunityPoolSpendProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - object.title = ""; - object.description = ""; - if (options.bytes === String) - object.recipient = ""; - else { - object.recipient = []; - if (options.bytes !== Array) - object.recipient = $util.newBuffer(object.recipient); - } - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.recipient != null && message.hasOwnProperty("recipient")) - object.recipient = options.bytes === String ? $util.base64.encode(message.recipient, 0, message.recipient.length) : options.bytes === Array ? Array.prototype.slice.call(message.recipient) : message.recipient; - if (message.amount && message.amount.length) { - object.amount = []; - for (var j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this CommunityPoolSpendProposal to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @instance - * @returns {Object.} JSON object - */ - CommunityPoolSpendProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return CommunityPoolSpendProposal; @@ -16620,13 +8255,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a DelegatorStartingInfo. * @implements IDelegatorStartingInfo * @constructor - * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo=} [properties] Properties to set + * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo=} [p] Properties to set */ - function DelegatorStartingInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function DelegatorStartingInfo(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]]; } /** @@ -16670,33 +8305,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo * @static - * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo} message DelegatorStartingInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo} m DelegatorStartingInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DelegatorStartingInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.previousPeriod != null && Object.hasOwnProperty.call(message, "previousPeriod")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.previousPeriod); - if (message.stake != null && Object.hasOwnProperty.call(message, "stake")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.stake); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.height); - return writer; - }; - - /** - * Encodes the specified DelegatorStartingInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @static - * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo} message DelegatorStartingInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DelegatorStartingInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DelegatorStartingInfo.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.previousPeriod != null && Object.hasOwnProperty.call(m, "previousPeriod")) + w.uint32(8).uint64(m.previousPeriod); + if (m.stake != null && Object.hasOwnProperty.call(m, "stake")) + w.uint32(18).string(m.stake); + if (m.height != null && Object.hasOwnProperty.call(m, "height")) + w.uint32(24).uint64(m.height); + return w; }; /** @@ -16704,160 +8326,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} DelegatorStartingInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DelegatorStartingInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.distribution.v1.DelegatorStartingInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + DelegatorStartingInfo.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.distribution.v1.DelegatorStartingInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.previousPeriod = reader.uint64(); + m.previousPeriod = r.uint64(); break; case 2: - message.stake = reader.string(); + m.stake = r.string(); break; case 3: - message.height = reader.uint64(); + m.height = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a DelegatorStartingInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} DelegatorStartingInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DelegatorStartingInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DelegatorStartingInfo message. - * @function verify - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DelegatorStartingInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.previousPeriod != null && message.hasOwnProperty("previousPeriod")) - if (!$util.isInteger(message.previousPeriod) && !(message.previousPeriod && $util.isInteger(message.previousPeriod.low) && $util.isInteger(message.previousPeriod.high))) - return "previousPeriod: integer|Long expected"; - if (message.stake != null && message.hasOwnProperty("stake")) - if (!$util.isString(message.stake)) - return "stake: string expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) - return "height: integer|Long expected"; - return null; - }; - - /** - * Creates a DelegatorStartingInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} DelegatorStartingInfo - */ - DelegatorStartingInfo.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.distribution.v1.DelegatorStartingInfo) - return object; - var message = new $root.cosmos_sdk.x.distribution.v1.DelegatorStartingInfo(); - if (object.previousPeriod != null) - if ($util.Long) - (message.previousPeriod = $util.Long.fromValue(object.previousPeriod)).unsigned = true; - else if (typeof object.previousPeriod === "string") - message.previousPeriod = parseInt(object.previousPeriod, 10); - else if (typeof object.previousPeriod === "number") - message.previousPeriod = object.previousPeriod; - else if (typeof object.previousPeriod === "object") - message.previousPeriod = new $util.LongBits(object.previousPeriod.low >>> 0, object.previousPeriod.high >>> 0).toNumber(true); - if (object.stake != null) - message.stake = String(object.stake); - if (object.height != null) - if ($util.Long) - (message.height = $util.Long.fromValue(object.height)).unsigned = true; - else if (typeof object.height === "string") - message.height = parseInt(object.height, 10); - else if (typeof object.height === "number") - message.height = object.height; - else if (typeof object.height === "object") - message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a DelegatorStartingInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @static - * @param {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} message DelegatorStartingInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DelegatorStartingInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.previousPeriod = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.previousPeriod = options.longs === String ? "0" : 0; - object.stake = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - } - if (message.previousPeriod != null && message.hasOwnProperty("previousPeriod")) - if (typeof message.previousPeriod === "number") - object.previousPeriod = options.longs === String ? String(message.previousPeriod) : message.previousPeriod; - else - object.previousPeriod = options.longs === String ? $util.Long.prototype.toString.call(message.previousPeriod) : options.longs === Number ? new $util.LongBits(message.previousPeriod.low >>> 0, message.previousPeriod.high >>> 0).toNumber(true) : message.previousPeriod; - if (message.stake != null && message.hasOwnProperty("stake")) - object.stake = message.stake; - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height === "number") - object.height = options.longs === String ? String(message.height) : message.height; - else - object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber(true) : message.height; - return object; - }; - - /** - * Converts this DelegatorStartingInfo to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @instance - * @returns {Object.} JSON object - */ - DelegatorStartingInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return DelegatorStartingInfo; @@ -16903,13 +8399,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgSubmitEvidence. * @implements IMsgSubmitEvidence * @constructor - * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence=} [properties] Properties to set + * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence=} [p] Properties to set */ - function MsgSubmitEvidence(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgSubmitEvidence(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]]; } /** @@ -16945,31 +8441,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence * @static - * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence} m MsgSubmitEvidence message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgSubmitEvidence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.submitter != null && Object.hasOwnProperty.call(message, "submitter")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.submitter); - if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) - $root.google.protobuf.Any.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgSubmitEvidence message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @static - * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence} message MsgSubmitEvidence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitEvidence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgSubmitEvidence.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.submitter != null && Object.hasOwnProperty.call(m, "submitter")) + w.uint32(10).bytes(m.submitter); + if (m.evidence != null && Object.hasOwnProperty.call(m, "evidence")) + $root.google.protobuf.Any.encode(m.evidence, w.uint32(18).fork()).ldelim(); + return w; }; /** @@ -16977,135 +8460,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} MsgSubmitEvidence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgSubmitEvidence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.evidence.v1.MsgSubmitEvidence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgSubmitEvidence.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.evidence.v1.MsgSubmitEvidence(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.submitter = reader.bytes(); + m.submitter = r.bytes(); break; case 2: - message.evidence = $root.google.protobuf.Any.decode(reader, reader.uint32()); + m.evidence = $root.google.protobuf.Any.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgSubmitEvidence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} MsgSubmitEvidence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitEvidence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitEvidence message. - * @function verify - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitEvidence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.submitter != null && message.hasOwnProperty("submitter")) - if (!(message.submitter && typeof message.submitter.length === "number" || $util.isString(message.submitter))) - return "submitter: buffer expected"; - if (message.evidence != null && message.hasOwnProperty("evidence")) { - var error = $root.google.protobuf.Any.verify(message.evidence); - if (error) - return "evidence." + error; - } - return null; - }; - - /** - * Creates a MsgSubmitEvidence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} MsgSubmitEvidence - */ - MsgSubmitEvidence.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.evidence.v1.MsgSubmitEvidence) - return object; - var message = new $root.cosmos_sdk.x.evidence.v1.MsgSubmitEvidence(); - if (object.submitter != null) - if (typeof object.submitter === "string") - $util.base64.decode(object.submitter, message.submitter = $util.newBuffer($util.base64.length(object.submitter)), 0); - else if (object.submitter.length) - message.submitter = object.submitter; - if (object.evidence != null) { - if (typeof object.evidence !== "object") - throw TypeError(".cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.evidence: object expected"); - message.evidence = $root.google.protobuf.Any.fromObject(object.evidence); - } - return message; - }; - - /** - * Creates a plain object from a MsgSubmitEvidence message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @static - * @param {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} message MsgSubmitEvidence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitEvidence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.submitter = ""; - else { - object.submitter = []; - if (options.bytes !== Array) - object.submitter = $util.newBuffer(object.submitter); - } - object.evidence = null; - } - if (message.submitter != null && message.hasOwnProperty("submitter")) - object.submitter = options.bytes === String ? $util.base64.encode(message.submitter, 0, message.submitter.length) : options.bytes === Array ? Array.prototype.slice.call(message.submitter) : message.submitter; - if (message.evidence != null && message.hasOwnProperty("evidence")) - object.evidence = $root.google.protobuf.Any.toObject(message.evidence, options); - return object; - }; - - /** - * Converts this MsgSubmitEvidence to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitEvidence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgSubmitEvidence; @@ -17129,13 +8508,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an Equivocation. * @implements IEquivocation * @constructor - * @param {cosmos_sdk.x.evidence.v1.IEquivocation=} [properties] Properties to set + * @param {cosmos_sdk.x.evidence.v1.IEquivocation=} [p] Properties to set */ - function Equivocation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Equivocation(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]]; } /** @@ -17187,35 +8566,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.evidence.v1.Equivocation * @static - * @param {cosmos_sdk.x.evidence.v1.IEquivocation} message Equivocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.evidence.v1.IEquivocation} m Equivocation message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Equivocation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) - $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.power != null && Object.hasOwnProperty.call(message, "power")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.power); - if (message.consensusAddress != null && Object.hasOwnProperty.call(message, "consensusAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.consensusAddress); - return writer; - }; - - /** - * Encodes the specified Equivocation message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @static - * @param {cosmos_sdk.x.evidence.v1.IEquivocation} message Equivocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Equivocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Equivocation.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); + if (m.time != null && Object.hasOwnProperty.call(m, "time")) + $root.google.protobuf.Timestamp.encode(m.time, w.uint32(18).fork()).ldelim(); + if (m.power != null && Object.hasOwnProperty.call(m, "power")) + w.uint32(24).int64(m.power); + if (m.consensusAddress != null && Object.hasOwnProperty.call(m, "consensusAddress")) + w.uint32(34).bytes(m.consensusAddress); + return w; }; /** @@ -17223,185 +8589,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.evidence.v1.Equivocation * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.evidence.v1.Equivocation} Equivocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Equivocation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.evidence.v1.Equivocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Equivocation.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.evidence.v1.Equivocation(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.height = reader.int64(); + m.height = r.int64(); break; case 2: - message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 3: - message.power = reader.int64(); + m.power = r.int64(); break; case 4: - message.consensusAddress = reader.bytes(); + m.consensusAddress = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an Equivocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.evidence.v1.Equivocation} Equivocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Equivocation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Equivocation message. - * @function verify - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Equivocation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) - return "height: integer|Long expected"; - if (message.time != null && message.hasOwnProperty("time")) { - var error = $root.google.protobuf.Timestamp.verify(message.time); - if (error) - return "time." + error; - } - if (message.power != null && message.hasOwnProperty("power")) - if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) - return "power: integer|Long expected"; - if (message.consensusAddress != null && message.hasOwnProperty("consensusAddress")) - if (!(message.consensusAddress && typeof message.consensusAddress.length === "number" || $util.isString(message.consensusAddress))) - return "consensusAddress: buffer expected"; - return null; - }; - - /** - * Creates an Equivocation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.evidence.v1.Equivocation} Equivocation - */ - Equivocation.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.evidence.v1.Equivocation) - return object; - var message = new $root.cosmos_sdk.x.evidence.v1.Equivocation(); - if (object.height != null) - if ($util.Long) - (message.height = $util.Long.fromValue(object.height)).unsigned = false; - else if (typeof object.height === "string") - message.height = parseInt(object.height, 10); - else if (typeof object.height === "number") - message.height = object.height; - else if (typeof object.height === "object") - message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".cosmos_sdk.x.evidence.v1.Equivocation.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.power != null) - if ($util.Long) - (message.power = $util.Long.fromValue(object.power)).unsigned = false; - else if (typeof object.power === "string") - message.power = parseInt(object.power, 10); - else if (typeof object.power === "number") - message.power = object.power; - else if (typeof object.power === "object") - message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); - if (object.consensusAddress != null) - if (typeof object.consensusAddress === "string") - $util.base64.decode(object.consensusAddress, message.consensusAddress = $util.newBuffer($util.base64.length(object.consensusAddress)), 0); - else if (object.consensusAddress.length) - message.consensusAddress = object.consensusAddress; - return message; - }; - - /** - * Creates a plain object from an Equivocation message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @static - * @param {cosmos_sdk.x.evidence.v1.Equivocation} message Equivocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Equivocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.time = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.power = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.consensusAddress = ""; - else { - object.consensusAddress = []; - if (options.bytes !== Array) - object.consensusAddress = $util.newBuffer(object.consensusAddress); - } - } - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height === "number") - object.height = options.longs === String ? String(message.height) : message.height; - else - object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; - if (message.time != null && message.hasOwnProperty("time")) - object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); - if (message.power != null && message.hasOwnProperty("power")) - if (typeof message.power === "number") - object.power = options.longs === String ? String(message.power) : message.power; - else - object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; - if (message.consensusAddress != null && message.hasOwnProperty("consensusAddress")) - object.consensusAddress = options.bytes === String ? $util.base64.encode(message.consensusAddress, 0, message.consensusAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensusAddress) : message.consensusAddress; - return object; - }; - - /** - * Converts this Equivocation to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @instance - * @returns {Object.} JSON object - */ - Equivocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Equivocation; @@ -17448,14 +8666,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgSubmitProposal. * @implements IMsgSubmitProposal * @constructor - * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal=} [properties] Properties to set + * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal=} [p] Properties to set */ - function MsgSubmitProposal(properties) { + function MsgSubmitProposal(p) { this.initialDeposit = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -17499,34 +8717,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal * @static - * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal} m MsgSubmitProposal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgSubmitProposal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.initialDeposit != null && message.initialDeposit.length) - for (var i = 0; i < message.initialDeposit.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.initialDeposit[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.proposer != null && Object.hasOwnProperty.call(message, "proposer")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proposer); - return writer; - }; - - /** - * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @static - * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal} message MsgSubmitProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgSubmitProposal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.content != null && Object.hasOwnProperty.call(m, "content")) + $root.google.protobuf.Any.encode(m.content, w.uint32(10).fork()).ldelim(); + if (m.initialDeposit != null && m.initialDeposit.length) { + for (var i = 0; i < m.initialDeposit.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(m.initialDeposit[i], w.uint32(18).fork()).ldelim(); + } + if (m.proposer != null && Object.hasOwnProperty.call(m, "proposer")) + w.uint32(26).bytes(m.proposer); + return w; }; /** @@ -17534,166 +8740,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.gov.v1.MsgSubmitProposal} MsgSubmitProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgSubmitProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.MsgSubmitProposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgSubmitProposal.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.gov.v1.MsgSubmitProposal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + m.content = $root.google.protobuf.Any.decode(r, r.uint32()); break; case 2: - if (!(message.initialDeposit && message.initialDeposit.length)) - message.initialDeposit = []; - message.initialDeposit.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.initialDeposit && m.initialDeposit.length)) + m.initialDeposit = []; + m.initialDeposit.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; case 3: - message.proposer = reader.bytes(); + m.proposer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.gov.v1.MsgSubmitProposal} MsgSubmitProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgSubmitProposal message. - * @function verify - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgSubmitProposal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.content != null && message.hasOwnProperty("content")) { - var error = $root.google.protobuf.Any.verify(message.content); - if (error) - return "content." + error; - } - if (message.initialDeposit != null && message.hasOwnProperty("initialDeposit")) { - if (!Array.isArray(message.initialDeposit)) - return "initialDeposit: array expected"; - for (var i = 0; i < message.initialDeposit.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.initialDeposit[i]); - if (error) - return "initialDeposit." + error; - } - } - if (message.proposer != null && message.hasOwnProperty("proposer")) - if (!(message.proposer && typeof message.proposer.length === "number" || $util.isString(message.proposer))) - return "proposer: buffer expected"; - return null; - }; - - /** - * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.gov.v1.MsgSubmitProposal} MsgSubmitProposal - */ - MsgSubmitProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.gov.v1.MsgSubmitProposal) - return object; - var message = new $root.cosmos_sdk.x.gov.v1.MsgSubmitProposal(); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.MsgSubmitProposal.content: object expected"); - message.content = $root.google.protobuf.Any.fromObject(object.content); - } - if (object.initialDeposit) { - if (!Array.isArray(object.initialDeposit)) - throw TypeError(".cosmos_sdk.x.gov.v1.MsgSubmitProposal.initialDeposit: array expected"); - message.initialDeposit = []; - for (var i = 0; i < object.initialDeposit.length; ++i) { - if (typeof object.initialDeposit[i] !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.MsgSubmitProposal.initialDeposit: object expected"); - message.initialDeposit[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.initialDeposit[i]); - } - } - if (object.proposer != null) - if (typeof object.proposer === "string") - $util.base64.decode(object.proposer, message.proposer = $util.newBuffer($util.base64.length(object.proposer)), 0); - else if (object.proposer.length) - message.proposer = object.proposer; - return message; - }; - - /** - * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @static - * @param {cosmos_sdk.x.gov.v1.MsgSubmitProposal} message MsgSubmitProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgSubmitProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.initialDeposit = []; - if (options.defaults) { - object.content = null; - if (options.bytes === String) - object.proposer = ""; - else { - object.proposer = []; - if (options.bytes !== Array) - object.proposer = $util.newBuffer(object.proposer); - } - } - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.protobuf.Any.toObject(message.content, options); - if (message.initialDeposit && message.initialDeposit.length) { - object.initialDeposit = []; - for (var j = 0; j < message.initialDeposit.length; ++j) - object.initialDeposit[j] = $root.cosmos_sdk.v1.Coin.toObject(message.initialDeposit[j], options); - } - if (message.proposer != null && message.hasOwnProperty("proposer")) - object.proposer = options.bytes === String ? $util.base64.encode(message.proposer, 0, message.proposer.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposer) : message.proposer; - return object; - }; - - /** - * Converts this MsgSubmitProposal to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @instance - * @returns {Object.} JSON object - */ - MsgSubmitProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgSubmitProposal; @@ -17716,13 +8792,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgVote. * @implements IMsgVote * @constructor - * @param {cosmos_sdk.x.gov.v1.IMsgVote=} [properties] Properties to set + * @param {cosmos_sdk.x.gov.v1.IMsgVote=} [p] Properties to set */ - function MsgVote(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgVote(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]]; } /** @@ -17766,33 +8842,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.gov.v1.MsgVote * @static - * @param {cosmos_sdk.x.gov.v1.IMsgVote} message MsgVote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.gov.v1.IMsgVote} m MsgVote message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgVote.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); - if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.voter); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); - return writer; - }; - - /** - * Encodes the specified MsgVote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @static - * @param {cosmos_sdk.x.gov.v1.IMsgVote} message MsgVote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgVote.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgVote.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) + w.uint32(8).uint64(m.proposalId); + if (m.voter != null && Object.hasOwnProperty.call(m, "voter")) + w.uint32(18).bytes(m.voter); + if (m.option != null && Object.hasOwnProperty.call(m, "option")) + w.uint32(24).int32(m.option); + return w; }; /** @@ -17800,183 +8863,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.gov.v1.MsgVote * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.gov.v1.MsgVote} MsgVote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgVote.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.MsgVote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgVote.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.gov.v1.MsgVote(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.proposalId = reader.uint64(); + m.proposalId = r.uint64(); break; case 2: - message.voter = reader.bytes(); + m.voter = r.bytes(); break; case 3: - message.option = reader.int32(); + m.option = r.int32(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgVote message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.gov.v1.MsgVote} MsgVote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgVote.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgVote message. - * @function verify - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgVote.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) - return "proposalId: integer|Long expected"; - if (message.voter != null && message.hasOwnProperty("voter")) - if (!(message.voter && typeof message.voter.length === "number" || $util.isString(message.voter))) - return "voter: buffer expected"; - if (message.option != null && message.hasOwnProperty("option")) - switch (message.option) { - default: - return "option: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a MsgVote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.gov.v1.MsgVote} MsgVote - */ - MsgVote.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.gov.v1.MsgVote) - return object; - var message = new $root.cosmos_sdk.x.gov.v1.MsgVote(); - if (object.proposalId != null) - if ($util.Long) - (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; - else if (typeof object.proposalId === "string") - message.proposalId = parseInt(object.proposalId, 10); - else if (typeof object.proposalId === "number") - message.proposalId = object.proposalId; - else if (typeof object.proposalId === "object") - message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); - if (object.voter != null) - if (typeof object.voter === "string") - $util.base64.decode(object.voter, message.voter = $util.newBuffer($util.base64.length(object.voter)), 0); - else if (object.voter.length) - message.voter = object.voter; - switch (object.option) { - case "VOTE_OPTION_UNSPECIFIED": - case 0: - message.option = 0; - break; - case "VOTE_OPTION_YES": - case 1: - message.option = 1; - break; - case "VOTE_OPTION_ABSTAIN": - case 2: - message.option = 2; - break; - case "VOTE_OPTION_NO": - case 3: - message.option = 3; - break; - case "VOTE_OPTION_NO_WITH_VETO": - case 4: - message.option = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a MsgVote message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @static - * @param {cosmos_sdk.x.gov.v1.MsgVote} message MsgVote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgVote.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposalId = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.voter = ""; - else { - object.voter = []; - if (options.bytes !== Array) - object.voter = $util.newBuffer(object.voter); - } - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - } - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (typeof message.proposalId === "number") - object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; - else - object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; - if (message.voter != null && message.hasOwnProperty("voter")) - object.voter = options.bytes === String ? $util.base64.encode(message.voter, 0, message.voter.length) : options.bytes === Array ? Array.prototype.slice.call(message.voter) : message.voter; - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos_sdk.x.gov.v1.VoteOption[message.option] : message.option; - return object; - }; - - /** - * Converts this MsgVote to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @instance - * @returns {Object.} JSON object - */ - MsgVote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgVote; @@ -17999,14 +8913,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgDeposit. * @implements IMsgDeposit * @constructor - * @param {cosmos_sdk.x.gov.v1.IMsgDeposit=} [properties] Properties to set + * @param {cosmos_sdk.x.gov.v1.IMsgDeposit=} [p] Properties to set */ - function MsgDeposit(properties) { + function MsgDeposit(p) { this.amount = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -18050,34 +8964,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.gov.v1.MsgDeposit * @static - * @param {cosmos_sdk.x.gov.v1.IMsgDeposit} message MsgDeposit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.gov.v1.IMsgDeposit} m MsgDeposit message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgDeposit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); - if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.depositor); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgDeposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @static - * @param {cosmos_sdk.x.gov.v1.IMsgDeposit} message MsgDeposit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeposit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgDeposit.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) + w.uint32(8).uint64(m.proposalId); + if (m.depositor != null && Object.hasOwnProperty.call(m, "depositor")) + w.uint32(18).bytes(m.depositor); + 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; }; /** @@ -18085,175 +8987,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.gov.v1.MsgDeposit * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.gov.v1.MsgDeposit} MsgDeposit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgDeposit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.MsgDeposit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgDeposit.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.gov.v1.MsgDeposit(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.proposalId = reader.uint64(); + m.proposalId = r.uint64(); break; case 2: - message.depositor = reader.bytes(); + m.depositor = r.bytes(); break; case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.amount && m.amount.length)) + m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgDeposit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.gov.v1.MsgDeposit} MsgDeposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeposit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDeposit message. - * @function verify - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDeposit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) - return "proposalId: integer|Long expected"; - if (message.depositor != null && message.hasOwnProperty("depositor")) - if (!(message.depositor && typeof message.depositor.length === "number" || $util.isString(message.depositor))) - return "depositor: buffer expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (var i = 0; i < message.amount.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - return null; - }; - - /** - * Creates a MsgDeposit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.gov.v1.MsgDeposit} MsgDeposit - */ - MsgDeposit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.gov.v1.MsgDeposit) - return object; - var message = new $root.cosmos_sdk.x.gov.v1.MsgDeposit(); - if (object.proposalId != null) - if ($util.Long) - (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; - else if (typeof object.proposalId === "string") - message.proposalId = parseInt(object.proposalId, 10); - else if (typeof object.proposalId === "number") - message.proposalId = object.proposalId; - else if (typeof object.proposalId === "object") - message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); - if (object.depositor != null) - if (typeof object.depositor === "string") - $util.base64.decode(object.depositor, message.depositor = $util.newBuffer($util.base64.length(object.depositor)), 0); - else if (object.depositor.length) - message.depositor = object.depositor; - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos_sdk.x.gov.v1.MsgDeposit.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.MsgDeposit.amount: object expected"); - message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MsgDeposit message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @static - * @param {cosmos_sdk.x.gov.v1.MsgDeposit} message MsgDeposit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDeposit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposalId = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.depositor = ""; - else { - object.depositor = []; - if (options.bytes !== Array) - object.depositor = $util.newBuffer(object.depositor); - } - } - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (typeof message.proposalId === "number") - object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; - else - object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; - if (message.depositor != null && message.hasOwnProperty("depositor")) - object.depositor = options.bytes === String ? $util.base64.encode(message.depositor, 0, message.depositor.length) : options.bytes === Array ? Array.prototype.slice.call(message.depositor) : message.depositor; - if (message.amount && message.amount.length) { - object.amount = []; - for (var j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this MsgDeposit to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @instance - * @returns {Object.} JSON object - */ - MsgDeposit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgDeposit; @@ -18295,13 +9058,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a TextProposal. * @implements ITextProposal * @constructor - * @param {cosmos_sdk.x.gov.v1.ITextProposal=} [properties] Properties to set + * @param {cosmos_sdk.x.gov.v1.ITextProposal=} [p] Properties to set */ - function TextProposal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function TextProposal(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]]; } /** @@ -18337,31 +9100,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.gov.v1.TextProposal * @static - * @param {cosmos_sdk.x.gov.v1.ITextProposal} message TextProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.gov.v1.ITextProposal} m TextProposal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TextProposal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @static - * @param {cosmos_sdk.x.gov.v1.ITextProposal} message TextProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + TextProposal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.title != null && Object.hasOwnProperty.call(m, "title")) + w.uint32(10).string(m.title); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + w.uint32(18).string(m.description); + return w; }; /** @@ -18369,121 +9119,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.gov.v1.TextProposal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.gov.v1.TextProposal} TextProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TextProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.TextProposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + TextProposal.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.gov.v1.TextProposal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.title = reader.string(); + m.title = r.string(); break; case 2: - message.description = reader.string(); + m.description = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a TextProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.gov.v1.TextProposal} TextProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TextProposal message. - * @function verify - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TextProposal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a TextProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.gov.v1.TextProposal} TextProposal - */ - TextProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.gov.v1.TextProposal) - return object; - var message = new $root.cosmos_sdk.x.gov.v1.TextProposal(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a TextProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @static - * @param {cosmos_sdk.x.gov.v1.TextProposal} message TextProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this TextProposal to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @instance - * @returns {Object.} JSON object - */ - TextProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return TextProposal; @@ -18506,14 +9166,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Deposit. * @implements IDeposit * @constructor - * @param {cosmos_sdk.x.gov.v1.IDeposit=} [properties] Properties to set + * @param {cosmos_sdk.x.gov.v1.IDeposit=} [p] Properties to set */ - function Deposit(properties) { + function Deposit(p) { this.amount = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -18557,34 +9217,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.gov.v1.Deposit * @static - * @param {cosmos_sdk.x.gov.v1.IDeposit} message Deposit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.gov.v1.IDeposit} m Deposit message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Deposit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); - if (message.depositor != null && Object.hasOwnProperty.call(message, "depositor")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.depositor); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @static - * @param {cosmos_sdk.x.gov.v1.IDeposit} message Deposit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Deposit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Deposit.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) + w.uint32(8).uint64(m.proposalId); + if (m.depositor != null && Object.hasOwnProperty.call(m, "depositor")) + w.uint32(18).bytes(m.depositor); + 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; }; /** @@ -18592,175 +9240,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.gov.v1.Deposit * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.gov.v1.Deposit} Deposit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Deposit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.Deposit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Deposit.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.gov.v1.Deposit(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.proposalId = reader.uint64(); + m.proposalId = r.uint64(); break; case 2: - message.depositor = reader.bytes(); + m.depositor = r.bytes(); break; case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.amount && m.amount.length)) + m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Deposit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.gov.v1.Deposit} Deposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Deposit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Deposit message. - * @function verify - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Deposit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) - return "proposalId: integer|Long expected"; - if (message.depositor != null && message.hasOwnProperty("depositor")) - if (!(message.depositor && typeof message.depositor.length === "number" || $util.isString(message.depositor))) - return "depositor: buffer expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (var i = 0; i < message.amount.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - return null; - }; - - /** - * Creates a Deposit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.gov.v1.Deposit} Deposit - */ - Deposit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.gov.v1.Deposit) - return object; - var message = new $root.cosmos_sdk.x.gov.v1.Deposit(); - if (object.proposalId != null) - if ($util.Long) - (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; - else if (typeof object.proposalId === "string") - message.proposalId = parseInt(object.proposalId, 10); - else if (typeof object.proposalId === "number") - message.proposalId = object.proposalId; - else if (typeof object.proposalId === "object") - message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); - if (object.depositor != null) - if (typeof object.depositor === "string") - $util.base64.decode(object.depositor, message.depositor = $util.newBuffer($util.base64.length(object.depositor)), 0); - else if (object.depositor.length) - message.depositor = object.depositor; - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos_sdk.x.gov.v1.Deposit.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.Deposit.amount: object expected"); - message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Deposit message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @static - * @param {cosmos_sdk.x.gov.v1.Deposit} message Deposit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Deposit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposalId = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.depositor = ""; - else { - object.depositor = []; - if (options.bytes !== Array) - object.depositor = $util.newBuffer(object.depositor); - } - } - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (typeof message.proposalId === "number") - object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; - else - object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; - if (message.depositor != null && message.hasOwnProperty("depositor")) - object.depositor = options.bytes === String ? $util.base64.encode(message.depositor, 0, message.depositor.length) : options.bytes === Array ? Array.prototype.slice.call(message.depositor) : message.depositor; - if (message.amount && message.amount.length) { - object.amount = []; - for (var j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); - } - return object; - }; - - /** - * Converts this Deposit to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @instance - * @returns {Object.} JSON object - */ - Deposit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Deposit; @@ -18789,14 +9298,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Proposal. * @implements IProposal * @constructor - * @param {cosmos_sdk.x.gov.v1.IProposal=} [properties] Properties to set + * @param {cosmos_sdk.x.gov.v1.IProposal=} [p] Properties to set */ - function Proposal(properties) { + function Proposal(p) { this.totalDeposit = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -18888,46 +9397,34 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.gov.v1.Proposal * @static - * @param {cosmos_sdk.x.gov.v1.IProposal} message Proposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.gov.v1.IProposal} m Proposal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Proposal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - $root.google.protobuf.Any.encode(message.content, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.status); - if (message.finalTallyResult != null && Object.hasOwnProperty.call(message, "finalTallyResult")) - $root.cosmos_sdk.x.gov.v1.TallyResult.encode(message.finalTallyResult, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.submitTime != null && Object.hasOwnProperty.call(message, "submitTime")) - $root.google.protobuf.Timestamp.encode(message.submitTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.depositEndTime != null && Object.hasOwnProperty.call(message, "depositEndTime")) - $root.google.protobuf.Timestamp.encode(message.depositEndTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.totalDeposit != null && message.totalDeposit.length) - for (var i = 0; i < message.totalDeposit.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.totalDeposit[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.votingStartTime != null && Object.hasOwnProperty.call(message, "votingStartTime")) - $root.google.protobuf.Timestamp.encode(message.votingStartTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.votingEndTime != null && Object.hasOwnProperty.call(message, "votingEndTime")) - $root.google.protobuf.Timestamp.encode(message.votingEndTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @static - * @param {cosmos_sdk.x.gov.v1.IProposal} message Proposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Proposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Proposal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) + w.uint32(8).uint64(m.proposalId); + if (m.content != null && Object.hasOwnProperty.call(m, "content")) + $root.google.protobuf.Any.encode(m.content, w.uint32(18).fork()).ldelim(); + if (m.status != null && Object.hasOwnProperty.call(m, "status")) + w.uint32(24).int32(m.status); + if (m.finalTallyResult != null && Object.hasOwnProperty.call(m, "finalTallyResult")) + $root.cosmos_sdk.x.gov.v1.TallyResult.encode(m.finalTallyResult, w.uint32(34).fork()).ldelim(); + if (m.submitTime != null && Object.hasOwnProperty.call(m, "submitTime")) + $root.google.protobuf.Timestamp.encode(m.submitTime, w.uint32(42).fork()).ldelim(); + if (m.depositEndTime != null && Object.hasOwnProperty.call(m, "depositEndTime")) + $root.google.protobuf.Timestamp.encode(m.depositEndTime, w.uint32(50).fork()).ldelim(); + if (m.totalDeposit != null && m.totalDeposit.length) { + for (var i = 0; i < m.totalDeposit.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(m.totalDeposit[i], w.uint32(58).fork()).ldelim(); + } + if (m.votingStartTime != null && Object.hasOwnProperty.call(m, "votingStartTime")) + $root.google.protobuf.Timestamp.encode(m.votingStartTime, w.uint32(66).fork()).ldelim(); + if (m.votingEndTime != null && Object.hasOwnProperty.call(m, "votingEndTime")) + $root.google.protobuf.Timestamp.encode(m.votingEndTime, w.uint32(74).fork()).ldelim(); + return w; }; /** @@ -18935,295 +9432,54 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.gov.v1.Proposal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.gov.v1.Proposal} Proposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Proposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.Proposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Proposal.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.gov.v1.Proposal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.proposalId = reader.uint64(); + m.proposalId = r.uint64(); break; case 2: - message.content = $root.google.protobuf.Any.decode(reader, reader.uint32()); + m.content = $root.google.protobuf.Any.decode(r, r.uint32()); break; case 3: - message.status = reader.int32(); + m.status = r.int32(); break; case 4: - message.finalTallyResult = $root.cosmos_sdk.x.gov.v1.TallyResult.decode(reader, reader.uint32()); + m.finalTallyResult = $root.cosmos_sdk.x.gov.v1.TallyResult.decode(r, r.uint32()); break; case 5: - message.submitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.submitTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 6: - message.depositEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.depositEndTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 7: - if (!(message.totalDeposit && message.totalDeposit.length)) - message.totalDeposit = []; - message.totalDeposit.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.totalDeposit && m.totalDeposit.length)) + m.totalDeposit = []; + m.totalDeposit.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; case 8: - message.votingStartTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.votingStartTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 9: - message.votingEndTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.votingEndTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Proposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.gov.v1.Proposal} Proposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Proposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Proposal message. - * @function verify - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Proposal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) - return "proposalId: integer|Long expected"; - if (message.content != null && message.hasOwnProperty("content")) { - var error = $root.google.protobuf.Any.verify(message.content); - if (error) - return "content." + error; - } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) { - var error = $root.cosmos_sdk.x.gov.v1.TallyResult.verify(message.finalTallyResult); - if (error) - return "finalTallyResult." + error; - } - if (message.submitTime != null && message.hasOwnProperty("submitTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.submitTime); - if (error) - return "submitTime." + error; - } - if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.depositEndTime); - if (error) - return "depositEndTime." + error; - } - if (message.totalDeposit != null && message.hasOwnProperty("totalDeposit")) { - if (!Array.isArray(message.totalDeposit)) - return "totalDeposit: array expected"; - for (var i = 0; i < message.totalDeposit.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.totalDeposit[i]); - if (error) - return "totalDeposit." + error; - } - } - if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.votingStartTime); - if (error) - return "votingStartTime." + error; - } - if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.votingEndTime); - if (error) - return "votingEndTime." + error; - } - return null; - }; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.gov.v1.Proposal} Proposal - */ - Proposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.gov.v1.Proposal) - return object; - var message = new $root.cosmos_sdk.x.gov.v1.Proposal(); - if (object.proposalId != null) - if ($util.Long) - (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; - else if (typeof object.proposalId === "string") - message.proposalId = parseInt(object.proposalId, 10); - else if (typeof object.proposalId === "number") - message.proposalId = object.proposalId; - else if (typeof object.proposalId === "object") - message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); - if (object.content != null) { - if (typeof object.content !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.content: object expected"); - message.content = $root.google.protobuf.Any.fromObject(object.content); - } - switch (object.status) { - case "PROPOSAL_STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "PROPOSAL_STATUS_DEPOSIT_PERIOD": - case 1: - message.status = 1; - break; - case "PROPOSAL_STATUS_VOTING_PERIOD": - case 2: - message.status = 2; - break; - case "PROPOSAL_STATUS_PASSED": - case 3: - message.status = 3; - break; - case "PROPOSAL_STATUS_REJECTED": - case 4: - message.status = 4; - break; - case "PROPOSAL_STATUS_FAILED": - case 5: - message.status = 5; - break; - } - if (object.finalTallyResult != null) { - if (typeof object.finalTallyResult !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.finalTallyResult: object expected"); - message.finalTallyResult = $root.cosmos_sdk.x.gov.v1.TallyResult.fromObject(object.finalTallyResult); - } - if (object.submitTime != null) { - if (typeof object.submitTime !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.submitTime: object expected"); - message.submitTime = $root.google.protobuf.Timestamp.fromObject(object.submitTime); - } - if (object.depositEndTime != null) { - if (typeof object.depositEndTime !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.depositEndTime: object expected"); - message.depositEndTime = $root.google.protobuf.Timestamp.fromObject(object.depositEndTime); - } - if (object.totalDeposit) { - if (!Array.isArray(object.totalDeposit)) - throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.totalDeposit: array expected"); - message.totalDeposit = []; - for (var i = 0; i < object.totalDeposit.length; ++i) { - if (typeof object.totalDeposit[i] !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.totalDeposit: object expected"); - message.totalDeposit[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.totalDeposit[i]); - } - } - if (object.votingStartTime != null) { - if (typeof object.votingStartTime !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.votingStartTime: object expected"); - message.votingStartTime = $root.google.protobuf.Timestamp.fromObject(object.votingStartTime); - } - if (object.votingEndTime != null) { - if (typeof object.votingEndTime !== "object") - throw TypeError(".cosmos_sdk.x.gov.v1.Proposal.votingEndTime: object expected"); - message.votingEndTime = $root.google.protobuf.Timestamp.fromObject(object.votingEndTime); - } - return message; - }; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @static - * @param {cosmos_sdk.x.gov.v1.Proposal} message Proposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Proposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.totalDeposit = []; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposalId = options.longs === String ? "0" : 0; - object.content = null; - object.status = options.enums === String ? "PROPOSAL_STATUS_UNSPECIFIED" : 0; - object.finalTallyResult = null; - object.submitTime = null; - object.depositEndTime = null; - object.votingStartTime = null; - object.votingEndTime = null; - } - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (typeof message.proposalId === "number") - object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; - else - object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; - if (message.content != null && message.hasOwnProperty("content")) - object.content = $root.google.protobuf.Any.toObject(message.content, options); - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.cosmos_sdk.x.gov.v1.ProposalStatus[message.status] : message.status; - if (message.finalTallyResult != null && message.hasOwnProperty("finalTallyResult")) - object.finalTallyResult = $root.cosmos_sdk.x.gov.v1.TallyResult.toObject(message.finalTallyResult, options); - if (message.submitTime != null && message.hasOwnProperty("submitTime")) - object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options); - if (message.depositEndTime != null && message.hasOwnProperty("depositEndTime")) - object.depositEndTime = $root.google.protobuf.Timestamp.toObject(message.depositEndTime, options); - if (message.totalDeposit && message.totalDeposit.length) { - object.totalDeposit = []; - for (var j = 0; j < message.totalDeposit.length; ++j) - object.totalDeposit[j] = $root.cosmos_sdk.v1.Coin.toObject(message.totalDeposit[j], options); - } - if (message.votingStartTime != null && message.hasOwnProperty("votingStartTime")) - object.votingStartTime = $root.google.protobuf.Timestamp.toObject(message.votingStartTime, options); - if (message.votingEndTime != null && message.hasOwnProperty("votingEndTime")) - object.votingEndTime = $root.google.protobuf.Timestamp.toObject(message.votingEndTime, options); - return object; - }; - - /** - * Converts this Proposal to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - * @returns {Object.} JSON object - */ - Proposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Proposal; @@ -19269,13 +9525,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a TallyResult. * @implements ITallyResult * @constructor - * @param {cosmos_sdk.x.gov.v1.ITallyResult=} [properties] Properties to set + * @param {cosmos_sdk.x.gov.v1.ITallyResult=} [p] Properties to set */ - function TallyResult(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function TallyResult(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]]; } /** @@ -19327,35 +9583,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.gov.v1.TallyResult * @static - * @param {cosmos_sdk.x.gov.v1.ITallyResult} message TallyResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.gov.v1.ITallyResult} m TallyResult message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TallyResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.yes != null && Object.hasOwnProperty.call(message, "yes")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.yes); - if (message.abstain != null && Object.hasOwnProperty.call(message, "abstain")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.abstain); - if (message.no != null && Object.hasOwnProperty.call(message, "no")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.no); - if (message.noWithVeto != null && Object.hasOwnProperty.call(message, "noWithVeto")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.noWithVeto); - return writer; - }; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @static - * @param {cosmos_sdk.x.gov.v1.ITallyResult} message TallyResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + TallyResult.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.yes != null && Object.hasOwnProperty.call(m, "yes")) + w.uint32(10).string(m.yes); + if (m.abstain != null && Object.hasOwnProperty.call(m, "abstain")) + w.uint32(18).string(m.abstain); + if (m.no != null && Object.hasOwnProperty.call(m, "no")) + w.uint32(26).string(m.no); + if (m.noWithVeto != null && Object.hasOwnProperty.call(m, "noWithVeto")) + w.uint32(34).string(m.noWithVeto); + return w; }; /** @@ -19363,143 +9606,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.gov.v1.TallyResult * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.gov.v1.TallyResult} TallyResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TallyResult.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.TallyResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + TallyResult.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.gov.v1.TallyResult(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.yes = reader.string(); + m.yes = r.string(); break; case 2: - message.abstain = reader.string(); + m.abstain = r.string(); break; case 3: - message.no = reader.string(); + m.no = r.string(); break; case 4: - message.noWithVeto = reader.string(); + m.noWithVeto = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a TallyResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.gov.v1.TallyResult} TallyResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TallyResult message. - * @function verify - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TallyResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.yes != null && message.hasOwnProperty("yes")) - if (!$util.isString(message.yes)) - return "yes: string expected"; - if (message.abstain != null && message.hasOwnProperty("abstain")) - if (!$util.isString(message.abstain)) - return "abstain: string expected"; - if (message.no != null && message.hasOwnProperty("no")) - if (!$util.isString(message.no)) - return "no: string expected"; - if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) - if (!$util.isString(message.noWithVeto)) - return "noWithVeto: string expected"; - return null; - }; - - /** - * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.gov.v1.TallyResult} TallyResult - */ - TallyResult.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.gov.v1.TallyResult) - return object; - var message = new $root.cosmos_sdk.x.gov.v1.TallyResult(); - if (object.yes != null) - message.yes = String(object.yes); - if (object.abstain != null) - message.abstain = String(object.abstain); - if (object.no != null) - message.no = String(object.no); - if (object.noWithVeto != null) - message.noWithVeto = String(object.noWithVeto); - return message; - }; - - /** - * Creates a plain object from a TallyResult message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @static - * @param {cosmos_sdk.x.gov.v1.TallyResult} message TallyResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TallyResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.yes = ""; - object.abstain = ""; - object.no = ""; - object.noWithVeto = ""; - } - if (message.yes != null && message.hasOwnProperty("yes")) - object.yes = message.yes; - if (message.abstain != null && message.hasOwnProperty("abstain")) - object.abstain = message.abstain; - if (message.no != null && message.hasOwnProperty("no")) - object.no = message.no; - if (message.noWithVeto != null && message.hasOwnProperty("noWithVeto")) - object.noWithVeto = message.noWithVeto; - return object; - }; - - /** - * Converts this TallyResult to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @instance - * @returns {Object.} JSON object - */ - TallyResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return TallyResult; @@ -19522,13 +9659,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Vote. * @implements IVote * @constructor - * @param {cosmos_sdk.x.gov.v1.IVote=} [properties] Properties to set + * @param {cosmos_sdk.x.gov.v1.IVote=} [p] Properties to set */ - function Vote(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Vote(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]]; } /** @@ -19572,33 +9709,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.gov.v1.Vote * @static - * @param {cosmos_sdk.x.gov.v1.IVote} message Vote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.gov.v1.IVote} m Vote message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Vote.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proposalId != null && Object.hasOwnProperty.call(message, "proposalId")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.proposalId); - if (message.voter != null && Object.hasOwnProperty.call(message, "voter")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.voter); - if (message.option != null && Object.hasOwnProperty.call(message, "option")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.option); - return writer; - }; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.gov.v1.Vote - * @static - * @param {cosmos_sdk.x.gov.v1.IVote} message Vote message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Vote.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Vote.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) + w.uint32(8).uint64(m.proposalId); + if (m.voter != null && Object.hasOwnProperty.call(m, "voter")) + w.uint32(18).bytes(m.voter); + if (m.option != null && Object.hasOwnProperty.call(m, "option")) + w.uint32(24).int32(m.option); + return w; }; /** @@ -19606,183 +9730,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.gov.v1.Vote * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.gov.v1.Vote} Vote * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Vote.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.gov.v1.Vote(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Vote.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.gov.v1.Vote(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.proposalId = reader.uint64(); + m.proposalId = r.uint64(); break; case 2: - message.voter = reader.bytes(); + m.voter = r.bytes(); break; case 3: - message.option = reader.int32(); + m.option = r.int32(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Vote message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.gov.v1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.gov.v1.Vote} Vote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Vote.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Vote message. - * @function verify - * @memberof cosmos_sdk.x.gov.v1.Vote - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Vote.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (!$util.isInteger(message.proposalId) && !(message.proposalId && $util.isInteger(message.proposalId.low) && $util.isInteger(message.proposalId.high))) - return "proposalId: integer|Long expected"; - if (message.voter != null && message.hasOwnProperty("voter")) - if (!(message.voter && typeof message.voter.length === "number" || $util.isString(message.voter))) - return "voter: buffer expected"; - if (message.option != null && message.hasOwnProperty("option")) - switch (message.option) { - default: - return "option: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.gov.v1.Vote - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.gov.v1.Vote} Vote - */ - Vote.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.gov.v1.Vote) - return object; - var message = new $root.cosmos_sdk.x.gov.v1.Vote(); - if (object.proposalId != null) - if ($util.Long) - (message.proposalId = $util.Long.fromValue(object.proposalId)).unsigned = true; - else if (typeof object.proposalId === "string") - message.proposalId = parseInt(object.proposalId, 10); - else if (typeof object.proposalId === "number") - message.proposalId = object.proposalId; - else if (typeof object.proposalId === "object") - message.proposalId = new $util.LongBits(object.proposalId.low >>> 0, object.proposalId.high >>> 0).toNumber(true); - if (object.voter != null) - if (typeof object.voter === "string") - $util.base64.decode(object.voter, message.voter = $util.newBuffer($util.base64.length(object.voter)), 0); - else if (object.voter.length) - message.voter = object.voter; - switch (object.option) { - case "VOTE_OPTION_UNSPECIFIED": - case 0: - message.option = 0; - break; - case "VOTE_OPTION_YES": - case 1: - message.option = 1; - break; - case "VOTE_OPTION_ABSTAIN": - case 2: - message.option = 2; - break; - case "VOTE_OPTION_NO": - case 3: - message.option = 3; - break; - case "VOTE_OPTION_NO_WITH_VETO": - case 4: - message.option = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.gov.v1.Vote - * @static - * @param {cosmos_sdk.x.gov.v1.Vote} message Vote - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Vote.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proposalId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proposalId = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.voter = ""; - else { - object.voter = []; - if (options.bytes !== Array) - object.voter = $util.newBuffer(object.voter); - } - object.option = options.enums === String ? "VOTE_OPTION_UNSPECIFIED" : 0; - } - if (message.proposalId != null && message.hasOwnProperty("proposalId")) - if (typeof message.proposalId === "number") - object.proposalId = options.longs === String ? String(message.proposalId) : message.proposalId; - else - object.proposalId = options.longs === String ? $util.Long.prototype.toString.call(message.proposalId) : options.longs === Number ? new $util.LongBits(message.proposalId.low >>> 0, message.proposalId.high >>> 0).toNumber(true) : message.proposalId; - if (message.voter != null && message.hasOwnProperty("voter")) - object.voter = options.bytes === String ? $util.base64.encode(message.voter, 0, message.voter.length) : options.bytes === Array ? Array.prototype.slice.call(message.voter) : message.voter; - if (message.option != null && message.hasOwnProperty("option")) - object.option = options.enums === String ? $root.cosmos_sdk.x.gov.v1.VoteOption[message.option] : message.option; - return object; - }; - - /** - * Converts this Vote to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.gov.v1.Vote - * @instance - * @returns {Object.} JSON object - */ - Vote.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Vote; @@ -19833,14 +9808,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgTransfer. * @implements IMsgTransfer * @constructor - * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer=} [properties] Properties to set + * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer=} [p] Properties to set */ - function MsgTransfer(properties) { + function MsgTransfer(p) { this.amount = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -19916,42 +9891,30 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer * @static - * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer} m MsgTransfer message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgTransfer.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourcePort); - if (message.sourceChannel != null && Object.hasOwnProperty.call(message, "sourceChannel")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceChannel); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.sender); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.receiver); - if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.timeoutHeight); - if (message.timeoutTimestamp != null && Object.hasOwnProperty.call(message, "timeoutTimestamp")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeoutTimestamp); - return writer; - }; - - /** - * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @static - * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer} message MsgTransfer message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTransfer.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgTransfer.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.sourcePort != null && Object.hasOwnProperty.call(m, "sourcePort")) + w.uint32(10).string(m.sourcePort); + if (m.sourceChannel != null && Object.hasOwnProperty.call(m, "sourceChannel")) + w.uint32(18).string(m.sourceChannel); + 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(); + } + if (m.sender != null && Object.hasOwnProperty.call(m, "sender")) + w.uint32(34).bytes(m.sender); + if (m.receiver != null && Object.hasOwnProperty.call(m, "receiver")) + w.uint32(42).string(m.receiver); + if (m.timeoutHeight != null && Object.hasOwnProperty.call(m, "timeoutHeight")) + w.uint32(48).uint64(m.timeoutHeight); + if (m.timeoutTimestamp != null && Object.hasOwnProperty.call(m, "timeoutTimestamp")) + w.uint32(56).uint64(m.timeoutTimestamp); + return w; }; /** @@ -19959,233 +9922,48 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.transfer.v1.MsgTransfer} MsgTransfer * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgTransfer.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.transfer.v1.MsgTransfer(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgTransfer.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.transfer.v1.MsgTransfer(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.sourcePort = reader.string(); + m.sourcePort = r.string(); break; case 2: - message.sourceChannel = reader.string(); + m.sourceChannel = r.string(); break; case 3: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.amount && m.amount.length)) + m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; case 4: - message.sender = reader.bytes(); + m.sender = r.bytes(); break; case 5: - message.receiver = reader.string(); + m.receiver = r.string(); break; case 6: - message.timeoutHeight = reader.uint64(); + m.timeoutHeight = r.uint64(); break; case 7: - message.timeoutTimestamp = reader.uint64(); + m.timeoutTimestamp = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.transfer.v1.MsgTransfer} MsgTransfer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTransfer.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTransfer message. - * @function verify - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTransfer.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - if (!$util.isString(message.sourcePort)) - return "sourcePort: string expected"; - if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) - if (!$util.isString(message.sourceChannel)) - return "sourceChannel: string expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (var i = 0; i < message.amount.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - if (message.sender != null && message.hasOwnProperty("sender")) - if (!(message.sender && typeof message.sender.length === "number" || $util.isString(message.sender))) - return "sender: buffer expected"; - if (message.receiver != null && message.hasOwnProperty("receiver")) - if (!$util.isString(message.receiver)) - return "receiver: string expected"; - if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) - if (!$util.isInteger(message.timeoutHeight) && !(message.timeoutHeight && $util.isInteger(message.timeoutHeight.low) && $util.isInteger(message.timeoutHeight.high))) - return "timeoutHeight: integer|Long expected"; - if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) - if (!$util.isInteger(message.timeoutTimestamp) && !(message.timeoutTimestamp && $util.isInteger(message.timeoutTimestamp.low) && $util.isInteger(message.timeoutTimestamp.high))) - return "timeoutTimestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.transfer.v1.MsgTransfer} MsgTransfer - */ - MsgTransfer.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.transfer.v1.MsgTransfer) - return object; - var message = new $root.cosmos_sdk.x.transfer.v1.MsgTransfer(); - if (object.sourcePort != null) - message.sourcePort = String(object.sourcePort); - if (object.sourceChannel != null) - message.sourceChannel = String(object.sourceChannel); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos_sdk.x.transfer.v1.MsgTransfer.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos_sdk.x.transfer.v1.MsgTransfer.amount: object expected"); - message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); - } - } - if (object.sender != null) - if (typeof object.sender === "string") - $util.base64.decode(object.sender, message.sender = $util.newBuffer($util.base64.length(object.sender)), 0); - else if (object.sender.length) - message.sender = object.sender; - if (object.receiver != null) - message.receiver = String(object.receiver); - if (object.timeoutHeight != null) - if ($util.Long) - (message.timeoutHeight = $util.Long.fromValue(object.timeoutHeight)).unsigned = true; - else if (typeof object.timeoutHeight === "string") - message.timeoutHeight = parseInt(object.timeoutHeight, 10); - else if (typeof object.timeoutHeight === "number") - message.timeoutHeight = object.timeoutHeight; - else if (typeof object.timeoutHeight === "object") - message.timeoutHeight = new $util.LongBits(object.timeoutHeight.low >>> 0, object.timeoutHeight.high >>> 0).toNumber(true); - if (object.timeoutTimestamp != null) - if ($util.Long) - (message.timeoutTimestamp = $util.Long.fromValue(object.timeoutTimestamp)).unsigned = true; - else if (typeof object.timeoutTimestamp === "string") - message.timeoutTimestamp = parseInt(object.timeoutTimestamp, 10); - else if (typeof object.timeoutTimestamp === "number") - message.timeoutTimestamp = object.timeoutTimestamp; - else if (typeof object.timeoutTimestamp === "object") - message.timeoutTimestamp = new $util.LongBits(object.timeoutTimestamp.low >>> 0, object.timeoutTimestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @static - * @param {cosmos_sdk.x.transfer.v1.MsgTransfer} message MsgTransfer - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTransfer.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - object.sourcePort = ""; - object.sourceChannel = ""; - if (options.bytes === String) - object.sender = ""; - else { - object.sender = []; - if (options.bytes !== Array) - object.sender = $util.newBuffer(object.sender); - } - object.receiver = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timeoutHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeoutHeight = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timeoutTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeoutTimestamp = options.longs === String ? "0" : 0; - } - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - object.sourcePort = message.sourcePort; - if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) - object.sourceChannel = message.sourceChannel; - if (message.amount && message.amount.length) { - object.amount = []; - for (var j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = options.bytes === String ? $util.base64.encode(message.sender, 0, message.sender.length) : options.bytes === Array ? Array.prototype.slice.call(message.sender) : message.sender; - if (message.receiver != null && message.hasOwnProperty("receiver")) - object.receiver = message.receiver; - if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) - if (typeof message.timeoutHeight === "number") - object.timeoutHeight = options.longs === String ? String(message.timeoutHeight) : message.timeoutHeight; - else - object.timeoutHeight = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutHeight) : options.longs === Number ? new $util.LongBits(message.timeoutHeight.low >>> 0, message.timeoutHeight.high >>> 0).toNumber(true) : message.timeoutHeight; - if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) - if (typeof message.timeoutTimestamp === "number") - object.timeoutTimestamp = options.longs === String ? String(message.timeoutTimestamp) : message.timeoutTimestamp; - else - object.timeoutTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutTimestamp) : options.longs === Number ? new $util.LongBits(message.timeoutTimestamp.low >>> 0, message.timeoutTimestamp.high >>> 0).toNumber(true) : message.timeoutTimestamp; - return object; - }; - - /** - * Converts this MsgTransfer to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @instance - * @returns {Object.} JSON object - */ - MsgTransfer.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgTransfer; @@ -20208,14 +9986,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a FungibleTokenPacketData. * @implements IFungibleTokenPacketData * @constructor - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData=} [properties] Properties to set + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData=} [p] Properties to set */ - function FungibleTokenPacketData(properties) { + function FungibleTokenPacketData(p) { this.amount = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -20259,34 +10037,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData * @static - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData} message FungibleTokenPacketData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData} m FungibleTokenPacketData message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FungibleTokenPacketData.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.amount != null && message.amount.length) - for (var i = 0; i < message.amount.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(message.amount[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.sender != null && Object.hasOwnProperty.call(message, "sender")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sender); - if (message.receiver != null && Object.hasOwnProperty.call(message, "receiver")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.receiver); - return writer; - }; - - /** - * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @static - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData} message FungibleTokenPacketData message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FungibleTokenPacketData.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FungibleTokenPacketData.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.sender != null && Object.hasOwnProperty.call(m, "sender")) + w.uint32(18).string(m.sender); + if (m.receiver != null && Object.hasOwnProperty.call(m, "receiver")) + w.uint32(26).string(m.receiver); + return w; }; /** @@ -20294,152 +10060,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FungibleTokenPacketData.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketData(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + FungibleTokenPacketData.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.transfer.v1.FungibleTokenPacketData(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.amount && message.amount.length)) - message.amount = []; - message.amount.push($root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32())); + if (!(m.amount && m.amount.length)) + m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); break; case 2: - message.sender = reader.string(); + m.sender = r.string(); break; case 3: - message.receiver = reader.string(); + m.receiver = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a FungibleTokenPacketData message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FungibleTokenPacketData.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FungibleTokenPacketData message. - * @function verify - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FungibleTokenPacketData.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - if (!Array.isArray(message.amount)) - return "amount: array expected"; - for (var i = 0; i < message.amount.length; ++i) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount[i]); - if (error) - return "amount." + error; - } - } - if (message.sender != null && message.hasOwnProperty("sender")) - if (!$util.isString(message.sender)) - return "sender: string expected"; - if (message.receiver != null && message.hasOwnProperty("receiver")) - if (!$util.isString(message.receiver)) - return "receiver: string expected"; - return null; - }; - - /** - * Creates a FungibleTokenPacketData message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData - */ - FungibleTokenPacketData.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketData) - return object; - var message = new $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketData(); - if (object.amount) { - if (!Array.isArray(object.amount)) - throw TypeError(".cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.amount: array expected"); - message.amount = []; - for (var i = 0; i < object.amount.length; ++i) { - if (typeof object.amount[i] !== "object") - throw TypeError(".cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.amount: object expected"); - message.amount[i] = $root.cosmos_sdk.v1.Coin.fromObject(object.amount[i]); - } - } - if (object.sender != null) - message.sender = String(object.sender); - if (object.receiver != null) - message.receiver = String(object.receiver); - return message; - }; - - /** - * Creates a plain object from a FungibleTokenPacketData message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @static - * @param {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} message FungibleTokenPacketData - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FungibleTokenPacketData.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.amount = []; - if (options.defaults) { - object.sender = ""; - object.receiver = ""; - } - if (message.amount && message.amount.length) { - object.amount = []; - for (var j = 0; j < message.amount.length; ++j) - object.amount[j] = $root.cosmos_sdk.v1.Coin.toObject(message.amount[j], options); - } - if (message.sender != null && message.hasOwnProperty("sender")) - object.sender = message.sender; - if (message.receiver != null && message.hasOwnProperty("receiver")) - object.receiver = message.receiver; - return object; - }; - - /** - * Converts this FungibleTokenPacketData to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @instance - * @returns {Object.} JSON object - */ - FungibleTokenPacketData.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return FungibleTokenPacketData; @@ -20461,13 +10111,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a FungibleTokenPacketAcknowledgement. * @implements IFungibleTokenPacketAcknowledgement * @constructor - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement=} [properties] Properties to set + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement=} [p] Properties to set */ - function FungibleTokenPacketAcknowledgement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function FungibleTokenPacketAcknowledgement(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]]; } /** @@ -20503,31 +10153,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement * @static - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement} message FungibleTokenPacketAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement} m FungibleTokenPacketAcknowledgement message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FungibleTokenPacketAcknowledgement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.success != null && Object.hasOwnProperty.call(message, "success")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.success); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.error); - return writer; - }; - - /** - * Encodes the specified FungibleTokenPacketAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @static - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement} message FungibleTokenPacketAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FungibleTokenPacketAcknowledgement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FungibleTokenPacketAcknowledgement.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.success != null && Object.hasOwnProperty.call(m, "success")) + w.uint32(8).bool(m.success); + if (m.error != null && Object.hasOwnProperty.call(m, "error")) + w.uint32(18).string(m.error); + return w; }; /** @@ -20535,121 +10172,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} FungibleTokenPacketAcknowledgement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FungibleTokenPacketAcknowledgement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + FungibleTokenPacketAcknowledgement.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.transfer.v1.FungibleTokenPacketAcknowledgement(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.success = reader.bool(); + m.success = r.bool(); break; case 2: - message.error = reader.string(); + m.error = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} FungibleTokenPacketAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FungibleTokenPacketAcknowledgement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FungibleTokenPacketAcknowledgement message. - * @function verify - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FungibleTokenPacketAcknowledgement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.success != null && message.hasOwnProperty("success")) - if (typeof message.success !== "boolean") - return "success: boolean expected"; - if (message.error != null && message.hasOwnProperty("error")) - if (!$util.isString(message.error)) - return "error: string expected"; - return null; - }; - - /** - * Creates a FungibleTokenPacketAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} FungibleTokenPacketAcknowledgement - */ - FungibleTokenPacketAcknowledgement.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement) - return object; - var message = new $root.cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement(); - if (object.success != null) - message.success = Boolean(object.success); - if (object.error != null) - message.error = String(object.error); - return message; - }; - - /** - * Creates a plain object from a FungibleTokenPacketAcknowledgement message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @static - * @param {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} message FungibleTokenPacketAcknowledgement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FungibleTokenPacketAcknowledgement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.success = false; - object.error = ""; - } - if (message.success != null && message.hasOwnProperty("success")) - object.success = message.success; - if (message.error != null && message.hasOwnProperty("error")) - object.error = message.error; - return object; - }; - - /** - * Converts this FungibleTokenPacketAcknowledgement to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @instance - * @returns {Object.} JSON object - */ - FungibleTokenPacketAcknowledgement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return FungibleTokenPacketAcknowledgement; @@ -20706,13 +10253,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgConnectionOpenInit. * @implements IMsgConnectionOpenInit * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit=} [p] Properties to set */ - function MsgConnectionOpenInit(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgConnectionOpenInit(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]]; } /** @@ -20764,35 +10311,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit} message MsgConnectionOpenInit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit} m MsgConnectionOpenInit message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgConnectionOpenInit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); - if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionId); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit} message MsgConnectionOpenInit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenInit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgConnectionOpenInit.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) + w.uint32(10).string(m.clientId); + if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) + w.uint32(18).string(m.connectionId); + if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) + $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(m.counterparty, w.uint32(26).fork()).ldelim(); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(34).bytes(m.signer); + return w; }; /** @@ -20800,157 +10334,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgConnectionOpenInit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgConnectionOpenInit.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.ibc.connection.v1.MsgConnectionOpenInit(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.clientId = reader.string(); + m.clientId = r.string(); break; case 2: - message.connectionId = reader.string(); + m.connectionId = r.string(); break; case 3: - message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(reader, reader.uint32()); + m.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(r, r.uint32()); break; case 4: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgConnectionOpenInit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenInit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenInit message. - * @function verify - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenInit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientId != null && message.hasOwnProperty("clientId")) - if (!$util.isString(message.clientId)) - return "clientId: string expected"; - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - if (!$util.isString(message.connectionId)) - return "connectionId: string expected"; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) { - var error = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenInit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit - */ - MsgConnectionOpenInit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit) - return object; - var message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit(); - if (object.clientId != null) - message.clientId = String(object.clientId); - if (object.connectionId != null) - message.connectionId = String(object.connectionId); - if (object.counterparty != null) { - if (typeof object.counterparty !== "object") - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.counterparty: object expected"); - message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenInit message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} message MsgConnectionOpenInit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenInit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clientId = ""; - object.connectionId = ""; - object.counterparty = null; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.clientId != null && message.hasOwnProperty("clientId")) - object.clientId = message.clientId; - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - object.connectionId = message.connectionId; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgConnectionOpenInit to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgConnectionOpenInit; @@ -20966,9 +10380,9 @@ $root.cosmos_sdk = (function() { * @property {string|null} [connectionId] MsgConnectionOpenTry connectionId * @property {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenTry counterparty * @property {Array.|null} [counterpartyVersions] MsgConnectionOpenTry counterpartyVersions - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofInit] MsgConnectionOpenTry proofInit + * @property {Uint8Array|null} [proofInit] MsgConnectionOpenTry proofInit * @property {number|Long|null} [proofHeight] MsgConnectionOpenTry proofHeight - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofConsensus] MsgConnectionOpenTry proofConsensus + * @property {Uint8Array|null} [proofConsensus] MsgConnectionOpenTry proofConsensus * @property {number|Long|null} [consensusHeight] MsgConnectionOpenTry consensusHeight * @property {Uint8Array|null} [signer] MsgConnectionOpenTry signer */ @@ -20979,14 +10393,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgConnectionOpenTry. * @implements IMsgConnectionOpenTry * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry=} [p] Properties to set */ - function MsgConnectionOpenTry(properties) { + function MsgConnectionOpenTry(p) { this.counterpartyVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -21023,11 +10437,11 @@ $root.cosmos_sdk = (function() { /** * MsgConnectionOpenTry proofInit. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofInit + * @member {Uint8Array} proofInit * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry * @instance */ - MsgConnectionOpenTry.prototype.proofInit = null; + MsgConnectionOpenTry.prototype.proofInit = $util.newBuffer([]); /** * MsgConnectionOpenTry proofHeight. @@ -21039,11 +10453,11 @@ $root.cosmos_sdk = (function() { /** * MsgConnectionOpenTry proofConsensus. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofConsensus + * @member {Uint8Array} proofConsensus * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry * @instance */ - MsgConnectionOpenTry.prototype.proofConsensus = null; + MsgConnectionOpenTry.prototype.proofConsensus = $util.newBuffer([]); /** * MsgConnectionOpenTry consensusHeight. @@ -21078,46 +10492,34 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry} message MsgConnectionOpenTry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry} m MsgConnectionOpenTry message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgConnectionOpenTry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); - if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionId); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.counterpartyVersions != null && message.counterpartyVersions.length) - for (var i = 0; i < message.counterpartyVersions.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterpartyVersions[i]); - if (message.proofInit != null && Object.hasOwnProperty.call(message, "proofInit")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofInit, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.proofHeight); - if (message.proofConsensus != null && Object.hasOwnProperty.call(message, "proofConsensus")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofConsensus, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.consensusHeight != null && Object.hasOwnProperty.call(message, "consensusHeight")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.consensusHeight); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry} message MsgConnectionOpenTry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenTry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgConnectionOpenTry.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) + w.uint32(10).string(m.clientId); + if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) + w.uint32(18).string(m.connectionId); + if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) + $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(m.counterparty, w.uint32(26).fork()).ldelim(); + if (m.counterpartyVersions != null && m.counterpartyVersions.length) { + for (var i = 0; i < m.counterpartyVersions.length; ++i) + w.uint32(34).string(m.counterpartyVersions[i]); + } + if (m.proofInit != null && Object.hasOwnProperty.call(m, "proofInit")) + w.uint32(42).bytes(m.proofInit); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(48).uint64(m.proofHeight); + if (m.proofConsensus != null && Object.hasOwnProperty.call(m, "proofConsensus")) + w.uint32(58).bytes(m.proofConsensus); + if (m.consensusHeight != null && Object.hasOwnProperty.call(m, "consensusHeight")) + w.uint32(64).uint64(m.consensusHeight); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(74).bytes(m.signer); + return w; }; /** @@ -21125,265 +10527,54 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgConnectionOpenTry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgConnectionOpenTry.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.ibc.connection.v1.MsgConnectionOpenTry(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.clientId = reader.string(); + m.clientId = r.string(); break; case 2: - message.connectionId = reader.string(); + m.connectionId = r.string(); break; case 3: - message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(reader, reader.uint32()); + m.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(r, r.uint32()); break; case 4: - if (!(message.counterpartyVersions && message.counterpartyVersions.length)) - message.counterpartyVersions = []; - message.counterpartyVersions.push(reader.string()); + if (!(m.counterpartyVersions && m.counterpartyVersions.length)) + m.counterpartyVersions = []; + m.counterpartyVersions.push(r.string()); break; case 5: - message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proofInit = r.bytes(); break; case 6: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 7: - message.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proofConsensus = r.bytes(); break; case 8: - message.consensusHeight = reader.uint64(); + m.consensusHeight = r.uint64(); break; case 9: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgConnectionOpenTry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenTry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenTry message. - * @function verify - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenTry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientId != null && message.hasOwnProperty("clientId")) - if (!$util.isString(message.clientId)) - return "clientId: string expected"; - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - if (!$util.isString(message.connectionId)) - return "connectionId: string expected"; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) { - var error = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.counterpartyVersions != null && message.hasOwnProperty("counterpartyVersions")) { - if (!Array.isArray(message.counterpartyVersions)) - return "counterpartyVersions: array expected"; - for (var i = 0; i < message.counterpartyVersions.length; ++i) - if (!$util.isString(message.counterpartyVersions[i])) - return "counterpartyVersions: string[] expected"; - } - if (message.proofInit != null && message.hasOwnProperty("proofInit")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofInit); - if (error) - return "proofInit." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofConsensus); - if (error) - return "proofConsensus." + error; - } - if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) - if (!$util.isInteger(message.consensusHeight) && !(message.consensusHeight && $util.isInteger(message.consensusHeight.low) && $util.isInteger(message.consensusHeight.high))) - return "consensusHeight: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenTry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry - */ - MsgConnectionOpenTry.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry) - return object; - var message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry(); - if (object.clientId != null) - message.clientId = String(object.clientId); - if (object.connectionId != null) - message.connectionId = String(object.connectionId); - if (object.counterparty != null) { - if (typeof object.counterparty !== "object") - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.counterparty: object expected"); - message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.fromObject(object.counterparty); - } - if (object.counterpartyVersions) { - if (!Array.isArray(object.counterpartyVersions)) - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.counterpartyVersions: array expected"); - message.counterpartyVersions = []; - for (var i = 0; i < object.counterpartyVersions.length; ++i) - message.counterpartyVersions[i] = String(object.counterpartyVersions[i]); - } - if (object.proofInit != null) { - if (typeof object.proofInit !== "object") - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.proofInit: object expected"); - message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofInit); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.proofConsensus != null) { - if (typeof object.proofConsensus !== "object") - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.proofConsensus: object expected"); - message.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofConsensus); - } - if (object.consensusHeight != null) - if ($util.Long) - (message.consensusHeight = $util.Long.fromValue(object.consensusHeight)).unsigned = true; - else if (typeof object.consensusHeight === "string") - message.consensusHeight = parseInt(object.consensusHeight, 10); - else if (typeof object.consensusHeight === "number") - message.consensusHeight = object.consensusHeight; - else if (typeof object.consensusHeight === "object") - message.consensusHeight = new $util.LongBits(object.consensusHeight.low >>> 0, object.consensusHeight.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenTry message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} message MsgConnectionOpenTry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenTry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.counterpartyVersions = []; - if (options.defaults) { - object.clientId = ""; - object.connectionId = ""; - object.counterparty = null; - object.proofInit = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - object.proofConsensus = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.consensusHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.consensusHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.clientId != null && message.hasOwnProperty("clientId")) - object.clientId = message.clientId; - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - object.connectionId = message.connectionId; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.toObject(message.counterparty, options); - if (message.counterpartyVersions && message.counterpartyVersions.length) { - object.counterpartyVersions = []; - for (var j = 0; j < message.counterpartyVersions.length; ++j) - object.counterpartyVersions[j] = message.counterpartyVersions[j]; - } - if (message.proofInit != null && message.hasOwnProperty("proofInit")) - object.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofInit, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) - object.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofConsensus, options); - if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) - if (typeof message.consensusHeight === "number") - object.consensusHeight = options.longs === String ? String(message.consensusHeight) : message.consensusHeight; - else - object.consensusHeight = options.longs === String ? $util.Long.prototype.toString.call(message.consensusHeight) : options.longs === Number ? new $util.LongBits(message.consensusHeight.low >>> 0, message.consensusHeight.high >>> 0).toNumber(true) : message.consensusHeight; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgConnectionOpenTry to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenTry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgConnectionOpenTry; @@ -21397,9 +10588,9 @@ $root.cosmos_sdk = (function() { * @interface IMsgConnectionOpenAck * @property {string|null} [connectionId] MsgConnectionOpenAck connectionId * @property {string|null} [version] MsgConnectionOpenAck version - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofTry] MsgConnectionOpenAck proofTry + * @property {Uint8Array|null} [proofTry] MsgConnectionOpenAck proofTry * @property {number|Long|null} [proofHeight] MsgConnectionOpenAck proofHeight - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofConsensus] MsgConnectionOpenAck proofConsensus + * @property {Uint8Array|null} [proofConsensus] MsgConnectionOpenAck proofConsensus * @property {number|Long|null} [consensusHeight] MsgConnectionOpenAck consensusHeight * @property {Uint8Array|null} [signer] MsgConnectionOpenAck signer */ @@ -21410,13 +10601,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgConnectionOpenAck. * @implements IMsgConnectionOpenAck * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck=} [p] Properties to set */ - function MsgConnectionOpenAck(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgConnectionOpenAck(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]]; } /** @@ -21437,11 +10628,11 @@ $root.cosmos_sdk = (function() { /** * MsgConnectionOpenAck proofTry. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofTry + * @member {Uint8Array} proofTry * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck * @instance */ - MsgConnectionOpenAck.prototype.proofTry = null; + MsgConnectionOpenAck.prototype.proofTry = $util.newBuffer([]); /** * MsgConnectionOpenAck proofHeight. @@ -21453,11 +10644,11 @@ $root.cosmos_sdk = (function() { /** * MsgConnectionOpenAck proofConsensus. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofConsensus + * @member {Uint8Array} proofConsensus * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck * @instance */ - MsgConnectionOpenAck.prototype.proofConsensus = null; + MsgConnectionOpenAck.prototype.proofConsensus = $util.newBuffer([]); /** * MsgConnectionOpenAck consensusHeight. @@ -21492,41 +10683,28 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck} message MsgConnectionOpenAck message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck} m MsgConnectionOpenAck message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgConnectionOpenAck.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionId); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - if (message.proofTry != null && Object.hasOwnProperty.call(message, "proofTry")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofTry, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.proofHeight); - if (message.proofConsensus != null && Object.hasOwnProperty.call(message, "proofConsensus")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofConsensus, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.consensusHeight != null && Object.hasOwnProperty.call(message, "consensusHeight")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.consensusHeight); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck} message MsgConnectionOpenAck message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenAck.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgConnectionOpenAck.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) + w.uint32(10).string(m.connectionId); + if (m.version != null && Object.hasOwnProperty.call(m, "version")) + w.uint32(18).string(m.version); + if (m.proofTry != null && Object.hasOwnProperty.call(m, "proofTry")) + w.uint32(26).bytes(m.proofTry); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(32).uint64(m.proofHeight); + if (m.proofConsensus != null && Object.hasOwnProperty.call(m, "proofConsensus")) + w.uint32(42).bytes(m.proofConsensus); + if (m.consensusHeight != null && Object.hasOwnProperty.call(m, "consensusHeight")) + w.uint32(48).uint64(m.consensusHeight); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(58).bytes(m.signer); + return w; }; /** @@ -21534,223 +10712,46 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgConnectionOpenAck.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgConnectionOpenAck.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.ibc.connection.v1.MsgConnectionOpenAck(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.connectionId = reader.string(); + m.connectionId = r.string(); break; case 2: - message.version = reader.string(); + m.version = r.string(); break; case 3: - message.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proofTry = r.bytes(); break; case 4: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 5: - message.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proofConsensus = r.bytes(); break; case 6: - message.consensusHeight = reader.uint64(); + m.consensusHeight = r.uint64(); break; case 7: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgConnectionOpenAck message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenAck.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenAck message. - * @function verify - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenAck.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - if (!$util.isString(message.connectionId)) - return "connectionId: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.proofTry != null && message.hasOwnProperty("proofTry")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofTry); - if (error) - return "proofTry." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofConsensus); - if (error) - return "proofConsensus." + error; - } - if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) - if (!$util.isInteger(message.consensusHeight) && !(message.consensusHeight && $util.isInteger(message.consensusHeight.low) && $util.isInteger(message.consensusHeight.high))) - return "consensusHeight: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenAck message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck - */ - MsgConnectionOpenAck.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck) - return object; - var message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck(); - if (object.connectionId != null) - message.connectionId = String(object.connectionId); - if (object.version != null) - message.version = String(object.version); - if (object.proofTry != null) { - if (typeof object.proofTry !== "object") - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.proofTry: object expected"); - message.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofTry); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.proofConsensus != null) { - if (typeof object.proofConsensus !== "object") - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.proofConsensus: object expected"); - message.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofConsensus); - } - if (object.consensusHeight != null) - if ($util.Long) - (message.consensusHeight = $util.Long.fromValue(object.consensusHeight)).unsigned = true; - else if (typeof object.consensusHeight === "string") - message.consensusHeight = parseInt(object.consensusHeight, 10); - else if (typeof object.consensusHeight === "number") - message.consensusHeight = object.consensusHeight; - else if (typeof object.consensusHeight === "object") - message.consensusHeight = new $util.LongBits(object.consensusHeight.low >>> 0, object.consensusHeight.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenAck message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} message MsgConnectionOpenAck - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenAck.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.connectionId = ""; - object.version = ""; - object.proofTry = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - object.proofConsensus = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.consensusHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.consensusHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - object.connectionId = message.connectionId; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.proofTry != null && message.hasOwnProperty("proofTry")) - object.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofTry, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.proofConsensus != null && message.hasOwnProperty("proofConsensus")) - object.proofConsensus = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofConsensus, options); - if (message.consensusHeight != null && message.hasOwnProperty("consensusHeight")) - if (typeof message.consensusHeight === "number") - object.consensusHeight = options.longs === String ? String(message.consensusHeight) : message.consensusHeight; - else - object.consensusHeight = options.longs === String ? $util.Long.prototype.toString.call(message.consensusHeight) : options.longs === Number ? new $util.LongBits(message.consensusHeight.low >>> 0, message.consensusHeight.high >>> 0).toNumber(true) : message.consensusHeight; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgConnectionOpenAck to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenAck.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgConnectionOpenAck; @@ -21763,7 +10764,7 @@ $root.cosmos_sdk = (function() { * @memberof cosmos_sdk.x.ibc.connection.v1 * @interface IMsgConnectionOpenConfirm * @property {string|null} [connectionId] MsgConnectionOpenConfirm connectionId - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofAck] MsgConnectionOpenConfirm proofAck + * @property {Uint8Array|null} [proofAck] MsgConnectionOpenConfirm proofAck * @property {number|Long|null} [proofHeight] MsgConnectionOpenConfirm proofHeight * @property {Uint8Array|null} [signer] MsgConnectionOpenConfirm signer */ @@ -21774,13 +10775,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgConnectionOpenConfirm. * @implements IMsgConnectionOpenConfirm * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm=} [p] Properties to set */ - function MsgConnectionOpenConfirm(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgConnectionOpenConfirm(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]]; } /** @@ -21793,11 +10794,11 @@ $root.cosmos_sdk = (function() { /** * MsgConnectionOpenConfirm proofAck. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofAck + * @member {Uint8Array} proofAck * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm * @instance */ - MsgConnectionOpenConfirm.prototype.proofAck = null; + MsgConnectionOpenConfirm.prototype.proofAck = $util.newBuffer([]); /** * MsgConnectionOpenConfirm proofHeight. @@ -21832,35 +10833,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm} message MsgConnectionOpenConfirm message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm} m MsgConnectionOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgConnectionOpenConfirm.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionId); - if (message.proofAck != null && Object.hasOwnProperty.call(message, "proofAck")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofAck, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.proofHeight); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm} message MsgConnectionOpenConfirm message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenConfirm.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgConnectionOpenConfirm.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) + w.uint32(10).string(m.connectionId); + if (m.proofAck != null && Object.hasOwnProperty.call(m, "proofAck")) + w.uint32(18).bytes(m.proofAck); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(24).uint64(m.proofHeight); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(34).bytes(m.signer); + return w; }; /** @@ -21868,171 +10856,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgConnectionOpenConfirm.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgConnectionOpenConfirm.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.ibc.connection.v1.MsgConnectionOpenConfirm(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.connectionId = reader.string(); + m.connectionId = r.string(); break; case 2: - message.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proofAck = r.bytes(); break; case 3: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 4: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenConfirm.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgConnectionOpenConfirm message. - * @function verify - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgConnectionOpenConfirm.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - if (!$util.isString(message.connectionId)) - return "connectionId: string expected"; - if (message.proofAck != null && message.hasOwnProperty("proofAck")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofAck); - if (error) - return "proofAck." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgConnectionOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm - */ - MsgConnectionOpenConfirm.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm) - return object; - var message = new $root.cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm(); - if (object.connectionId != null) - message.connectionId = String(object.connectionId); - if (object.proofAck != null) { - if (typeof object.proofAck !== "object") - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.proofAck: object expected"); - message.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofAck); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgConnectionOpenConfirm message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} message MsgConnectionOpenConfirm - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgConnectionOpenConfirm.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.connectionId = ""; - object.proofAck = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - object.connectionId = message.connectionId; - if (message.proofAck != null && message.hasOwnProperty("proofAck")) - object.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofAck, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgConnectionOpenConfirm to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @instance - * @returns {Object.} JSON object - */ - MsgConnectionOpenConfirm.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgConnectionOpenConfirm; @@ -22057,14 +10911,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ConnectionEnd. * @implements IConnectionEnd * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd=} [p] Properties to set */ - function ConnectionEnd(properties) { + function ConnectionEnd(p) { this.versions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -22124,38 +10978,26 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd} message ConnectionEnd message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd} m ConnectionEnd message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConnectionEnd.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clientId); - if (message.versions != null && message.versions.length) - for (var i = 0; i < message.versions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.versions[i]); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd} message ConnectionEnd message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionEnd.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ConnectionEnd.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.id != null && Object.hasOwnProperty.call(m, "id")) + w.uint32(10).string(m.id); + if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) + w.uint32(18).string(m.clientId); + if (m.versions != null && m.versions.length) { + for (var i = 0; i < m.versions.length; ++i) + w.uint32(26).string(m.versions[i]); + } + if (m.state != null && Object.hasOwnProperty.call(m, "state")) + w.uint32(32).int32(m.state); + if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) + $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(m.counterparty, w.uint32(42).fork()).ldelim(); + return w; }; /** @@ -22163,197 +11005,42 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} ConnectionEnd * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConnectionEnd.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.ConnectionEnd(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ConnectionEnd.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.ibc.connection.v1.ConnectionEnd(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.id = reader.string(); + m.id = r.string(); break; case 2: - message.clientId = reader.string(); + m.clientId = r.string(); break; case 3: - if (!(message.versions && message.versions.length)) - message.versions = []; - message.versions.push(reader.string()); + if (!(m.versions && m.versions.length)) + m.versions = []; + m.versions.push(r.string()); break; case 4: - message.state = reader.int32(); + m.state = r.int32(); break; case 5: - message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(reader, reader.uint32()); + m.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ConnectionEnd message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} ConnectionEnd - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionEnd.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConnectionEnd message. - * @function verify - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConnectionEnd.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.clientId != null && message.hasOwnProperty("clientId")) - if (!$util.isString(message.clientId)) - return "clientId: string expected"; - if (message.versions != null && message.hasOwnProperty("versions")) { - if (!Array.isArray(message.versions)) - return "versions: array expected"; - for (var i = 0; i < message.versions.length; ++i) - if (!$util.isString(message.versions[i])) - return "versions: string[] expected"; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.counterparty != null && message.hasOwnProperty("counterparty")) { - var error = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - return null; - }; - - /** - * Creates a ConnectionEnd message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} ConnectionEnd - */ - ConnectionEnd.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.ConnectionEnd) - return object; - var message = new $root.cosmos_sdk.x.ibc.connection.v1.ConnectionEnd(); - if (object.id != null) - message.id = String(object.id); - if (object.clientId != null) - message.clientId = String(object.clientId); - if (object.versions) { - if (!Array.isArray(object.versions)) - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.versions: array expected"); - message.versions = []; - for (var i = 0; i < object.versions.length; ++i) - message.versions[i] = String(object.versions[i]); - } - switch (object.state) { - case "STATE_UNINITIALIZED_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "STATE_INIT": - case 1: - message.state = 1; - break; - case "STATE_TRYOPEN": - case 2: - message.state = 2; - break; - case "STATE_OPEN": - case 3: - message.state = 3; - break; - } - if (object.counterparty != null) { - if (typeof object.counterparty !== "object") - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.counterparty: object expected"); - message.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.fromObject(object.counterparty); - } - return message; - }; - - /** - * Creates a plain object from a ConnectionEnd message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} message ConnectionEnd - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConnectionEnd.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.versions = []; - if (options.defaults) { - object.id = ""; - object.clientId = ""; - object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; - object.counterparty = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.clientId != null && message.hasOwnProperty("clientId")) - object.clientId = message.clientId; - if (message.versions && message.versions.length) { - object.versions = []; - for (var j = 0; j < message.versions.length; ++j) - object.versions[j] = message.versions[j]; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.cosmos_sdk.x.ibc.connection.v1.State[message.state] : message.state; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.toObject(message.counterparty, options); - return object; - }; - - /** - * Converts this ConnectionEnd to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @instance - * @returns {Object.} JSON object - */ - ConnectionEnd.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ConnectionEnd; @@ -22394,13 +11081,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Counterparty. * @implements ICounterparty * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty=} [p] Properties to set */ - function Counterparty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Counterparty(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]]; } /** @@ -22444,33 +11131,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty * @static - * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty} message Counterparty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty} m Counterparty message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Counterparty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clientId); - if (message.connectionId != null && Object.hasOwnProperty.call(message, "connectionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.connectionId); - if (message.prefix != null && Object.hasOwnProperty.call(message, "prefix")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.encode(message.prefix, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty} message Counterparty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Counterparty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Counterparty.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) + w.uint32(10).string(m.clientId); + if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) + w.uint32(18).string(m.connectionId); + if (m.prefix != null && Object.hasOwnProperty.call(m, "prefix")) + $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.encode(m.prefix, w.uint32(26).fork()).ldelim(); + return w; }; /** @@ -22478,137 +11152,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.connection.v1.Counterparty} Counterparty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Counterparty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.Counterparty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Counterparty.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.ibc.connection.v1.Counterparty(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.clientId = reader.string(); + m.clientId = r.string(); break; case 2: - message.connectionId = reader.string(); + m.connectionId = r.string(); break; case 3: - message.prefix = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.decode(reader, reader.uint32()); + m.prefix = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Counterparty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.connection.v1.Counterparty} Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Counterparty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Counterparty message. - * @function verify - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Counterparty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.clientId != null && message.hasOwnProperty("clientId")) - if (!$util.isString(message.clientId)) - return "clientId: string expected"; - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - if (!$util.isString(message.connectionId)) - return "connectionId: string expected"; - if (message.prefix != null && message.hasOwnProperty("prefix")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify(message.prefix); - if (error) - return "prefix." + error; - } - return null; - }; - - /** - * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.connection.v1.Counterparty} Counterparty - */ - Counterparty.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.Counterparty) - return object; - var message = new $root.cosmos_sdk.x.ibc.connection.v1.Counterparty(); - if (object.clientId != null) - message.clientId = String(object.clientId); - if (object.connectionId != null) - message.connectionId = String(object.connectionId); - if (object.prefix != null) { - if (typeof object.prefix !== "object") - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.Counterparty.prefix: object expected"); - message.prefix = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.fromObject(object.prefix); - } - return message; - }; - - /** - * Creates a plain object from a Counterparty message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.Counterparty} message Counterparty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Counterparty.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.clientId = ""; - object.connectionId = ""; - object.prefix = null; - } - if (message.clientId != null && message.hasOwnProperty("clientId")) - object.clientId = message.clientId; - if (message.connectionId != null && message.hasOwnProperty("connectionId")) - object.connectionId = message.connectionId; - if (message.prefix != null && message.hasOwnProperty("prefix")) - object.prefix = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.toObject(message.prefix, options); - return object; - }; - - /** - * Converts this Counterparty to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @instance - * @returns {Object.} JSON object - */ - Counterparty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Counterparty; @@ -22629,14 +11200,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ClientPaths. * @implements IClientPaths * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths=} [p] Properties to set */ - function ClientPaths(properties) { + function ClientPaths(p) { this.paths = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -22664,30 +11235,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths} message ClientPaths message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths} m ClientPaths message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientPaths.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified ClientPaths message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths} message ClientPaths message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientPaths.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ClientPaths.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.paths != null && m.paths.length) { + for (var i = 0; i < m.paths.length; ++i) + w.uint32(10).string(m.paths[i]); + } + return w; }; /** @@ -22695,123 +11254,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.connection.v1.ClientPaths} ClientPaths * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ClientPaths.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.connection.v1.ClientPaths(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ClientPaths.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.ibc.connection.v1.ClientPaths(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); + if (!(m.paths && m.paths.length)) + m.paths = []; + m.paths.push(r.string()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ClientPaths message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.connection.v1.ClientPaths} ClientPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientPaths.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientPaths message. - * @function verify - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientPaths.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a ClientPaths message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.connection.v1.ClientPaths} ClientPaths - */ - ClientPaths.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.connection.v1.ClientPaths) - return object; - var message = new $root.cosmos_sdk.x.ibc.connection.v1.ClientPaths(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".cosmos_sdk.x.ibc.connection.v1.ClientPaths.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a ClientPaths message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.ClientPaths} message ClientPaths - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientPaths.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this ClientPaths to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @instance - * @returns {Object.} JSON object - */ - ClientPaths.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ClientPaths; @@ -22859,13 +11325,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgChannelOpenInit. * @implements IMsgChannelOpenInit * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit=} [p] Properties to set */ - function MsgChannelOpenInit(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgChannelOpenInit(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]]; } /** @@ -22917,35 +11383,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit} message MsgChannelOpenInit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit} m MsgChannelOpenInit message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgChannelOpenInit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); - if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.cosmos_sdk.x.ibc.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit} message MsgChannelOpenInit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenInit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgChannelOpenInit.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) + w.uint32(10).string(m.portId); + if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) + w.uint32(18).string(m.channelId); + if (m.channel != null && Object.hasOwnProperty.call(m, "channel")) + $root.cosmos_sdk.x.ibc.channel.v1.Channel.encode(m.channel, w.uint32(26).fork()).ldelim(); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(34).bytes(m.signer); + return w; }; /** @@ -22953,157 +11406,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgChannelOpenInit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgChannelOpenInit.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.ibc.channel.v1.MsgChannelOpenInit(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.portId = reader.string(); + m.portId = r.string(); break; case 2: - message.channelId = reader.string(); + m.channelId = r.string(); break; case 3: - message.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.decode(reader, reader.uint32()); + m.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.decode(r, r.uint32()); break; case 4: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgChannelOpenInit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenInit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenInit message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenInit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.portId != null && message.hasOwnProperty("portId")) - if (!$util.isString(message.portId)) - return "portId: string expected"; - if (message.channelId != null && message.hasOwnProperty("channelId")) - if (!$util.isString(message.channelId)) - return "channelId: string expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.cosmos_sdk.x.ibc.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenInit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit - */ - MsgChannelOpenInit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit(); - if (object.portId != null) - message.portId = String(object.portId); - if (object.channelId != null) - message.channelId = String(object.channelId); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.channel: object expected"); - message.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.fromObject(object.channel); - } - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenInit message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} message MsgChannelOpenInit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenInit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.portId = ""; - object.channelId = ""; - object.channel = null; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.portId != null && message.hasOwnProperty("portId")) - object.portId = message.portId; - if (message.channelId != null && message.hasOwnProperty("channelId")) - object.channelId = message.channelId; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.toObject(message.channel, options); - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenInit to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgChannelOpenInit; @@ -23119,7 +11452,7 @@ $root.cosmos_sdk = (function() { * @property {string|null} [channelId] MsgChannelOpenTry channelId * @property {cosmos_sdk.x.ibc.channel.v1.IChannel|null} [channel] MsgChannelOpenTry channel * @property {string|null} [counterpartyVersion] MsgChannelOpenTry counterpartyVersion - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofInit] MsgChannelOpenTry proofInit + * @property {Uint8Array|null} [proofInit] MsgChannelOpenTry proofInit * @property {number|Long|null} [proofHeight] MsgChannelOpenTry proofHeight * @property {Uint8Array|null} [signer] MsgChannelOpenTry signer */ @@ -23130,13 +11463,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgChannelOpenTry. * @implements IMsgChannelOpenTry * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry=} [p] Properties to set */ - function MsgChannelOpenTry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgChannelOpenTry(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]]; } /** @@ -23173,11 +11506,11 @@ $root.cosmos_sdk = (function() { /** * MsgChannelOpenTry proofInit. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofInit + * @member {Uint8Array} proofInit * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry * @instance */ - MsgChannelOpenTry.prototype.proofInit = null; + MsgChannelOpenTry.prototype.proofInit = $util.newBuffer([]); /** * MsgChannelOpenTry proofHeight. @@ -23212,41 +11545,28 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry} message MsgChannelOpenTry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry} m MsgChannelOpenTry message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgChannelOpenTry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); - if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); - if (message.channel != null && Object.hasOwnProperty.call(message, "channel")) - $root.cosmos_sdk.x.ibc.channel.v1.Channel.encode(message.channel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.counterpartyVersion != null && Object.hasOwnProperty.call(message, "counterpartyVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.counterpartyVersion); - if (message.proofInit != null && Object.hasOwnProperty.call(message, "proofInit")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofInit, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.proofHeight); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry} message MsgChannelOpenTry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenTry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgChannelOpenTry.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) + w.uint32(10).string(m.portId); + if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) + w.uint32(18).string(m.channelId); + if (m.channel != null && Object.hasOwnProperty.call(m, "channel")) + $root.cosmos_sdk.x.ibc.channel.v1.Channel.encode(m.channel, w.uint32(26).fork()).ldelim(); + if (m.counterpartyVersion != null && Object.hasOwnProperty.call(m, "counterpartyVersion")) + w.uint32(34).string(m.counterpartyVersion); + if (m.proofInit != null && Object.hasOwnProperty.call(m, "proofInit")) + w.uint32(42).bytes(m.proofInit); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(48).uint64(m.proofHeight); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(58).bytes(m.signer); + return w; }; /** @@ -23254,209 +11574,46 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgChannelOpenTry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgChannelOpenTry.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.ibc.channel.v1.MsgChannelOpenTry(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.portId = reader.string(); + m.portId = r.string(); break; case 2: - message.channelId = reader.string(); + m.channelId = r.string(); break; case 3: - message.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.decode(reader, reader.uint32()); + m.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.decode(r, r.uint32()); break; case 4: - message.counterpartyVersion = reader.string(); + m.counterpartyVersion = r.string(); break; case 5: - message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proofInit = r.bytes(); break; case 6: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 7: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgChannelOpenTry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenTry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenTry message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenTry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.portId != null && message.hasOwnProperty("portId")) - if (!$util.isString(message.portId)) - return "portId: string expected"; - if (message.channelId != null && message.hasOwnProperty("channelId")) - if (!$util.isString(message.channelId)) - return "channelId: string expected"; - if (message.channel != null && message.hasOwnProperty("channel")) { - var error = $root.cosmos_sdk.x.ibc.channel.v1.Channel.verify(message.channel); - if (error) - return "channel." + error; - } - if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) - if (!$util.isString(message.counterpartyVersion)) - return "counterpartyVersion: string expected"; - if (message.proofInit != null && message.hasOwnProperty("proofInit")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofInit); - if (error) - return "proofInit." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenTry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry - */ - MsgChannelOpenTry.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry(); - if (object.portId != null) - message.portId = String(object.portId); - if (object.channelId != null) - message.channelId = String(object.channelId); - if (object.channel != null) { - if (typeof object.channel !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.channel: object expected"); - message.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.fromObject(object.channel); - } - if (object.counterpartyVersion != null) - message.counterpartyVersion = String(object.counterpartyVersion); - if (object.proofInit != null) { - if (typeof object.proofInit !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.proofInit: object expected"); - message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofInit); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenTry message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} message MsgChannelOpenTry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenTry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.portId = ""; - object.channelId = ""; - object.channel = null; - object.counterpartyVersion = ""; - object.proofInit = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.portId != null && message.hasOwnProperty("portId")) - object.portId = message.portId; - if (message.channelId != null && message.hasOwnProperty("channelId")) - object.channelId = message.channelId; - if (message.channel != null && message.hasOwnProperty("channel")) - object.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.toObject(message.channel, options); - if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) - object.counterpartyVersion = message.counterpartyVersion; - if (message.proofInit != null && message.hasOwnProperty("proofInit")) - object.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofInit, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenTry to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenTry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgChannelOpenTry; @@ -23471,7 +11628,7 @@ $root.cosmos_sdk = (function() { * @property {string|null} [portId] MsgChannelOpenAck portId * @property {string|null} [channelId] MsgChannelOpenAck channelId * @property {string|null} [counterpartyVersion] MsgChannelOpenAck counterpartyVersion - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofTry] MsgChannelOpenAck proofTry + * @property {Uint8Array|null} [proofTry] MsgChannelOpenAck proofTry * @property {number|Long|null} [proofHeight] MsgChannelOpenAck proofHeight * @property {Uint8Array|null} [signer] MsgChannelOpenAck signer */ @@ -23482,13 +11639,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgChannelOpenAck. * @implements IMsgChannelOpenAck * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck=} [p] Properties to set */ - function MsgChannelOpenAck(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgChannelOpenAck(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]]; } /** @@ -23517,11 +11674,11 @@ $root.cosmos_sdk = (function() { /** * MsgChannelOpenAck proofTry. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofTry + * @member {Uint8Array} proofTry * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck * @instance */ - MsgChannelOpenAck.prototype.proofTry = null; + MsgChannelOpenAck.prototype.proofTry = $util.newBuffer([]); /** * MsgChannelOpenAck proofHeight. @@ -23556,39 +11713,26 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck} message MsgChannelOpenAck message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck} m MsgChannelOpenAck message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgChannelOpenAck.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); - if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); - if (message.counterpartyVersion != null && Object.hasOwnProperty.call(message, "counterpartyVersion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.counterpartyVersion); - if (message.proofTry != null && Object.hasOwnProperty.call(message, "proofTry")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofTry, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.proofHeight); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck} message MsgChannelOpenAck message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenAck.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgChannelOpenAck.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) + w.uint32(10).string(m.portId); + if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) + w.uint32(18).string(m.channelId); + if (m.counterpartyVersion != null && Object.hasOwnProperty.call(m, "counterpartyVersion")) + w.uint32(26).string(m.counterpartyVersion); + if (m.proofTry != null && Object.hasOwnProperty.call(m, "proofTry")) + w.uint32(34).bytes(m.proofTry); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(40).uint64(m.proofHeight); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(50).bytes(m.signer); + return w; }; /** @@ -23596,193 +11740,43 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgChannelOpenAck.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgChannelOpenAck.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.ibc.channel.v1.MsgChannelOpenAck(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.portId = reader.string(); + m.portId = r.string(); break; case 2: - message.channelId = reader.string(); + m.channelId = r.string(); break; case 3: - message.counterpartyVersion = reader.string(); + m.counterpartyVersion = r.string(); break; case 4: - message.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proofTry = r.bytes(); break; case 5: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 6: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgChannelOpenAck message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenAck.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenAck message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenAck.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.portId != null && message.hasOwnProperty("portId")) - if (!$util.isString(message.portId)) - return "portId: string expected"; - if (message.channelId != null && message.hasOwnProperty("channelId")) - if (!$util.isString(message.channelId)) - return "channelId: string expected"; - if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) - if (!$util.isString(message.counterpartyVersion)) - return "counterpartyVersion: string expected"; - if (message.proofTry != null && message.hasOwnProperty("proofTry")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofTry); - if (error) - return "proofTry." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenAck message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck - */ - MsgChannelOpenAck.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck(); - if (object.portId != null) - message.portId = String(object.portId); - if (object.channelId != null) - message.channelId = String(object.channelId); - if (object.counterpartyVersion != null) - message.counterpartyVersion = String(object.counterpartyVersion); - if (object.proofTry != null) { - if (typeof object.proofTry !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.proofTry: object expected"); - message.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofTry); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenAck message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} message MsgChannelOpenAck - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenAck.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.portId = ""; - object.channelId = ""; - object.counterpartyVersion = ""; - object.proofTry = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.portId != null && message.hasOwnProperty("portId")) - object.portId = message.portId; - if (message.channelId != null && message.hasOwnProperty("channelId")) - object.channelId = message.channelId; - if (message.counterpartyVersion != null && message.hasOwnProperty("counterpartyVersion")) - object.counterpartyVersion = message.counterpartyVersion; - if (message.proofTry != null && message.hasOwnProperty("proofTry")) - object.proofTry = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofTry, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenAck to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenAck.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgChannelOpenAck; @@ -23796,7 +11790,7 @@ $root.cosmos_sdk = (function() { * @interface IMsgChannelOpenConfirm * @property {string|null} [portId] MsgChannelOpenConfirm portId * @property {string|null} [channelId] MsgChannelOpenConfirm channelId - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofAck] MsgChannelOpenConfirm proofAck + * @property {Uint8Array|null} [proofAck] MsgChannelOpenConfirm proofAck * @property {number|Long|null} [proofHeight] MsgChannelOpenConfirm proofHeight * @property {Uint8Array|null} [signer] MsgChannelOpenConfirm signer */ @@ -23807,13 +11801,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgChannelOpenConfirm. * @implements IMsgChannelOpenConfirm * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm=} [p] Properties to set */ - function MsgChannelOpenConfirm(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgChannelOpenConfirm(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]]; } /** @@ -23834,11 +11828,11 @@ $root.cosmos_sdk = (function() { /** * MsgChannelOpenConfirm proofAck. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofAck + * @member {Uint8Array} proofAck * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm * @instance */ - MsgChannelOpenConfirm.prototype.proofAck = null; + MsgChannelOpenConfirm.prototype.proofAck = $util.newBuffer([]); /** * MsgChannelOpenConfirm proofHeight. @@ -23873,37 +11867,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm} message MsgChannelOpenConfirm message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm} m MsgChannelOpenConfirm message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgChannelOpenConfirm.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); - if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); - if (message.proofAck != null && Object.hasOwnProperty.call(message, "proofAck")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofAck, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.proofHeight); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm} message MsgChannelOpenConfirm message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenConfirm.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgChannelOpenConfirm.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) + w.uint32(10).string(m.portId); + if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) + w.uint32(18).string(m.channelId); + if (m.proofAck != null && Object.hasOwnProperty.call(m, "proofAck")) + w.uint32(26).bytes(m.proofAck); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(32).uint64(m.proofHeight); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(42).bytes(m.signer); + return w; }; /** @@ -23911,182 +11892,40 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgChannelOpenConfirm.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgChannelOpenConfirm.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.ibc.channel.v1.MsgChannelOpenConfirm(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.portId = reader.string(); + m.portId = r.string(); break; case 2: - message.channelId = reader.string(); + m.channelId = r.string(); break; case 3: - message.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proofAck = r.bytes(); break; case 4: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 5: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenConfirm.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelOpenConfirm message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelOpenConfirm.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.portId != null && message.hasOwnProperty("portId")) - if (!$util.isString(message.portId)) - return "portId: string expected"; - if (message.channelId != null && message.hasOwnProperty("channelId")) - if (!$util.isString(message.channelId)) - return "channelId: string expected"; - if (message.proofAck != null && message.hasOwnProperty("proofAck")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofAck); - if (error) - return "proofAck." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgChannelOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm - */ - MsgChannelOpenConfirm.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm(); - if (object.portId != null) - message.portId = String(object.portId); - if (object.channelId != null) - message.channelId = String(object.channelId); - if (object.proofAck != null) { - if (typeof object.proofAck !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.proofAck: object expected"); - message.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofAck); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgChannelOpenConfirm message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} message MsgChannelOpenConfirm - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelOpenConfirm.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.portId = ""; - object.channelId = ""; - object.proofAck = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.portId != null && message.hasOwnProperty("portId")) - object.portId = message.portId; - if (message.channelId != null && message.hasOwnProperty("channelId")) - object.channelId = message.channelId; - if (message.proofAck != null && message.hasOwnProperty("proofAck")) - object.proofAck = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofAck, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgChannelOpenConfirm to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @instance - * @returns {Object.} JSON object - */ - MsgChannelOpenConfirm.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgChannelOpenConfirm; @@ -24109,13 +11948,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgChannelCloseInit. * @implements IMsgChannelCloseInit * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit=} [p] Properties to set */ - function MsgChannelCloseInit(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgChannelCloseInit(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]]; } /** @@ -24159,33 +11998,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit} message MsgChannelCloseInit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit} m MsgChannelCloseInit message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgChannelCloseInit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); - if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit} message MsgChannelCloseInit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseInit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgChannelCloseInit.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) + w.uint32(10).string(m.portId); + if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) + w.uint32(18).string(m.channelId); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(26).bytes(m.signer); + return w; }; /** @@ -24193,141 +12019,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgChannelCloseInit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgChannelCloseInit.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.ibc.channel.v1.MsgChannelCloseInit(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.portId = reader.string(); + m.portId = r.string(); break; case 2: - message.channelId = reader.string(); + m.channelId = r.string(); break; case 3: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgChannelCloseInit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseInit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelCloseInit message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelCloseInit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.portId != null && message.hasOwnProperty("portId")) - if (!$util.isString(message.portId)) - return "portId: string expected"; - if (message.channelId != null && message.hasOwnProperty("channelId")) - if (!$util.isString(message.channelId)) - return "channelId: string expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseInit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit - */ - MsgChannelCloseInit.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit(); - if (object.portId != null) - message.portId = String(object.portId); - if (object.channelId != null) - message.channelId = String(object.channelId); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgChannelCloseInit message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} message MsgChannelCloseInit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelCloseInit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.portId = ""; - object.channelId = ""; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.portId != null && message.hasOwnProperty("portId")) - object.portId = message.portId; - if (message.channelId != null && message.hasOwnProperty("channelId")) - object.channelId = message.channelId; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgChannelCloseInit to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseInit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgChannelCloseInit; @@ -24341,7 +12060,7 @@ $root.cosmos_sdk = (function() { * @interface IMsgChannelCloseConfirm * @property {string|null} [portId] MsgChannelCloseConfirm portId * @property {string|null} [channelId] MsgChannelCloseConfirm channelId - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proofInit] MsgChannelCloseConfirm proofInit + * @property {Uint8Array|null} [proofInit] MsgChannelCloseConfirm proofInit * @property {number|Long|null} [proofHeight] MsgChannelCloseConfirm proofHeight * @property {Uint8Array|null} [signer] MsgChannelCloseConfirm signer */ @@ -24352,13 +12071,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgChannelCloseConfirm. * @implements IMsgChannelCloseConfirm * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm=} [p] Properties to set */ - function MsgChannelCloseConfirm(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgChannelCloseConfirm(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]]; } /** @@ -24379,11 +12098,11 @@ $root.cosmos_sdk = (function() { /** * MsgChannelCloseConfirm proofInit. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proofInit + * @member {Uint8Array} proofInit * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm * @instance */ - MsgChannelCloseConfirm.prototype.proofInit = null; + MsgChannelCloseConfirm.prototype.proofInit = $util.newBuffer([]); /** * MsgChannelCloseConfirm proofHeight. @@ -24418,37 +12137,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm} message MsgChannelCloseConfirm message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm} m MsgChannelCloseConfirm message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgChannelCloseConfirm.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); - if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); - if (message.proofInit != null && Object.hasOwnProperty.call(message, "proofInit")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proofInit, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.proofHeight); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm} message MsgChannelCloseConfirm message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseConfirm.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgChannelCloseConfirm.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) + w.uint32(10).string(m.portId); + if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) + w.uint32(18).string(m.channelId); + if (m.proofInit != null && Object.hasOwnProperty.call(m, "proofInit")) + w.uint32(26).bytes(m.proofInit); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(32).uint64(m.proofHeight); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(42).bytes(m.signer); + return w; }; /** @@ -24456,182 +12162,40 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgChannelCloseConfirm.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgChannelCloseConfirm.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.ibc.channel.v1.MsgChannelCloseConfirm(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.portId = reader.string(); + m.portId = r.string(); break; case 2: - message.channelId = reader.string(); + m.channelId = r.string(); break; case 3: - message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proofInit = r.bytes(); break; case 4: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 5: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseConfirm.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgChannelCloseConfirm message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgChannelCloseConfirm.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.portId != null && message.hasOwnProperty("portId")) - if (!$util.isString(message.portId)) - return "portId: string expected"; - if (message.channelId != null && message.hasOwnProperty("channelId")) - if (!$util.isString(message.channelId)) - return "channelId: string expected"; - if (message.proofInit != null && message.hasOwnProperty("proofInit")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proofInit); - if (error) - return "proofInit." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgChannelCloseConfirm message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm - */ - MsgChannelCloseConfirm.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm(); - if (object.portId != null) - message.portId = String(object.portId); - if (object.channelId != null) - message.channelId = String(object.channelId); - if (object.proofInit != null) { - if (typeof object.proofInit !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.proofInit: object expected"); - message.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proofInit); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgChannelCloseConfirm message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} message MsgChannelCloseConfirm - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgChannelCloseConfirm.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.portId = ""; - object.channelId = ""; - object.proofInit = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.portId != null && message.hasOwnProperty("portId")) - object.portId = message.portId; - if (message.channelId != null && message.hasOwnProperty("channelId")) - object.channelId = message.channelId; - if (message.proofInit != null && message.hasOwnProperty("proofInit")) - object.proofInit = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proofInit, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgChannelCloseConfirm to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @instance - * @returns {Object.} JSON object - */ - MsgChannelCloseConfirm.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgChannelCloseConfirm; @@ -24644,7 +12208,7 @@ $root.cosmos_sdk = (function() { * @memberof cosmos_sdk.x.ibc.channel.v1 * @interface IMsgPacket * @property {cosmos_sdk.x.ibc.channel.v1.IPacket|null} [packet] MsgPacket packet - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proof] MsgPacket proof + * @property {Uint8Array|null} [proof] MsgPacket proof * @property {number|Long|null} [proofHeight] MsgPacket proofHeight * @property {Uint8Array|null} [signer] MsgPacket signer */ @@ -24655,13 +12219,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgPacket. * @implements IMsgPacket * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket=} [p] Properties to set */ - function MsgPacket(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgPacket(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]]; } /** @@ -24674,11 +12238,11 @@ $root.cosmos_sdk = (function() { /** * MsgPacket proof. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proof + * @member {Uint8Array} proof * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket * @instance */ - MsgPacket.prototype.proof = null; + MsgPacket.prototype.proof = $util.newBuffer([]); /** * MsgPacket proofHeight. @@ -24713,35 +12277,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket} message MsgPacket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket} m MsgPacket message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgPacket.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) - $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.proofHeight); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgPacket message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket} message MsgPacket message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPacket.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgPacket.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.packet != null && Object.hasOwnProperty.call(m, "packet")) + $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(m.packet, w.uint32(10).fork()).ldelim(); + if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) + w.uint32(18).bytes(m.proof); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(24).uint64(m.proofHeight); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(34).bytes(m.signer); + return w; }; /** @@ -24749,176 +12300,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.MsgPacket} MsgPacket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgPacket.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgPacket(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgPacket.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.ibc.channel.v1.MsgPacket(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(reader, reader.uint32()); + m.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(r, r.uint32()); break; case 2: - message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proof = r.bytes(); break; case 3: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 4: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgPacket message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgPacket} MsgPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPacket.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgPacket message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgPacket.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet != null && message.hasOwnProperty("packet")) { - var error = $root.cosmos_sdk.x.ibc.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proof); - if (error) - return "proof." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgPacket message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgPacket} MsgPacket - */ - MsgPacket.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgPacket) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgPacket(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgPacket.packet: object expected"); - message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.fromObject(object.packet); - } - if (object.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgPacket.proof: object expected"); - message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proof); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgPacket message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.MsgPacket} message MsgPacket - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgPacket.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.packet = null; - object.proof = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.toObject(message.packet, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proof, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgPacket to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @instance - * @returns {Object.} JSON object - */ - MsgPacket.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgPacket; @@ -24931,7 +12343,7 @@ $root.cosmos_sdk = (function() { * @memberof cosmos_sdk.x.ibc.channel.v1 * @interface IMsgTimeout * @property {cosmos_sdk.x.ibc.channel.v1.IPacket|null} [packet] MsgTimeout packet - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proof] MsgTimeout proof + * @property {Uint8Array|null} [proof] MsgTimeout proof * @property {number|Long|null} [proofHeight] MsgTimeout proofHeight * @property {number|Long|null} [nextSequenceRecv] MsgTimeout nextSequenceRecv * @property {Uint8Array|null} [signer] MsgTimeout signer @@ -24943,13 +12355,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgTimeout. * @implements IMsgTimeout * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout=} [p] Properties to set */ - function MsgTimeout(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgTimeout(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]]; } /** @@ -24962,11 +12374,11 @@ $root.cosmos_sdk = (function() { /** * MsgTimeout proof. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proof + * @member {Uint8Array} proof * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout * @instance */ - MsgTimeout.prototype.proof = null; + MsgTimeout.prototype.proof = $util.newBuffer([]); /** * MsgTimeout proofHeight. @@ -25009,37 +12421,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout} message MsgTimeout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout} m MsgTimeout message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgTimeout.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) - $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proof, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.proofHeight); - if (message.nextSequenceRecv != null && Object.hasOwnProperty.call(message, "nextSequenceRecv")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.nextSequenceRecv); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout} message MsgTimeout message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeout.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgTimeout.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.packet != null && Object.hasOwnProperty.call(m, "packet")) + $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(m.packet, w.uint32(10).fork()).ldelim(); + if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) + w.uint32(18).bytes(m.proof); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(24).uint64(m.proofHeight); + if (m.nextSequenceRecv != null && Object.hasOwnProperty.call(m, "nextSequenceRecv")) + w.uint32(32).uint64(m.nextSequenceRecv); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(42).bytes(m.signer); + return w; }; /** @@ -25047,201 +12446,40 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} MsgTimeout * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgTimeout.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgTimeout(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgTimeout.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.ibc.channel.v1.MsgTimeout(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(reader, reader.uint32()); + m.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(r, r.uint32()); break; case 2: - message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proof = r.bytes(); break; case 3: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 4: - message.nextSequenceRecv = reader.uint64(); + m.nextSequenceRecv = r.uint64(); break; case 5: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgTimeout message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} MsgTimeout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeout.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgTimeout message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgTimeout.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet != null && message.hasOwnProperty("packet")) { - var error = $root.cosmos_sdk.x.ibc.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.proof != null && message.hasOwnProperty("proof")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proof); - if (error) - return "proof." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.nextSequenceRecv != null && message.hasOwnProperty("nextSequenceRecv")) - if (!$util.isInteger(message.nextSequenceRecv) && !(message.nextSequenceRecv && $util.isInteger(message.nextSequenceRecv.low) && $util.isInteger(message.nextSequenceRecv.high))) - return "nextSequenceRecv: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgTimeout message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} MsgTimeout - */ - MsgTimeout.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgTimeout) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgTimeout(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgTimeout.packet: object expected"); - message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.fromObject(object.packet); - } - if (object.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgTimeout.proof: object expected"); - message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proof); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.nextSequenceRecv != null) - if ($util.Long) - (message.nextSequenceRecv = $util.Long.fromValue(object.nextSequenceRecv)).unsigned = true; - else if (typeof object.nextSequenceRecv === "string") - message.nextSequenceRecv = parseInt(object.nextSequenceRecv, 10); - else if (typeof object.nextSequenceRecv === "number") - message.nextSequenceRecv = object.nextSequenceRecv; - else if (typeof object.nextSequenceRecv === "object") - message.nextSequenceRecv = new $util.LongBits(object.nextSequenceRecv.low >>> 0, object.nextSequenceRecv.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgTimeout message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} message MsgTimeout - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgTimeout.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.packet = null; - object.proof = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.nextSequenceRecv = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.nextSequenceRecv = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.toObject(message.packet, options); - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proof, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.nextSequenceRecv != null && message.hasOwnProperty("nextSequenceRecv")) - if (typeof message.nextSequenceRecv === "number") - object.nextSequenceRecv = options.longs === String ? String(message.nextSequenceRecv) : message.nextSequenceRecv; - else - object.nextSequenceRecv = options.longs === String ? $util.Long.prototype.toString.call(message.nextSequenceRecv) : options.longs === Number ? new $util.LongBits(message.nextSequenceRecv.low >>> 0, message.nextSequenceRecv.high >>> 0).toNumber(true) : message.nextSequenceRecv; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgTimeout to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @instance - * @returns {Object.} JSON object - */ - MsgTimeout.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgTimeout; @@ -25255,7 +12493,7 @@ $root.cosmos_sdk = (function() { * @interface IMsgAcknowledgement * @property {cosmos_sdk.x.ibc.channel.v1.IPacket|null} [packet] MsgAcknowledgement packet * @property {Uint8Array|null} [acknowledgement] MsgAcknowledgement acknowledgement - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null} [proof] MsgAcknowledgement proof + * @property {Uint8Array|null} [proof] MsgAcknowledgement proof * @property {number|Long|null} [proofHeight] MsgAcknowledgement proofHeight * @property {Uint8Array|null} [signer] MsgAcknowledgement signer */ @@ -25266,13 +12504,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgAcknowledgement. * @implements IMsgAcknowledgement * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement=} [p] Properties to set */ - function MsgAcknowledgement(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgAcknowledgement(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]]; } /** @@ -25293,11 +12531,11 @@ $root.cosmos_sdk = (function() { /** * MsgAcknowledgement proof. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof|null|undefined} proof + * @member {Uint8Array} proof * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement * @instance */ - MsgAcknowledgement.prototype.proof = null; + MsgAcknowledgement.prototype.proof = $util.newBuffer([]); /** * MsgAcknowledgement proofHeight. @@ -25332,37 +12570,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement} message MsgAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement} m MsgAcknowledgement message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgAcknowledgement.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.packet != null && Object.hasOwnProperty.call(message, "packet")) - $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(message.packet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.acknowledgement != null && Object.hasOwnProperty.call(message, "acknowledgement")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.acknowledgement); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.encode(message.proof, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.proofHeight != null && Object.hasOwnProperty.call(message, "proofHeight")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.proofHeight); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement} message MsgAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAcknowledgement.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgAcknowledgement.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.packet != null && Object.hasOwnProperty.call(m, "packet")) + $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(m.packet, w.uint32(10).fork()).ldelim(); + if (m.acknowledgement != null && Object.hasOwnProperty.call(m, "acknowledgement")) + w.uint32(18).bytes(m.acknowledgement); + if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) + w.uint32(26).bytes(m.proof); + if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) + w.uint32(32).uint64(m.proofHeight); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(42).bytes(m.signer); + return w; }; /** @@ -25370,196 +12595,40 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} MsgAcknowledgement * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgAcknowledgement.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgAcknowledgement.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.ibc.channel.v1.MsgAcknowledgement(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(reader, reader.uint32()); + m.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(r, r.uint32()); break; case 2: - message.acknowledgement = reader.bytes(); + m.acknowledgement = r.bytes(); break; case 3: - message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.decode(reader, reader.uint32()); + m.proof = r.bytes(); break; case 4: - message.proofHeight = reader.uint64(); + m.proofHeight = r.uint64(); break; case 5: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgAcknowledgement message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} MsgAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAcknowledgement.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgAcknowledgement message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgAcknowledgement.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.packet != null && message.hasOwnProperty("packet")) { - var error = $root.cosmos_sdk.x.ibc.channel.v1.Packet.verify(message.packet); - if (error) - return "packet." + error; - } - if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) - if (!(message.acknowledgement && typeof message.acknowledgement.length === "number" || $util.isString(message.acknowledgement))) - return "acknowledgement: buffer expected"; - if (message.proof != null && message.hasOwnProperty("proof")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify(message.proof); - if (error) - return "proof." + error; - } - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (!$util.isInteger(message.proofHeight) && !(message.proofHeight && $util.isInteger(message.proofHeight.low) && $util.isInteger(message.proofHeight.high))) - return "proofHeight: integer|Long expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} MsgAcknowledgement - */ - MsgAcknowledgement.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement(); - if (object.packet != null) { - if (typeof object.packet !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.packet: object expected"); - message.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.fromObject(object.packet); - } - if (object.acknowledgement != null) - if (typeof object.acknowledgement === "string") - $util.base64.decode(object.acknowledgement, message.acknowledgement = $util.newBuffer($util.base64.length(object.acknowledgement)), 0); - else if (object.acknowledgement.length) - message.acknowledgement = object.acknowledgement; - if (object.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.proof: object expected"); - message.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.fromObject(object.proof); - } - if (object.proofHeight != null) - if ($util.Long) - (message.proofHeight = $util.Long.fromValue(object.proofHeight)).unsigned = true; - else if (typeof object.proofHeight === "string") - message.proofHeight = parseInt(object.proofHeight, 10); - else if (typeof object.proofHeight === "number") - message.proofHeight = object.proofHeight; - else if (typeof object.proofHeight === "object") - message.proofHeight = new $util.LongBits(object.proofHeight.low >>> 0, object.proofHeight.high >>> 0).toNumber(true); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgAcknowledgement message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} message MsgAcknowledgement - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgAcknowledgement.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.packet = null; - if (options.bytes === String) - object.acknowledgement = ""; - else { - object.acknowledgement = []; - if (options.bytes !== Array) - object.acknowledgement = $util.newBuffer(object.acknowledgement); - } - object.proof = null; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.proofHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.proofHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - } - if (message.packet != null && message.hasOwnProperty("packet")) - object.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.toObject(message.packet, options); - if (message.acknowledgement != null && message.hasOwnProperty("acknowledgement")) - object.acknowledgement = options.bytes === String ? $util.base64.encode(message.acknowledgement, 0, message.acknowledgement.length) : options.bytes === Array ? Array.prototype.slice.call(message.acknowledgement) : message.acknowledgement; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof.toObject(message.proof, options); - if (message.proofHeight != null && message.hasOwnProperty("proofHeight")) - if (typeof message.proofHeight === "number") - object.proofHeight = options.longs === String ? String(message.proofHeight) : message.proofHeight; - else - object.proofHeight = options.longs === String ? $util.Long.prototype.toString.call(message.proofHeight) : options.longs === Number ? new $util.LongBits(message.proofHeight.low >>> 0, message.proofHeight.high >>> 0).toNumber(true) : message.proofHeight; - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgAcknowledgement to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @instance - * @returns {Object.} JSON object - */ - MsgAcknowledgement.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgAcknowledgement; @@ -25584,14 +12653,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Channel. * @implements IChannel * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IChannel=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IChannel=} [p] Properties to set */ - function Channel(properties) { + function Channel(p) { this.connectionHops = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -25651,38 +12720,26 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.Channel * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IChannel} message Channel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IChannel} m Channel message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Channel.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.ordering != null && Object.hasOwnProperty.call(message, "ordering")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.ordering); - if (message.counterparty != null && Object.hasOwnProperty.call(message, "counterparty")) - $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.encode(message.counterparty, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.connectionHops != null && message.connectionHops.length) - for (var i = 0; i < message.connectionHops.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.connectionHops[i]); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.version); - return writer; - }; - - /** - * Encodes the specified Channel message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IChannel} message Channel message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Channel.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Channel.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.state != null && Object.hasOwnProperty.call(m, "state")) + w.uint32(8).int32(m.state); + if (m.ordering != null && Object.hasOwnProperty.call(m, "ordering")) + w.uint32(16).int32(m.ordering); + if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) + $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.encode(m.counterparty, w.uint32(26).fork()).ldelim(); + if (m.connectionHops != null && m.connectionHops.length) { + for (var i = 0; i < m.connectionHops.length; ++i) + w.uint32(34).string(m.connectionHops[i]); + } + if (m.version != null && Object.hasOwnProperty.call(m, "version")) + w.uint32(42).string(m.version); + return w; }; /** @@ -25690,220 +12747,42 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.Channel * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.Channel} Channel * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Channel.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.Channel(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Channel.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.ibc.channel.v1.Channel(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.state = reader.int32(); + m.state = r.int32(); break; case 2: - message.ordering = reader.int32(); + m.ordering = r.int32(); break; case 3: - message.counterparty = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.decode(reader, reader.uint32()); + m.counterparty = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.decode(r, r.uint32()); break; case 4: - if (!(message.connectionHops && message.connectionHops.length)) - message.connectionHops = []; - message.connectionHops.push(reader.string()); + if (!(m.connectionHops && m.connectionHops.length)) + m.connectionHops = []; + m.connectionHops.push(r.string()); break; case 5: - message.version = reader.string(); + m.version = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Channel message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.Channel} Channel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Channel.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Channel message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Channel.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.ordering != null && message.hasOwnProperty("ordering")) - switch (message.ordering) { - default: - return "ordering: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.counterparty != null && message.hasOwnProperty("counterparty")) { - var error = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.verify(message.counterparty); - if (error) - return "counterparty." + error; - } - if (message.connectionHops != null && message.hasOwnProperty("connectionHops")) { - if (!Array.isArray(message.connectionHops)) - return "connectionHops: array expected"; - for (var i = 0; i < message.connectionHops.length; ++i) - if (!$util.isString(message.connectionHops[i])) - return "connectionHops: string[] expected"; - } - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - return null; - }; - - /** - * Creates a Channel message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.Channel} Channel - */ - Channel.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.Channel) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.Channel(); - switch (object.state) { - case "STATE_UNINITIALIZED_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "STATE_INIT": - case 1: - message.state = 1; - break; - case "STATE_TRYOPEN": - case 2: - message.state = 2; - break; - case "STATE_OPEN": - case 3: - message.state = 3; - break; - case "STATE_CLOSED": - case 4: - message.state = 4; - break; - } - switch (object.ordering) { - case "ORDER_NONE_UNSPECIFIED": - case 0: - message.ordering = 0; - break; - case "ORDER_UNORDERED": - case 1: - message.ordering = 1; - break; - case "ORDER_ORDERED": - case 2: - message.ordering = 2; - break; - } - if (object.counterparty != null) { - if (typeof object.counterparty !== "object") - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.Channel.counterparty: object expected"); - message.counterparty = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.fromObject(object.counterparty); - } - if (object.connectionHops) { - if (!Array.isArray(object.connectionHops)) - throw TypeError(".cosmos_sdk.x.ibc.channel.v1.Channel.connectionHops: array expected"); - message.connectionHops = []; - for (var i = 0; i < object.connectionHops.length; ++i) - message.connectionHops[i] = String(object.connectionHops[i]); - } - if (object.version != null) - message.version = String(object.version); - return message; - }; - - /** - * Creates a plain object from a Channel message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.Channel} message Channel - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Channel.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.connectionHops = []; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNINITIALIZED_UNSPECIFIED" : 0; - object.ordering = options.enums === String ? "ORDER_NONE_UNSPECIFIED" : 0; - object.counterparty = null; - object.version = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.cosmos_sdk.x.ibc.channel.v1.State[message.state] : message.state; - if (message.ordering != null && message.hasOwnProperty("ordering")) - object.ordering = options.enums === String ? $root.cosmos_sdk.x.ibc.channel.v1.Order[message.ordering] : message.ordering; - if (message.counterparty != null && message.hasOwnProperty("counterparty")) - object.counterparty = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.toObject(message.counterparty, options); - if (message.connectionHops && message.connectionHops.length) { - object.connectionHops = []; - for (var j = 0; j < message.connectionHops.length; ++j) - object.connectionHops[j] = message.connectionHops[j]; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - return object; - }; - - /** - * Converts this Channel to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @instance - * @returns {Object.} JSON object - */ - Channel.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Channel; @@ -25961,13 +12840,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Counterparty. * @implements ICounterparty * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty=} [p] Properties to set */ - function Counterparty(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Counterparty(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]]; } /** @@ -26003,31 +12882,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty * @static - * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty} message Counterparty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty} m Counterparty message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Counterparty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.portId != null && Object.hasOwnProperty.call(message, "portId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.portId); - if (message.channelId != null && Object.hasOwnProperty.call(message, "channelId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.channelId); - return writer; - }; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty} message Counterparty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Counterparty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Counterparty.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) + w.uint32(10).string(m.portId); + if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) + w.uint32(18).string(m.channelId); + return w; }; /** @@ -26035,121 +12901,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.Counterparty} Counterparty * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Counterparty.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.Counterparty(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Counterparty.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.ibc.channel.v1.Counterparty(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.portId = reader.string(); + m.portId = r.string(); break; case 2: - message.channelId = reader.string(); + m.channelId = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Counterparty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.Counterparty} Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Counterparty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Counterparty message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Counterparty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.portId != null && message.hasOwnProperty("portId")) - if (!$util.isString(message.portId)) - return "portId: string expected"; - if (message.channelId != null && message.hasOwnProperty("channelId")) - if (!$util.isString(message.channelId)) - return "channelId: string expected"; - return null; - }; - - /** - * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.Counterparty} Counterparty - */ - Counterparty.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.Counterparty) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.Counterparty(); - if (object.portId != null) - message.portId = String(object.portId); - if (object.channelId != null) - message.channelId = String(object.channelId); - return message; - }; - - /** - * Creates a plain object from a Counterparty message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.Counterparty} message Counterparty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Counterparty.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.portId = ""; - object.channelId = ""; - } - if (message.portId != null && message.hasOwnProperty("portId")) - object.portId = message.portId; - if (message.channelId != null && message.hasOwnProperty("channelId")) - object.channelId = message.channelId; - return object; - }; - - /** - * Converts this Counterparty to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @instance - * @returns {Object.} JSON object - */ - Counterparty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Counterparty; @@ -26177,13 +12953,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Packet. * @implements IPacket * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IPacket=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.channel.v1.IPacket=} [p] Properties to set */ - function Packet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Packet(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]]; } /** @@ -26267,43 +13043,30 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.channel.v1.Packet * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IPacket} message Packet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.channel.v1.IPacket} m Packet message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Packet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.sequence != null && Object.hasOwnProperty.call(message, "sequence")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.sequence); - if (message.sourcePort != null && Object.hasOwnProperty.call(message, "sourcePort")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourcePort); - if (message.sourceChannel != null && Object.hasOwnProperty.call(message, "sourceChannel")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sourceChannel); - if (message.destinationPort != null && Object.hasOwnProperty.call(message, "destinationPort")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.destinationPort); - if (message.destinationChannel != null && Object.hasOwnProperty.call(message, "destinationChannel")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.destinationChannel); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.data); - if (message.timeoutHeight != null && Object.hasOwnProperty.call(message, "timeoutHeight")) - writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.timeoutHeight); - if (message.timeoutTimestamp != null && Object.hasOwnProperty.call(message, "timeoutTimestamp")) - writer.uint32(/* id 8, wireType 0 =*/64).uint64(message.timeoutTimestamp); - return writer; - }; - - /** - * Encodes the specified Packet message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IPacket} message Packet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Packet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Packet.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence")) + w.uint32(8).uint64(m.sequence); + if (m.sourcePort != null && Object.hasOwnProperty.call(m, "sourcePort")) + w.uint32(18).string(m.sourcePort); + if (m.sourceChannel != null && Object.hasOwnProperty.call(m, "sourceChannel")) + w.uint32(26).string(m.sourceChannel); + if (m.destinationPort != null && Object.hasOwnProperty.call(m, "destinationPort")) + w.uint32(34).string(m.destinationPort); + if (m.destinationChannel != null && Object.hasOwnProperty.call(m, "destinationChannel")) + w.uint32(42).string(m.destinationChannel); + if (m.data != null && Object.hasOwnProperty.call(m, "data")) + w.uint32(50).bytes(m.data); + if (m.timeoutHeight != null && Object.hasOwnProperty.call(m, "timeoutHeight")) + w.uint32(56).uint64(m.timeoutHeight); + if (m.timeoutTimestamp != null && Object.hasOwnProperty.call(m, "timeoutTimestamp")) + w.uint32(64).uint64(m.timeoutTimestamp); + return w; }; /** @@ -26311,238 +13074,49 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.channel.v1.Packet * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.channel.v1.Packet} Packet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Packet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.channel.v1.Packet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Packet.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.ibc.channel.v1.Packet(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.sequence = reader.uint64(); + m.sequence = r.uint64(); break; case 2: - message.sourcePort = reader.string(); + m.sourcePort = r.string(); break; case 3: - message.sourceChannel = reader.string(); + m.sourceChannel = r.string(); break; case 4: - message.destinationPort = reader.string(); + m.destinationPort = r.string(); break; case 5: - message.destinationChannel = reader.string(); + m.destinationChannel = r.string(); break; case 6: - message.data = reader.bytes(); + m.data = r.bytes(); break; case 7: - message.timeoutHeight = reader.uint64(); + m.timeoutHeight = r.uint64(); break; case 8: - message.timeoutTimestamp = reader.uint64(); + m.timeoutTimestamp = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Packet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.channel.v1.Packet} Packet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Packet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Packet message. - * @function verify - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Packet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (!$util.isInteger(message.sequence) && !(message.sequence && $util.isInteger(message.sequence.low) && $util.isInteger(message.sequence.high))) - return "sequence: integer|Long expected"; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - if (!$util.isString(message.sourcePort)) - return "sourcePort: string expected"; - if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) - if (!$util.isString(message.sourceChannel)) - return "sourceChannel: string expected"; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - if (!$util.isString(message.destinationPort)) - return "destinationPort: string expected"; - if (message.destinationChannel != null && message.hasOwnProperty("destinationChannel")) - if (!$util.isString(message.destinationChannel)) - return "destinationChannel: string expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) - if (!$util.isInteger(message.timeoutHeight) && !(message.timeoutHeight && $util.isInteger(message.timeoutHeight.low) && $util.isInteger(message.timeoutHeight.high))) - return "timeoutHeight: integer|Long expected"; - if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) - if (!$util.isInteger(message.timeoutTimestamp) && !(message.timeoutTimestamp && $util.isInteger(message.timeoutTimestamp.low) && $util.isInteger(message.timeoutTimestamp.high))) - return "timeoutTimestamp: integer|Long expected"; - return null; - }; - - /** - * Creates a Packet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.channel.v1.Packet} Packet - */ - Packet.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.channel.v1.Packet) - return object; - var message = new $root.cosmos_sdk.x.ibc.channel.v1.Packet(); - if (object.sequence != null) - if ($util.Long) - (message.sequence = $util.Long.fromValue(object.sequence)).unsigned = true; - else if (typeof object.sequence === "string") - message.sequence = parseInt(object.sequence, 10); - else if (typeof object.sequence === "number") - message.sequence = object.sequence; - else if (typeof object.sequence === "object") - message.sequence = new $util.LongBits(object.sequence.low >>> 0, object.sequence.high >>> 0).toNumber(true); - if (object.sourcePort != null) - message.sourcePort = String(object.sourcePort); - if (object.sourceChannel != null) - message.sourceChannel = String(object.sourceChannel); - if (object.destinationPort != null) - message.destinationPort = String(object.destinationPort); - if (object.destinationChannel != null) - message.destinationChannel = String(object.destinationChannel); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - if (object.timeoutHeight != null) - if ($util.Long) - (message.timeoutHeight = $util.Long.fromValue(object.timeoutHeight)).unsigned = true; - else if (typeof object.timeoutHeight === "string") - message.timeoutHeight = parseInt(object.timeoutHeight, 10); - else if (typeof object.timeoutHeight === "number") - message.timeoutHeight = object.timeoutHeight; - else if (typeof object.timeoutHeight === "object") - message.timeoutHeight = new $util.LongBits(object.timeoutHeight.low >>> 0, object.timeoutHeight.high >>> 0).toNumber(true); - if (object.timeoutTimestamp != null) - if ($util.Long) - (message.timeoutTimestamp = $util.Long.fromValue(object.timeoutTimestamp)).unsigned = true; - else if (typeof object.timeoutTimestamp === "string") - message.timeoutTimestamp = parseInt(object.timeoutTimestamp, 10); - else if (typeof object.timeoutTimestamp === "number") - message.timeoutTimestamp = object.timeoutTimestamp; - else if (typeof object.timeoutTimestamp === "object") - message.timeoutTimestamp = new $util.LongBits(object.timeoutTimestamp.low >>> 0, object.timeoutTimestamp.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Packet message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.Packet} message Packet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Packet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.sequence = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.sequence = options.longs === String ? "0" : 0; - object.sourcePort = ""; - object.sourceChannel = ""; - object.destinationPort = ""; - object.destinationChannel = ""; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timeoutHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeoutHeight = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.timeoutTimestamp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.timeoutTimestamp = options.longs === String ? "0" : 0; - } - if (message.sequence != null && message.hasOwnProperty("sequence")) - if (typeof message.sequence === "number") - object.sequence = options.longs === String ? String(message.sequence) : message.sequence; - else - object.sequence = options.longs === String ? $util.Long.prototype.toString.call(message.sequence) : options.longs === Number ? new $util.LongBits(message.sequence.low >>> 0, message.sequence.high >>> 0).toNumber(true) : message.sequence; - if (message.sourcePort != null && message.hasOwnProperty("sourcePort")) - object.sourcePort = message.sourcePort; - if (message.sourceChannel != null && message.hasOwnProperty("sourceChannel")) - object.sourceChannel = message.sourceChannel; - if (message.destinationPort != null && message.hasOwnProperty("destinationPort")) - object.destinationPort = message.destinationPort; - if (message.destinationChannel != null && message.hasOwnProperty("destinationChannel")) - object.destinationChannel = message.destinationChannel; - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.timeoutHeight != null && message.hasOwnProperty("timeoutHeight")) - if (typeof message.timeoutHeight === "number") - object.timeoutHeight = options.longs === String ? String(message.timeoutHeight) : message.timeoutHeight; - else - object.timeoutHeight = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutHeight) : options.longs === Number ? new $util.LongBits(message.timeoutHeight.low >>> 0, message.timeoutHeight.high >>> 0).toNumber(true) : message.timeoutHeight; - if (message.timeoutTimestamp != null && message.hasOwnProperty("timeoutTimestamp")) - if (typeof message.timeoutTimestamp === "number") - object.timeoutTimestamp = options.longs === String ? String(message.timeoutTimestamp) : message.timeoutTimestamp; - else - object.timeoutTimestamp = options.longs === String ? $util.Long.prototype.toString.call(message.timeoutTimestamp) : options.longs === Number ? new $util.LongBits(message.timeoutTimestamp.low >>> 0, message.timeoutTimestamp.high >>> 0).toNumber(true) : message.timeoutTimestamp; - return object; - }; - - /** - * Converts this Packet to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @instance - * @returns {Object.} JSON object - */ - Packet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Packet; @@ -26587,13 +13161,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MerkleRoot. * @implements IMerkleRoot * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot=} [p] Properties to set */ - function MerkleRoot(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MerkleRoot(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]]; } /** @@ -26621,29 +13195,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot} message MerkleRoot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot} m MerkleRoot message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MerkleRoot.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); - return writer; - }; - - /** - * Encodes the specified MerkleRoot message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot} message MerkleRoot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MerkleRoot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MerkleRoot.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); + return w; }; /** @@ -26651,118 +13212,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} MerkleRoot * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MerkleRoot.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerkleRoot(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MerkleRoot.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.ibc.commitment.v1.MerkleRoot(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.hash = reader.bytes(); + m.hash = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MerkleRoot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} MerkleRoot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MerkleRoot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MerkleRoot message. - * @function verify - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MerkleRoot.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) - return "hash: buffer expected"; - return null; - }; - - /** - * Creates a MerkleRoot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} MerkleRoot - */ - MerkleRoot.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.MerkleRoot) - return object; - var message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerkleRoot(); - if (object.hash != null) - if (typeof object.hash === "string") - $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); - else if (object.hash.length) - message.hash = object.hash; - return message; - }; - - /** - * Creates a plain object from a MerkleRoot message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} message MerkleRoot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MerkleRoot.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.hash = ""; - else { - object.hash = []; - if (options.bytes !== Array) - object.hash = $util.newBuffer(object.hash); - } - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; - return object; - }; - - /** - * Converts this MerkleRoot to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @instance - * @returns {Object.} JSON object - */ - MerkleRoot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MerkleRoot; @@ -26783,13 +13254,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MerklePrefix. * @implements IMerklePrefix * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix=} [p] Properties to set */ - function MerklePrefix(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MerklePrefix(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]]; } /** @@ -26817,29 +13288,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix} message MerklePrefix message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix} m MerklePrefix message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MerklePrefix.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyPrefix != null && Object.hasOwnProperty.call(message, "keyPrefix")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.keyPrefix); - return writer; - }; - - /** - * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix} message MerklePrefix message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MerklePrefix.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MerklePrefix.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.keyPrefix != null && Object.hasOwnProperty.call(m, "keyPrefix")) + w.uint32(10).bytes(m.keyPrefix); + return w; }; /** @@ -26847,118 +13305,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} MerklePrefix * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MerklePrefix.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MerklePrefix.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.ibc.commitment.v1.MerklePrefix(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.keyPrefix = reader.bytes(); + m.keyPrefix = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MerklePrefix message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} MerklePrefix - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MerklePrefix.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MerklePrefix message. - * @function verify - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MerklePrefix.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyPrefix != null && message.hasOwnProperty("keyPrefix")) - if (!(message.keyPrefix && typeof message.keyPrefix.length === "number" || $util.isString(message.keyPrefix))) - return "keyPrefix: buffer expected"; - return null; - }; - - /** - * Creates a MerklePrefix message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} MerklePrefix - */ - MerklePrefix.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix) - return object; - var message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix(); - if (object.keyPrefix != null) - if (typeof object.keyPrefix === "string") - $util.base64.decode(object.keyPrefix, message.keyPrefix = $util.newBuffer($util.base64.length(object.keyPrefix)), 0); - else if (object.keyPrefix.length) - message.keyPrefix = object.keyPrefix; - return message; - }; - - /** - * Creates a plain object from a MerklePrefix message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} message MerklePrefix - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MerklePrefix.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.keyPrefix = ""; - else { - object.keyPrefix = []; - if (options.bytes !== Array) - object.keyPrefix = $util.newBuffer(object.keyPrefix); - } - if (message.keyPrefix != null && message.hasOwnProperty("keyPrefix")) - object.keyPrefix = options.bytes === String ? $util.base64.encode(message.keyPrefix, 0, message.keyPrefix.length) : options.bytes === Array ? Array.prototype.slice.call(message.keyPrefix) : message.keyPrefix; - return object; - }; - - /** - * Converts this MerklePrefix to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @instance - * @returns {Object.} JSON object - */ - MerklePrefix.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MerklePrefix; @@ -26979,13 +13347,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MerklePath. * @implements IMerklePath * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath=} [p] Properties to set */ - function MerklePath(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MerklePath(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]]; } /** @@ -27013,29 +13381,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath} message MerklePath message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath} m MerklePath message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MerklePath.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keyPath != null && Object.hasOwnProperty.call(message, "keyPath")) - $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.encode(message.keyPath, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath} message MerklePath message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MerklePath.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MerklePath.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.keyPath != null && Object.hasOwnProperty.call(m, "keyPath")) + $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.encode(m.keyPath, w.uint32(10).fork()).ldelim(); + return w; }; /** @@ -27043,114 +13398,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePath} MerklePath * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MerklePath.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerklePath(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MerklePath.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.ibc.commitment.v1.MerklePath(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.keyPath = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.decode(reader, reader.uint32()); + m.keyPath = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MerklePath message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePath} MerklePath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MerklePath.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MerklePath message. - * @function verify - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MerklePath.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keyPath != null && message.hasOwnProperty("keyPath")) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify(message.keyPath); - if (error) - return "keyPath." + error; - } - return null; - }; - - /** - * Creates a MerklePath message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePath} MerklePath - */ - MerklePath.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.MerklePath) - return object; - var message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerklePath(); - if (object.keyPath != null) { - if (typeof object.keyPath !== "object") - throw TypeError(".cosmos_sdk.x.ibc.commitment.v1.MerklePath.keyPath: object expected"); - message.keyPath = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.fromObject(object.keyPath); - } - return message; - }; - - /** - * Creates a plain object from a MerklePath message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.MerklePath} message MerklePath - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MerklePath.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.keyPath = null; - if (message.keyPath != null && message.hasOwnProperty("keyPath")) - object.keyPath = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.toObject(message.keyPath, options); - return object; - }; - - /** - * Converts this MerklePath to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @instance - * @returns {Object.} JSON object - */ - MerklePath.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MerklePath; @@ -27171,13 +13440,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MerkleProof. * @implements IMerkleProof * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof=} [p] Properties to set */ - function MerkleProof(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MerkleProof(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]]; } /** @@ -27205,29 +13474,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof} message MerkleProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof} m MerkleProof message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MerkleProof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.merkle.Proof.encode(message.proof, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof} message MerkleProof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MerkleProof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MerkleProof.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) + $root.tendermint.crypto.merkle.Proof.encode(m.proof, w.uint32(10).fork()).ldelim(); + return w; }; /** @@ -27235,114 +13491,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} MerkleProof * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MerkleProof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MerkleProof.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.ibc.commitment.v1.MerkleProof(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.proof = $root.tendermint.crypto.merkle.Proof.decode(reader, reader.uint32()); + m.proof = $root.tendermint.crypto.merkle.Proof.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MerkleProof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} MerkleProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MerkleProof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MerkleProof message. - * @function verify - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MerkleProof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.proof != null && message.hasOwnProperty("proof")) { - var error = $root.tendermint.crypto.merkle.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - return null; - }; - - /** - * Creates a MerkleProof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} MerkleProof - */ - MerkleProof.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof) - return object; - var message = new $root.cosmos_sdk.x.ibc.commitment.v1.MerkleProof(); - if (object.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".cosmos_sdk.x.ibc.commitment.v1.MerkleProof.proof: object expected"); - message.proof = $root.tendermint.crypto.merkle.Proof.fromObject(object.proof); - } - return message; - }; - - /** - * Creates a plain object from a MerkleProof message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} message MerkleProof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MerkleProof.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.proof = null; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.merkle.Proof.toObject(message.proof, options); - return object; - }; - - /** - * Converts this MerkleProof to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @instance - * @returns {Object.} JSON object - */ - MerkleProof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MerkleProof; @@ -27363,14 +13533,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a KeyPath. * @implements IKeyPath * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath=} [p] Properties to set */ - function KeyPath(properties) { + function KeyPath(p) { this.keys = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -27398,30 +13568,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath} message KeyPath message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath} m KeyPath message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyPath.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keys != null && message.keys.length) - for (var i = 0; i < message.keys.length; ++i) - $root.cosmos_sdk.x.ibc.commitment.v1.Key.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified KeyPath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath} message KeyPath message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyPath.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + KeyPath.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.keys != null && m.keys.length) { + for (var i = 0; i < m.keys.length; ++i) + $root.cosmos_sdk.x.ibc.commitment.v1.Key.encode(m.keys[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -27429,128 +13587,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.commitment.v1.KeyPath} KeyPath * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyPath.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + KeyPath.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.ibc.commitment.v1.KeyPath(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.cosmos_sdk.x.ibc.commitment.v1.Key.decode(reader, reader.uint32())); + if (!(m.keys && m.keys.length)) + m.keys = []; + m.keys.push($root.cosmos_sdk.x.ibc.commitment.v1.Key.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a KeyPath message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.commitment.v1.KeyPath} KeyPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyPath.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KeyPath message. - * @function verify - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KeyPath.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) - return "keys: array expected"; - for (var i = 0; i < message.keys.length; ++i) { - var error = $root.cosmos_sdk.x.ibc.commitment.v1.Key.verify(message.keys[i]); - if (error) - return "keys." + error; - } - } - return null; - }; - - /** - * Creates a KeyPath message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.commitment.v1.KeyPath} KeyPath - */ - KeyPath.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath) - return object; - var message = new $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath(); - if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".cosmos_sdk.x.ibc.commitment.v1.KeyPath.keys: array expected"); - message.keys = []; - for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".cosmos_sdk.x.ibc.commitment.v1.KeyPath.keys: object expected"); - message.keys[i] = $root.cosmos_sdk.x.ibc.commitment.v1.Key.fromObject(object.keys[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a KeyPath message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.KeyPath} message KeyPath - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KeyPath.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.keys = []; - if (message.keys && message.keys.length) { - object.keys = []; - for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.cosmos_sdk.x.ibc.commitment.v1.Key.toObject(message.keys[j], options); - } - return object; - }; - - /** - * Converts this KeyPath to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @instance - * @returns {Object.} JSON object - */ - KeyPath.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return KeyPath; @@ -27572,13 +13632,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Key. * @implements IKey * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IKey=} [properties] Properties to set + * @param {cosmos_sdk.x.ibc.commitment.v1.IKey=} [p] Properties to set */ - function Key(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Key(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]]; } /** @@ -27614,31 +13674,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.ibc.commitment.v1.Key * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IKey} message Key message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.ibc.commitment.v1.IKey} m Key message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Key.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.name); - if (message.enc != null && Object.hasOwnProperty.call(message, "enc")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enc); - return writer; - }; - - /** - * Encodes the specified Key message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IKey} message Key message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Key.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Key.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.name != null && Object.hasOwnProperty.call(m, "name")) + w.uint32(10).bytes(m.name); + if (m.enc != null && Object.hasOwnProperty.call(m, "enc")) + w.uint32(16).int32(m.enc); + return w; }; /** @@ -27646,143 +13693,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.ibc.commitment.v1.Key * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.ibc.commitment.v1.Key} Key * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Key.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.ibc.commitment.v1.Key(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Key.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.ibc.commitment.v1.Key(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.name = reader.bytes(); + m.name = r.bytes(); break; case 2: - message.enc = reader.int32(); + m.enc = r.int32(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Key message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.ibc.commitment.v1.Key} Key - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Key.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Key message. - * @function verify - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Key.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!(message.name && typeof message.name.length === "number" || $util.isString(message.name))) - return "name: buffer expected"; - if (message.enc != null && message.hasOwnProperty("enc")) - switch (message.enc) { - default: - return "enc: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a Key message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.ibc.commitment.v1.Key} Key - */ - Key.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.ibc.commitment.v1.Key) - return object; - var message = new $root.cosmos_sdk.x.ibc.commitment.v1.Key(); - if (object.name != null) - if (typeof object.name === "string") - $util.base64.decode(object.name, message.name = $util.newBuffer($util.base64.length(object.name)), 0); - else if (object.name.length) - message.name = object.name; - switch (object.enc) { - case "KEY_ENCODING_URL_UNSPECIFIED": - case 0: - message.enc = 0; - break; - case "KEY_ENCODING_HEX": - case 1: - message.enc = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a Key message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.Key} message Key - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Key.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.name = ""; - else { - object.name = []; - if (options.bytes !== Array) - object.name = $util.newBuffer(object.name); - } - object.enc = options.enums === String ? "KEY_ENCODING_URL_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = options.bytes === String ? $util.base64.encode(message.name, 0, message.name.length) : options.bytes === Array ? Array.prototype.slice.call(message.name) : message.name; - if (message.enc != null && message.hasOwnProperty("enc")) - object.enc = options.enums === String ? $root.cosmos_sdk.x.ibc.commitment.v1.KeyEncoding[message.enc] : message.enc; - return object; - }; - - /** - * Converts this Key to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @instance - * @returns {Object.} JSON object - */ - Key.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Key; @@ -27845,13 +13780,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Minter. * @implements IMinter * @constructor - * @param {cosmos_sdk.x.mint.v1.IMinter=} [properties] Properties to set + * @param {cosmos_sdk.x.mint.v1.IMinter=} [p] Properties to set */ - function Minter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Minter(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]]; } /** @@ -27887,31 +13822,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.mint.v1.Minter * @static - * @param {cosmos_sdk.x.mint.v1.IMinter} message Minter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.mint.v1.IMinter} m Minter message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Minter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inflation != null && Object.hasOwnProperty.call(message, "inflation")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inflation); - if (message.annualProvisions != null && Object.hasOwnProperty.call(message, "annualProvisions")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.annualProvisions); - return writer; - }; - - /** - * Encodes the specified Minter message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.mint.v1.Minter - * @static - * @param {cosmos_sdk.x.mint.v1.IMinter} message Minter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Minter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Minter.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.inflation != null && Object.hasOwnProperty.call(m, "inflation")) + w.uint32(10).string(m.inflation); + if (m.annualProvisions != null && Object.hasOwnProperty.call(m, "annualProvisions")) + w.uint32(18).string(m.annualProvisions); + return w; }; /** @@ -27919,121 +13841,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.mint.v1.Minter * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.mint.v1.Minter} Minter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Minter.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.mint.v1.Minter(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Minter.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.mint.v1.Minter(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.inflation = reader.string(); + m.inflation = r.string(); break; case 2: - message.annualProvisions = reader.string(); + m.annualProvisions = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Minter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.mint.v1.Minter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.mint.v1.Minter} Minter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Minter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Minter message. - * @function verify - * @memberof cosmos_sdk.x.mint.v1.Minter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Minter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inflation != null && message.hasOwnProperty("inflation")) - if (!$util.isString(message.inflation)) - return "inflation: string expected"; - if (message.annualProvisions != null && message.hasOwnProperty("annualProvisions")) - if (!$util.isString(message.annualProvisions)) - return "annualProvisions: string expected"; - return null; - }; - - /** - * Creates a Minter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.mint.v1.Minter - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.mint.v1.Minter} Minter - */ - Minter.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.mint.v1.Minter) - return object; - var message = new $root.cosmos_sdk.x.mint.v1.Minter(); - if (object.inflation != null) - message.inflation = String(object.inflation); - if (object.annualProvisions != null) - message.annualProvisions = String(object.annualProvisions); - return message; - }; - - /** - * Creates a plain object from a Minter message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.mint.v1.Minter - * @static - * @param {cosmos_sdk.x.mint.v1.Minter} message Minter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Minter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.inflation = ""; - object.annualProvisions = ""; - } - if (message.inflation != null && message.hasOwnProperty("inflation")) - object.inflation = message.inflation; - if (message.annualProvisions != null && message.hasOwnProperty("annualProvisions")) - object.annualProvisions = message.annualProvisions; - return object; - }; - - /** - * Converts this Minter to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.mint.v1.Minter - * @instance - * @returns {Object.} JSON object - */ - Minter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Minter; @@ -28059,13 +13891,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Params. * @implements IParams * @constructor - * @param {cosmos_sdk.x.mint.v1.IParams=} [properties] Properties to set + * @param {cosmos_sdk.x.mint.v1.IParams=} [p] Properties to set */ - function Params(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Params(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]]; } /** @@ -28133,39 +13965,26 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.mint.v1.Params * @static - * @param {cosmos_sdk.x.mint.v1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.mint.v1.IParams} m Params message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.mintDenom != null && Object.hasOwnProperty.call(message, "mintDenom")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.mintDenom); - if (message.inflationRateChange != null && Object.hasOwnProperty.call(message, "inflationRateChange")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inflationRateChange); - if (message.inflationMax != null && Object.hasOwnProperty.call(message, "inflationMax")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.inflationMax); - if (message.inflationMin != null && Object.hasOwnProperty.call(message, "inflationMin")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.inflationMin); - if (message.goalBonded != null && Object.hasOwnProperty.call(message, "goalBonded")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.goalBonded); - if (message.blocksPerYear != null && Object.hasOwnProperty.call(message, "blocksPerYear")) - writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.blocksPerYear); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.mint.v1.Params - * @static - * @param {cosmos_sdk.x.mint.v1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Params.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.mintDenom != null && Object.hasOwnProperty.call(m, "mintDenom")) + w.uint32(10).string(m.mintDenom); + if (m.inflationRateChange != null && Object.hasOwnProperty.call(m, "inflationRateChange")) + w.uint32(18).string(m.inflationRateChange); + if (m.inflationMax != null && Object.hasOwnProperty.call(m, "inflationMax")) + w.uint32(26).string(m.inflationMax); + if (m.inflationMin != null && Object.hasOwnProperty.call(m, "inflationMin")) + w.uint32(34).string(m.inflationMin); + if (m.goalBonded != null && Object.hasOwnProperty.call(m, "goalBonded")) + w.uint32(42).string(m.goalBonded); + if (m.blocksPerYear != null && Object.hasOwnProperty.call(m, "blocksPerYear")) + w.uint32(48).uint64(m.blocksPerYear); + return w; }; /** @@ -28173,179 +13992,43 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.mint.v1.Params * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.mint.v1.Params} Params * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.mint.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Params.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.cosmos_sdk.x.mint.v1.Params(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.mintDenom = reader.string(); + m.mintDenom = r.string(); break; case 2: - message.inflationRateChange = reader.string(); + m.inflationRateChange = r.string(); break; case 3: - message.inflationMax = reader.string(); + m.inflationMax = r.string(); break; case 4: - message.inflationMin = reader.string(); + m.inflationMin = r.string(); break; case 5: - message.goalBonded = reader.string(); + m.goalBonded = r.string(); break; case 6: - message.blocksPerYear = reader.uint64(); + m.blocksPerYear = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.mint.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.mint.v1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof cosmos_sdk.x.mint.v1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.mintDenom != null && message.hasOwnProperty("mintDenom")) - if (!$util.isString(message.mintDenom)) - return "mintDenom: string expected"; - if (message.inflationRateChange != null && message.hasOwnProperty("inflationRateChange")) - if (!$util.isString(message.inflationRateChange)) - return "inflationRateChange: string expected"; - if (message.inflationMax != null && message.hasOwnProperty("inflationMax")) - if (!$util.isString(message.inflationMax)) - return "inflationMax: string expected"; - if (message.inflationMin != null && message.hasOwnProperty("inflationMin")) - if (!$util.isString(message.inflationMin)) - return "inflationMin: string expected"; - if (message.goalBonded != null && message.hasOwnProperty("goalBonded")) - if (!$util.isString(message.goalBonded)) - return "goalBonded: string expected"; - if (message.blocksPerYear != null && message.hasOwnProperty("blocksPerYear")) - if (!$util.isInteger(message.blocksPerYear) && !(message.blocksPerYear && $util.isInteger(message.blocksPerYear.low) && $util.isInteger(message.blocksPerYear.high))) - return "blocksPerYear: integer|Long expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.mint.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.mint.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.mint.v1.Params) - return object; - var message = new $root.cosmos_sdk.x.mint.v1.Params(); - if (object.mintDenom != null) - message.mintDenom = String(object.mintDenom); - if (object.inflationRateChange != null) - message.inflationRateChange = String(object.inflationRateChange); - if (object.inflationMax != null) - message.inflationMax = String(object.inflationMax); - if (object.inflationMin != null) - message.inflationMin = String(object.inflationMin); - if (object.goalBonded != null) - message.goalBonded = String(object.goalBonded); - if (object.blocksPerYear != null) - if ($util.Long) - (message.blocksPerYear = $util.Long.fromValue(object.blocksPerYear)).unsigned = true; - else if (typeof object.blocksPerYear === "string") - message.blocksPerYear = parseInt(object.blocksPerYear, 10); - else if (typeof object.blocksPerYear === "number") - message.blocksPerYear = object.blocksPerYear; - else if (typeof object.blocksPerYear === "object") - message.blocksPerYear = new $util.LongBits(object.blocksPerYear.low >>> 0, object.blocksPerYear.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.mint.v1.Params - * @static - * @param {cosmos_sdk.x.mint.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.mintDenom = ""; - object.inflationRateChange = ""; - object.inflationMax = ""; - object.inflationMin = ""; - object.goalBonded = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.blocksPerYear = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.blocksPerYear = options.longs === String ? "0" : 0; - } - if (message.mintDenom != null && message.hasOwnProperty("mintDenom")) - object.mintDenom = message.mintDenom; - if (message.inflationRateChange != null && message.hasOwnProperty("inflationRateChange")) - object.inflationRateChange = message.inflationRateChange; - if (message.inflationMax != null && message.hasOwnProperty("inflationMax")) - object.inflationMax = message.inflationMax; - if (message.inflationMin != null && message.hasOwnProperty("inflationMin")) - object.inflationMin = message.inflationMin; - if (message.goalBonded != null && message.hasOwnProperty("goalBonded")) - object.goalBonded = message.goalBonded; - if (message.blocksPerYear != null && message.hasOwnProperty("blocksPerYear")) - if (typeof message.blocksPerYear === "number") - object.blocksPerYear = options.longs === String ? String(message.blocksPerYear) : message.blocksPerYear; - else - object.blocksPerYear = options.longs === String ? $util.Long.prototype.toString.call(message.blocksPerYear) : options.longs === Number ? new $util.LongBits(message.blocksPerYear.low >>> 0, message.blocksPerYear.high >>> 0).toNumber(true) : message.blocksPerYear; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.mint.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Params; @@ -28392,14 +14075,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ParameterChangeProposal. * @implements IParameterChangeProposal * @constructor - * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal=} [properties] Properties to set + * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal=} [p] Properties to set */ - function ParameterChangeProposal(properties) { + function ParameterChangeProposal(p) { this.changes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -28443,34 +14126,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal * @static - * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal} message ParameterChangeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal} m ParameterChangeProposal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ParameterChangeProposal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.changes != null && message.changes.length) - for (var i = 0; i < message.changes.length; ++i) - $root.cosmos_sdk.x.params.v1.ParamChange.encode(message.changes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ParameterChangeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @static - * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal} message ParameterChangeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterChangeProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ParameterChangeProposal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.title != null && Object.hasOwnProperty.call(m, "title")) + w.uint32(10).string(m.title); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + w.uint32(18).string(m.description); + if (m.changes != null && m.changes.length) { + for (var i = 0; i < m.changes.length; ++i) + $root.cosmos_sdk.x.params.v1.ParamChange.encode(m.changes[i], w.uint32(26).fork()).ldelim(); + } + return w; }; /** @@ -28478,152 +14149,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.params.v1.ParameterChangeProposal} ParameterChangeProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ParameterChangeProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.params.v1.ParameterChangeProposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ParameterChangeProposal.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.params.v1.ParameterChangeProposal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.title = reader.string(); + m.title = r.string(); break; case 2: - message.description = reader.string(); + m.description = r.string(); break; case 3: - if (!(message.changes && message.changes.length)) - message.changes = []; - message.changes.push($root.cosmos_sdk.x.params.v1.ParamChange.decode(reader, reader.uint32())); + if (!(m.changes && m.changes.length)) + m.changes = []; + m.changes.push($root.cosmos_sdk.x.params.v1.ParamChange.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ParameterChangeProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.params.v1.ParameterChangeProposal} ParameterChangeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterChangeProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParameterChangeProposal message. - * @function verify - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParameterChangeProposal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.changes != null && message.hasOwnProperty("changes")) { - if (!Array.isArray(message.changes)) - return "changes: array expected"; - for (var i = 0; i < message.changes.length; ++i) { - var error = $root.cosmos_sdk.x.params.v1.ParamChange.verify(message.changes[i]); - if (error) - return "changes." + error; - } - } - return null; - }; - - /** - * Creates a ParameterChangeProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.params.v1.ParameterChangeProposal} ParameterChangeProposal - */ - ParameterChangeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.params.v1.ParameterChangeProposal) - return object; - var message = new $root.cosmos_sdk.x.params.v1.ParameterChangeProposal(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.changes) { - if (!Array.isArray(object.changes)) - throw TypeError(".cosmos_sdk.x.params.v1.ParameterChangeProposal.changes: array expected"); - message.changes = []; - for (var i = 0; i < object.changes.length; ++i) { - if (typeof object.changes[i] !== "object") - throw TypeError(".cosmos_sdk.x.params.v1.ParameterChangeProposal.changes: object expected"); - message.changes[i] = $root.cosmos_sdk.x.params.v1.ParamChange.fromObject(object.changes[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ParameterChangeProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @static - * @param {cosmos_sdk.x.params.v1.ParameterChangeProposal} message ParameterChangeProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParameterChangeProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.changes = []; - if (options.defaults) { - object.title = ""; - object.description = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.changes && message.changes.length) { - object.changes = []; - for (var j = 0; j < message.changes.length; ++j) - object.changes[j] = $root.cosmos_sdk.x.params.v1.ParamChange.toObject(message.changes[j], options); - } - return object; - }; - - /** - * Converts this ParameterChangeProposal to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @instance - * @returns {Object.} JSON object - */ - ParameterChangeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ParameterChangeProposal; @@ -28646,13 +14201,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ParamChange. * @implements IParamChange * @constructor - * @param {cosmos_sdk.x.params.v1.IParamChange=} [properties] Properties to set + * @param {cosmos_sdk.x.params.v1.IParamChange=} [p] Properties to set */ - function ParamChange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function ParamChange(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]]; } /** @@ -28696,33 +14251,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.params.v1.ParamChange * @static - * @param {cosmos_sdk.x.params.v1.IParamChange} message ParamChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.params.v1.IParamChange} m ParamChange message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ParamChange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subspace != null && Object.hasOwnProperty.call(message, "subspace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subspace); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.value); - return writer; - }; - - /** - * Encodes the specified ParamChange message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @static - * @param {cosmos_sdk.x.params.v1.IParamChange} message ParamChange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParamChange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ParamChange.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.subspace != null && Object.hasOwnProperty.call(m, "subspace")) + w.uint32(10).string(m.subspace); + if (m.key != null && Object.hasOwnProperty.call(m, "key")) + w.uint32(18).string(m.key); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) + w.uint32(26).string(m.value); + return w; }; /** @@ -28730,132 +14272,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.params.v1.ParamChange * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.params.v1.ParamChange} ParamChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ParamChange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.params.v1.ParamChange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ParamChange.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.params.v1.ParamChange(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.subspace = reader.string(); + m.subspace = r.string(); break; case 2: - message.key = reader.string(); + m.key = r.string(); break; case 3: - message.value = reader.string(); + m.value = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ParamChange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.params.v1.ParamChange} ParamChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParamChange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ParamChange message. - * @function verify - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ParamChange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.subspace != null && message.hasOwnProperty("subspace")) - if (!$util.isString(message.subspace)) - return "subspace: string expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a ParamChange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.params.v1.ParamChange} ParamChange - */ - ParamChange.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.params.v1.ParamChange) - return object; - var message = new $root.cosmos_sdk.x.params.v1.ParamChange(); - if (object.subspace != null) - message.subspace = String(object.subspace); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a ParamChange message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @static - * @param {cosmos_sdk.x.params.v1.ParamChange} message ParamChange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ParamChange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.subspace = ""; - object.key = ""; - object.value = ""; - } - if (message.subspace != null && message.hasOwnProperty("subspace")) - object.subspace = message.subspace; - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this ParamChange to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @instance - * @returns {Object.} JSON object - */ - ParamChange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ParamChange; @@ -28900,13 +14344,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgUnjail. * @implements IMsgUnjail * @constructor - * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail=} [properties] Properties to set + * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail=} [p] Properties to set */ - function MsgUnjail(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgUnjail(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]]; } /** @@ -28934,29 +14378,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail * @static - * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail} message MsgUnjail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail} m MsgUnjail message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgUnjail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validatorAddr != null && Object.hasOwnProperty.call(message, "validatorAddr")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.validatorAddr); - return writer; - }; - - /** - * Encodes the specified MsgUnjail message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @static - * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail} message MsgUnjail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUnjail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgUnjail.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.validatorAddr != null && Object.hasOwnProperty.call(m, "validatorAddr")) + w.uint32(10).bytes(m.validatorAddr); + return w; }; /** @@ -28964,118 +14395,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.slashing.v1.MsgUnjail} MsgUnjail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgUnjail.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.slashing.v1.MsgUnjail(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgUnjail.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.slashing.v1.MsgUnjail(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.validatorAddr = reader.bytes(); + m.validatorAddr = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgUnjail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.slashing.v1.MsgUnjail} MsgUnjail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUnjail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUnjail message. - * @function verify - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUnjail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) - if (!(message.validatorAddr && typeof message.validatorAddr.length === "number" || $util.isString(message.validatorAddr))) - return "validatorAddr: buffer expected"; - return null; - }; - - /** - * Creates a MsgUnjail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.slashing.v1.MsgUnjail} MsgUnjail - */ - MsgUnjail.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.slashing.v1.MsgUnjail) - return object; - var message = new $root.cosmos_sdk.x.slashing.v1.MsgUnjail(); - if (object.validatorAddr != null) - if (typeof object.validatorAddr === "string") - $util.base64.decode(object.validatorAddr, message.validatorAddr = $util.newBuffer($util.base64.length(object.validatorAddr)), 0); - else if (object.validatorAddr.length) - message.validatorAddr = object.validatorAddr; - return message; - }; - - /** - * Creates a plain object from a MsgUnjail message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @static - * @param {cosmos_sdk.x.slashing.v1.MsgUnjail} message MsgUnjail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUnjail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.validatorAddr = ""; - else { - object.validatorAddr = []; - if (options.bytes !== Array) - object.validatorAddr = $util.newBuffer(object.validatorAddr); - } - if (message.validatorAddr != null && message.hasOwnProperty("validatorAddr")) - object.validatorAddr = options.bytes === String ? $util.base64.encode(message.validatorAddr, 0, message.validatorAddr.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddr) : message.validatorAddr; - return object; - }; - - /** - * Converts this MsgUnjail to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @instance - * @returns {Object.} JSON object - */ - MsgUnjail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgUnjail; @@ -29101,13 +14442,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a ValidatorSigningInfo. * @implements IValidatorSigningInfo * @constructor - * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo=} [properties] Properties to set + * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo=} [p] Properties to set */ - function ValidatorSigningInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function ValidatorSigningInfo(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]]; } /** @@ -29175,39 +14516,26 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo * @static - * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo} message ValidatorSigningInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo} m ValidatorSigningInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidatorSigningInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); - if (message.startHeight != null && Object.hasOwnProperty.call(message, "startHeight")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.startHeight); - if (message.indexOffset != null && Object.hasOwnProperty.call(message, "indexOffset")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.indexOffset); - if (message.jailedUntil != null && Object.hasOwnProperty.call(message, "jailedUntil")) - $root.google.protobuf.Timestamp.encode(message.jailedUntil, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.tombstoned != null && Object.hasOwnProperty.call(message, "tombstoned")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.tombstoned); - if (message.missedBlocksCounter != null && Object.hasOwnProperty.call(message, "missedBlocksCounter")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.missedBlocksCounter); - return writer; - }; - - /** - * Encodes the specified ValidatorSigningInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @static - * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo} message ValidatorSigningInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSigningInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ValidatorSigningInfo.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.startHeight != null && Object.hasOwnProperty.call(m, "startHeight")) + w.uint32(16).int64(m.startHeight); + if (m.indexOffset != null && Object.hasOwnProperty.call(m, "indexOffset")) + w.uint32(24).int64(m.indexOffset); + if (m.jailedUntil != null && Object.hasOwnProperty.call(m, "jailedUntil")) + $root.google.protobuf.Timestamp.encode(m.jailedUntil, w.uint32(34).fork()).ldelim(); + if (m.tombstoned != null && Object.hasOwnProperty.call(m, "tombstoned")) + w.uint32(40).bool(m.tombstoned); + if (m.missedBlocksCounter != null && Object.hasOwnProperty.call(m, "missedBlocksCounter")) + w.uint32(48).int64(m.missedBlocksCounter); + return w; }; /** @@ -29215,221 +14543,43 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} ValidatorSigningInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidatorSigningInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.slashing.v1.ValidatorSigningInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + ValidatorSigningInfo.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.slashing.v1.ValidatorSigningInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.address = reader.bytes(); + m.address = r.bytes(); break; case 2: - message.startHeight = reader.int64(); + m.startHeight = r.int64(); break; case 3: - message.indexOffset = reader.int64(); + m.indexOffset = r.int64(); break; case 4: - message.jailedUntil = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.jailedUntil = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 5: - message.tombstoned = reader.bool(); + m.tombstoned = r.bool(); break; case 6: - message.missedBlocksCounter = reader.int64(); + m.missedBlocksCounter = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValidatorSigningInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} ValidatorSigningInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSigningInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorSigningInfo message. - * @function verify - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorSigningInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) - return "address: buffer expected"; - if (message.startHeight != null && message.hasOwnProperty("startHeight")) - if (!$util.isInteger(message.startHeight) && !(message.startHeight && $util.isInteger(message.startHeight.low) && $util.isInteger(message.startHeight.high))) - return "startHeight: integer|Long expected"; - if (message.indexOffset != null && message.hasOwnProperty("indexOffset")) - if (!$util.isInteger(message.indexOffset) && !(message.indexOffset && $util.isInteger(message.indexOffset.low) && $util.isInteger(message.indexOffset.high))) - return "indexOffset: integer|Long expected"; - if (message.jailedUntil != null && message.hasOwnProperty("jailedUntil")) { - var error = $root.google.protobuf.Timestamp.verify(message.jailedUntil); - if (error) - return "jailedUntil." + error; - } - if (message.tombstoned != null && message.hasOwnProperty("tombstoned")) - if (typeof message.tombstoned !== "boolean") - return "tombstoned: boolean expected"; - if (message.missedBlocksCounter != null && message.hasOwnProperty("missedBlocksCounter")) - if (!$util.isInteger(message.missedBlocksCounter) && !(message.missedBlocksCounter && $util.isInteger(message.missedBlocksCounter.low) && $util.isInteger(message.missedBlocksCounter.high))) - return "missedBlocksCounter: integer|Long expected"; - return null; - }; - - /** - * Creates a ValidatorSigningInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} ValidatorSigningInfo - */ - ValidatorSigningInfo.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.slashing.v1.ValidatorSigningInfo) - return object; - var message = new $root.cosmos_sdk.x.slashing.v1.ValidatorSigningInfo(); - if (object.address != null) - if (typeof object.address === "string") - $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); - else if (object.address.length) - message.address = object.address; - if (object.startHeight != null) - if ($util.Long) - (message.startHeight = $util.Long.fromValue(object.startHeight)).unsigned = false; - else if (typeof object.startHeight === "string") - message.startHeight = parseInt(object.startHeight, 10); - else if (typeof object.startHeight === "number") - message.startHeight = object.startHeight; - else if (typeof object.startHeight === "object") - message.startHeight = new $util.LongBits(object.startHeight.low >>> 0, object.startHeight.high >>> 0).toNumber(); - if (object.indexOffset != null) - if ($util.Long) - (message.indexOffset = $util.Long.fromValue(object.indexOffset)).unsigned = false; - else if (typeof object.indexOffset === "string") - message.indexOffset = parseInt(object.indexOffset, 10); - else if (typeof object.indexOffset === "number") - message.indexOffset = object.indexOffset; - else if (typeof object.indexOffset === "object") - message.indexOffset = new $util.LongBits(object.indexOffset.low >>> 0, object.indexOffset.high >>> 0).toNumber(); - if (object.jailedUntil != null) { - if (typeof object.jailedUntil !== "object") - throw TypeError(".cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.jailedUntil: object expected"); - message.jailedUntil = $root.google.protobuf.Timestamp.fromObject(object.jailedUntil); - } - if (object.tombstoned != null) - message.tombstoned = Boolean(object.tombstoned); - if (object.missedBlocksCounter != null) - if ($util.Long) - (message.missedBlocksCounter = $util.Long.fromValue(object.missedBlocksCounter)).unsigned = false; - else if (typeof object.missedBlocksCounter === "string") - message.missedBlocksCounter = parseInt(object.missedBlocksCounter, 10); - else if (typeof object.missedBlocksCounter === "number") - message.missedBlocksCounter = object.missedBlocksCounter; - else if (typeof object.missedBlocksCounter === "object") - message.missedBlocksCounter = new $util.LongBits(object.missedBlocksCounter.low >>> 0, object.missedBlocksCounter.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ValidatorSigningInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @static - * @param {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} message ValidatorSigningInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorSigningInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.address = ""; - else { - object.address = []; - if (options.bytes !== Array) - object.address = $util.newBuffer(object.address); - } - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.startHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.startHeight = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.indexOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.indexOffset = options.longs === String ? "0" : 0; - object.jailedUntil = null; - object.tombstoned = false; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.missedBlocksCounter = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.missedBlocksCounter = options.longs === String ? "0" : 0; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; - if (message.startHeight != null && message.hasOwnProperty("startHeight")) - if (typeof message.startHeight === "number") - object.startHeight = options.longs === String ? String(message.startHeight) : message.startHeight; - else - object.startHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startHeight) : options.longs === Number ? new $util.LongBits(message.startHeight.low >>> 0, message.startHeight.high >>> 0).toNumber() : message.startHeight; - if (message.indexOffset != null && message.hasOwnProperty("indexOffset")) - if (typeof message.indexOffset === "number") - object.indexOffset = options.longs === String ? String(message.indexOffset) : message.indexOffset; - else - object.indexOffset = options.longs === String ? $util.Long.prototype.toString.call(message.indexOffset) : options.longs === Number ? new $util.LongBits(message.indexOffset.low >>> 0, message.indexOffset.high >>> 0).toNumber() : message.indexOffset; - if (message.jailedUntil != null && message.hasOwnProperty("jailedUntil")) - object.jailedUntil = $root.google.protobuf.Timestamp.toObject(message.jailedUntil, options); - if (message.tombstoned != null && message.hasOwnProperty("tombstoned")) - object.tombstoned = message.tombstoned; - if (message.missedBlocksCounter != null && message.hasOwnProperty("missedBlocksCounter")) - if (typeof message.missedBlocksCounter === "number") - object.missedBlocksCounter = options.longs === String ? String(message.missedBlocksCounter) : message.missedBlocksCounter; - else - object.missedBlocksCounter = options.longs === String ? $util.Long.prototype.toString.call(message.missedBlocksCounter) : options.longs === Number ? new $util.LongBits(message.missedBlocksCounter.low >>> 0, message.missedBlocksCounter.high >>> 0).toNumber() : message.missedBlocksCounter; - return object; - }; - - /** - * Converts this ValidatorSigningInfo to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @instance - * @returns {Object.} JSON object - */ - ValidatorSigningInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValidatorSigningInfo; @@ -29480,13 +14630,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgCreateValidator. * @implements IMsgCreateValidator * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator=} [p] Properties to set */ - function MsgCreateValidator(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgCreateValidator(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]]; } /** @@ -29562,41 +14712,28 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator * @static - * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator} m MsgCreateValidator message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgCreateValidator.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - $root.cosmos_sdk.x.staking.v1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) - $root.cosmos_sdk.x.staking.v1.CommissionRates.encode(message.commission, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.minSelfDelegation); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.delegatorAddress); - if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.validatorAddress); - if (message.pubkey != null && Object.hasOwnProperty.call(message, "pubkey")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pubkey); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - $root.cosmos_sdk.v1.Coin.encode(message.value, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgCreateValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator} message MsgCreateValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateValidator.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgCreateValidator.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + $root.cosmos_sdk.x.staking.v1.Description.encode(m.description, w.uint32(10).fork()).ldelim(); + if (m.commission != null && Object.hasOwnProperty.call(m, "commission")) + $root.cosmos_sdk.x.staking.v1.CommissionRates.encode(m.commission, w.uint32(18).fork()).ldelim(); + if (m.minSelfDelegation != null && Object.hasOwnProperty.call(m, "minSelfDelegation")) + w.uint32(26).string(m.minSelfDelegation); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(34).bytes(m.delegatorAddress); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(42).bytes(m.validatorAddress); + if (m.pubkey != null && Object.hasOwnProperty.call(m, "pubkey")) + w.uint32(50).string(m.pubkey); + if (m.value != null && Object.hasOwnProperty.call(m, "value")) + $root.cosmos_sdk.v1.Coin.encode(m.value, w.uint32(58).fork()).ldelim(); + return w; }; /** @@ -29604,209 +14741,46 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.MsgCreateValidator} MsgCreateValidator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgCreateValidator.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgCreateValidator(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgCreateValidator.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.staking.v1.MsgCreateValidator(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.description = $root.cosmos_sdk.x.staking.v1.Description.decode(reader, reader.uint32()); + m.description = $root.cosmos_sdk.x.staking.v1.Description.decode(r, r.uint32()); break; case 2: - message.commission = $root.cosmos_sdk.x.staking.v1.CommissionRates.decode(reader, reader.uint32()); + m.commission = $root.cosmos_sdk.x.staking.v1.CommissionRates.decode(r, r.uint32()); break; case 3: - message.minSelfDelegation = reader.string(); + m.minSelfDelegation = r.string(); break; case 4: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 5: - message.validatorAddress = reader.bytes(); + m.validatorAddress = r.bytes(); break; case 6: - message.pubkey = reader.string(); + m.pubkey = r.string(); break; case 7: - message.value = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + m.value = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgCreateValidator message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.MsgCreateValidator} MsgCreateValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateValidator.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgCreateValidator message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgCreateValidator.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.description != null && message.hasOwnProperty("description")) { - var error = $root.cosmos_sdk.x.staking.v1.Description.verify(message.description); - if (error) - return "description." + error; - } - if (message.commission != null && message.hasOwnProperty("commission")) { - var error = $root.cosmos_sdk.x.staking.v1.CommissionRates.verify(message.commission); - if (error) - return "commission." + error; - } - if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) - if (!$util.isString(message.minSelfDelegation)) - return "minSelfDelegation: string expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) - return "validatorAddress: buffer expected"; - if (message.pubkey != null && message.hasOwnProperty("pubkey")) - if (!$util.isString(message.pubkey)) - return "pubkey: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; - - /** - * Creates a MsgCreateValidator message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.MsgCreateValidator} MsgCreateValidator - */ - MsgCreateValidator.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgCreateValidator) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.MsgCreateValidator(); - if (object.description != null) { - if (typeof object.description !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.MsgCreateValidator.description: object expected"); - message.description = $root.cosmos_sdk.x.staking.v1.Description.fromObject(object.description); - } - if (object.commission != null) { - if (typeof object.commission !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.MsgCreateValidator.commission: object expected"); - message.commission = $root.cosmos_sdk.x.staking.v1.CommissionRates.fromObject(object.commission); - } - if (object.minSelfDelegation != null) - message.minSelfDelegation = String(object.minSelfDelegation); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorAddress != null) - if (typeof object.validatorAddress === "string") - $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); - else if (object.validatorAddress.length) - message.validatorAddress = object.validatorAddress; - if (object.pubkey != null) - message.pubkey = String(object.pubkey); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.MsgCreateValidator.value: object expected"); - message.value = $root.cosmos_sdk.v1.Coin.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from a MsgCreateValidator message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @static - * @param {cosmos_sdk.x.staking.v1.MsgCreateValidator} message MsgCreateValidator - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgCreateValidator.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.description = null; - object.commission = null; - object.minSelfDelegation = ""; - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorAddress = ""; - else { - object.validatorAddress = []; - if (options.bytes !== Array) - object.validatorAddress = $util.newBuffer(object.validatorAddress); - } - object.pubkey = ""; - object.value = null; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = $root.cosmos_sdk.x.staking.v1.Description.toObject(message.description, options); - if (message.commission != null && message.hasOwnProperty("commission")) - object.commission = $root.cosmos_sdk.x.staking.v1.CommissionRates.toObject(message.commission, options); - if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) - object.minSelfDelegation = message.minSelfDelegation; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; - if (message.pubkey != null && message.hasOwnProperty("pubkey")) - object.pubkey = message.pubkey; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.cosmos_sdk.v1.Coin.toObject(message.value, options); - return object; - }; - - /** - * Converts this MsgCreateValidator to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @instance - * @returns {Object.} JSON object - */ - MsgCreateValidator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgCreateValidator; @@ -29830,13 +14804,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgEditValidator. * @implements IMsgEditValidator * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator=} [p] Properties to set */ - function MsgEditValidator(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgEditValidator(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]]; } /** @@ -29888,35 +14862,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator * @static - * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator} message MsgEditValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator} m MsgEditValidator message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgEditValidator.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - $root.cosmos_sdk.x.staking.v1.Description.encode(message.description, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); - if (message.commissionRate != null && Object.hasOwnProperty.call(message, "commissionRate")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.commissionRate); - if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.minSelfDelegation); - return writer; - }; - - /** - * Encodes the specified MsgEditValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator} message MsgEditValidator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgEditValidator.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgEditValidator.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + $root.cosmos_sdk.x.staking.v1.Description.encode(m.description, w.uint32(10).fork()).ldelim(); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(18).bytes(m.validatorAddress); + if (m.commissionRate != null && Object.hasOwnProperty.call(m, "commissionRate")) + w.uint32(26).string(m.commissionRate); + if (m.minSelfDelegation != null && Object.hasOwnProperty.call(m, "minSelfDelegation")) + w.uint32(34).string(m.minSelfDelegation); + return w; }; /** @@ -29924,157 +14885,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.MsgEditValidator} MsgEditValidator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgEditValidator.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgEditValidator(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgEditValidator.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.staking.v1.MsgEditValidator(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.description = $root.cosmos_sdk.x.staking.v1.Description.decode(reader, reader.uint32()); + m.description = $root.cosmos_sdk.x.staking.v1.Description.decode(r, r.uint32()); break; case 2: - message.validatorAddress = reader.bytes(); + m.validatorAddress = r.bytes(); break; case 3: - message.commissionRate = reader.string(); + m.commissionRate = r.string(); break; case 4: - message.minSelfDelegation = reader.string(); + m.minSelfDelegation = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgEditValidator message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.MsgEditValidator} MsgEditValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgEditValidator.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgEditValidator message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgEditValidator.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.description != null && message.hasOwnProperty("description")) { - var error = $root.cosmos_sdk.x.staking.v1.Description.verify(message.description); - if (error) - return "description." + error; - } - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) - return "validatorAddress: buffer expected"; - if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) - if (!$util.isString(message.commissionRate)) - return "commissionRate: string expected"; - if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) - if (!$util.isString(message.minSelfDelegation)) - return "minSelfDelegation: string expected"; - return null; - }; - - /** - * Creates a MsgEditValidator message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.MsgEditValidator} MsgEditValidator - */ - MsgEditValidator.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgEditValidator) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.MsgEditValidator(); - if (object.description != null) { - if (typeof object.description !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.MsgEditValidator.description: object expected"); - message.description = $root.cosmos_sdk.x.staking.v1.Description.fromObject(object.description); - } - if (object.validatorAddress != null) - if (typeof object.validatorAddress === "string") - $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); - else if (object.validatorAddress.length) - message.validatorAddress = object.validatorAddress; - if (object.commissionRate != null) - message.commissionRate = String(object.commissionRate); - if (object.minSelfDelegation != null) - message.minSelfDelegation = String(object.minSelfDelegation); - return message; - }; - - /** - * Creates a plain object from a MsgEditValidator message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @static - * @param {cosmos_sdk.x.staking.v1.MsgEditValidator} message MsgEditValidator - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgEditValidator.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.description = null; - if (options.bytes === String) - object.validatorAddress = ""; - else { - object.validatorAddress = []; - if (options.bytes !== Array) - object.validatorAddress = $util.newBuffer(object.validatorAddress); - } - object.commissionRate = ""; - object.minSelfDelegation = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = $root.cosmos_sdk.x.staking.v1.Description.toObject(message.description, options); - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; - if (message.commissionRate != null && message.hasOwnProperty("commissionRate")) - object.commissionRate = message.commissionRate; - if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) - object.minSelfDelegation = message.minSelfDelegation; - return object; - }; - - /** - * Converts this MsgEditValidator to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @instance - * @returns {Object.} JSON object - */ - MsgEditValidator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgEditValidator; @@ -30097,13 +14938,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgDelegate. * @implements IMsgDelegate * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgDelegate=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IMsgDelegate=} [p] Properties to set */ - function MsgDelegate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgDelegate(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]]; } /** @@ -30147,33 +14988,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.MsgDelegate * @static - * @param {cosmos_sdk.x.staking.v1.IMsgDelegate} message MsgDelegate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IMsgDelegate} m MsgDelegate message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgDelegate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.cosmos_sdk.v1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgDelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgDelegate} message MsgDelegate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDelegate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgDelegate.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(18).bytes(m.validatorAddress); + if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) + $root.cosmos_sdk.v1.Coin.encode(m.amount, w.uint32(26).fork()).ldelim(); + return w; }; /** @@ -30181,155 +15009,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.MsgDelegate * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.MsgDelegate} MsgDelegate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgDelegate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgDelegate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgDelegate.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.staking.v1.MsgDelegate(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.validatorAddress = reader.bytes(); + m.validatorAddress = r.bytes(); break; case 3: - message.amount = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + m.amount = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgDelegate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.MsgDelegate} MsgDelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDelegate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgDelegate message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgDelegate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) - return "validatorAddress: buffer expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount); - if (error) - return "amount." + error; - } - return null; - }; - - /** - * Creates a MsgDelegate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.MsgDelegate} MsgDelegate - */ - MsgDelegate.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgDelegate) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.MsgDelegate(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorAddress != null) - if (typeof object.validatorAddress === "string") - $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); - else if (object.validatorAddress.length) - message.validatorAddress = object.validatorAddress; - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.MsgDelegate.amount: object expected"); - message.amount = $root.cosmos_sdk.v1.Coin.fromObject(object.amount); - } - return message; - }; - - /** - * Creates a plain object from a MsgDelegate message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @static - * @param {cosmos_sdk.x.staking.v1.MsgDelegate} message MsgDelegate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgDelegate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorAddress = ""; - else { - object.validatorAddress = []; - if (options.bytes !== Array) - object.validatorAddress = $util.newBuffer(object.validatorAddress); - } - object.amount = null; - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.cosmos_sdk.v1.Coin.toObject(message.amount, options); - return object; - }; - - /** - * Converts this MsgDelegate to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @instance - * @returns {Object.} JSON object - */ - MsgDelegate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgDelegate; @@ -30353,13 +15060,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgBeginRedelegate. * @implements IMsgBeginRedelegate * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate=} [p] Properties to set */ - function MsgBeginRedelegate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgBeginRedelegate(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]]; } /** @@ -30411,35 +15118,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate * @static - * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate} m MsgBeginRedelegate message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgBeginRedelegate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorSrcAddress); - if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.validatorDstAddress); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.cosmos_sdk.v1.Coin.encode(message.amount, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgBeginRedelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate} message MsgBeginRedelegate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgBeginRedelegate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgBeginRedelegate.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.validatorSrcAddress != null && Object.hasOwnProperty.call(m, "validatorSrcAddress")) + w.uint32(18).bytes(m.validatorSrcAddress); + if (m.validatorDstAddress != null && Object.hasOwnProperty.call(m, "validatorDstAddress")) + w.uint32(26).bytes(m.validatorDstAddress); + if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) + $root.cosmos_sdk.v1.Coin.encode(m.amount, w.uint32(34).fork()).ldelim(); + return w; }; /** @@ -30447,175 +15141,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} MsgBeginRedelegate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgBeginRedelegate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgBeginRedelegate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgBeginRedelegate.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.staking.v1.MsgBeginRedelegate(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.validatorSrcAddress = reader.bytes(); + m.validatorSrcAddress = r.bytes(); break; case 3: - message.validatorDstAddress = reader.bytes(); + m.validatorDstAddress = r.bytes(); break; case 4: - message.amount = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + m.amount = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgBeginRedelegate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} MsgBeginRedelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgBeginRedelegate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgBeginRedelegate message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgBeginRedelegate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) - if (!(message.validatorSrcAddress && typeof message.validatorSrcAddress.length === "number" || $util.isString(message.validatorSrcAddress))) - return "validatorSrcAddress: buffer expected"; - if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) - if (!(message.validatorDstAddress && typeof message.validatorDstAddress.length === "number" || $util.isString(message.validatorDstAddress))) - return "validatorDstAddress: buffer expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount); - if (error) - return "amount." + error; - } - return null; - }; - - /** - * Creates a MsgBeginRedelegate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} MsgBeginRedelegate - */ - MsgBeginRedelegate.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgBeginRedelegate) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.MsgBeginRedelegate(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorSrcAddress != null) - if (typeof object.validatorSrcAddress === "string") - $util.base64.decode(object.validatorSrcAddress, message.validatorSrcAddress = $util.newBuffer($util.base64.length(object.validatorSrcAddress)), 0); - else if (object.validatorSrcAddress.length) - message.validatorSrcAddress = object.validatorSrcAddress; - if (object.validatorDstAddress != null) - if (typeof object.validatorDstAddress === "string") - $util.base64.decode(object.validatorDstAddress, message.validatorDstAddress = $util.newBuffer($util.base64.length(object.validatorDstAddress)), 0); - else if (object.validatorDstAddress.length) - message.validatorDstAddress = object.validatorDstAddress; - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.MsgBeginRedelegate.amount: object expected"); - message.amount = $root.cosmos_sdk.v1.Coin.fromObject(object.amount); - } - return message; - }; - - /** - * Creates a plain object from a MsgBeginRedelegate message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @static - * @param {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} message MsgBeginRedelegate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgBeginRedelegate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorSrcAddress = ""; - else { - object.validatorSrcAddress = []; - if (options.bytes !== Array) - object.validatorSrcAddress = $util.newBuffer(object.validatorSrcAddress); - } - if (options.bytes === String) - object.validatorDstAddress = ""; - else { - object.validatorDstAddress = []; - if (options.bytes !== Array) - object.validatorDstAddress = $util.newBuffer(object.validatorDstAddress); - } - object.amount = null; - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) - object.validatorSrcAddress = options.bytes === String ? $util.base64.encode(message.validatorSrcAddress, 0, message.validatorSrcAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorSrcAddress) : message.validatorSrcAddress; - if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) - object.validatorDstAddress = options.bytes === String ? $util.base64.encode(message.validatorDstAddress, 0, message.validatorDstAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorDstAddress) : message.validatorDstAddress; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.cosmos_sdk.v1.Coin.toObject(message.amount, options); - return object; - }; - - /** - * Converts this MsgBeginRedelegate to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @instance - * @returns {Object.} JSON object - */ - MsgBeginRedelegate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgBeginRedelegate; @@ -30638,13 +15194,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgUndelegate. * @implements IMsgUndelegate * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate=} [p] Properties to set */ - function MsgUndelegate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgUndelegate(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]]; } /** @@ -30688,33 +15244,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate * @static - * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate} message MsgUndelegate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate} m MsgUndelegate message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgUndelegate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); - if (message.amount != null && Object.hasOwnProperty.call(message, "amount")) - $root.cosmos_sdk.v1.Coin.encode(message.amount, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MsgUndelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate} message MsgUndelegate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUndelegate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgUndelegate.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(18).bytes(m.validatorAddress); + if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) + $root.cosmos_sdk.v1.Coin.encode(m.amount, w.uint32(26).fork()).ldelim(); + return w; }; /** @@ -30722,155 +15265,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.MsgUndelegate} MsgUndelegate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgUndelegate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.MsgUndelegate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgUndelegate.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.staking.v1.MsgUndelegate(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.validatorAddress = reader.bytes(); + m.validatorAddress = r.bytes(); break; case 3: - message.amount = $root.cosmos_sdk.v1.Coin.decode(reader, reader.uint32()); + m.amount = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgUndelegate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.MsgUndelegate} MsgUndelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUndelegate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgUndelegate message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgUndelegate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) - return "validatorAddress: buffer expected"; - if (message.amount != null && message.hasOwnProperty("amount")) { - var error = $root.cosmos_sdk.v1.Coin.verify(message.amount); - if (error) - return "amount." + error; - } - return null; - }; - - /** - * Creates a MsgUndelegate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.MsgUndelegate} MsgUndelegate - */ - MsgUndelegate.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.MsgUndelegate) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.MsgUndelegate(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorAddress != null) - if (typeof object.validatorAddress === "string") - $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); - else if (object.validatorAddress.length) - message.validatorAddress = object.validatorAddress; - if (object.amount != null) { - if (typeof object.amount !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.MsgUndelegate.amount: object expected"); - message.amount = $root.cosmos_sdk.v1.Coin.fromObject(object.amount); - } - return message; - }; - - /** - * Creates a plain object from a MsgUndelegate message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @static - * @param {cosmos_sdk.x.staking.v1.MsgUndelegate} message MsgUndelegate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgUndelegate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorAddress = ""; - else { - object.validatorAddress = []; - if (options.bytes !== Array) - object.validatorAddress = $util.newBuffer(object.validatorAddress); - } - object.amount = null; - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; - if (message.amount != null && message.hasOwnProperty("amount")) - object.amount = $root.cosmos_sdk.v1.Coin.toObject(message.amount, options); - return object; - }; - - /** - * Converts this MsgUndelegate to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @instance - * @returns {Object.} JSON object - */ - MsgUndelegate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgUndelegate; @@ -30892,14 +15314,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a HistoricalInfo. * @implements IHistoricalInfo * @constructor - * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo=} [p] Properties to set */ - function HistoricalInfo(properties) { + function HistoricalInfo(p) { this.valset = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -30935,32 +15357,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo * @static - * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo} message HistoricalInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo} m HistoricalInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HistoricalInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.tendermint.abci.types.Header.encode(message.header, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.valset != null && message.valset.length) - for (var i = 0; i < message.valset.length; ++i) - $root.cosmos_sdk.x.staking.v1.Validator.encode(message.valset[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified HistoricalInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @static - * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo} message HistoricalInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistoricalInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + HistoricalInfo.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.header != null && Object.hasOwnProperty.call(m, "header")) + $root.tendermint.abci.types.Header.encode(m.header, w.uint32(10).fork()).ldelim(); + if (m.valset != null && m.valset.length) { + for (var i = 0; i < m.valset.length; ++i) + $root.cosmos_sdk.x.staking.v1.Validator.encode(m.valset[i], w.uint32(18).fork()).ldelim(); + } + return w; }; /** @@ -30968,145 +15378,33 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.HistoricalInfo} HistoricalInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HistoricalInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.HistoricalInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + HistoricalInfo.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.staking.v1.HistoricalInfo(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.header = $root.tendermint.abci.types.Header.decode(reader, reader.uint32()); + m.header = $root.tendermint.abci.types.Header.decode(r, r.uint32()); break; case 2: - if (!(message.valset && message.valset.length)) - message.valset = []; - message.valset.push($root.cosmos_sdk.x.staking.v1.Validator.decode(reader, reader.uint32())); + if (!(m.valset && m.valset.length)) + m.valset = []; + m.valset.push($root.cosmos_sdk.x.staking.v1.Validator.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a HistoricalInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.HistoricalInfo} HistoricalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistoricalInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HistoricalInfo message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HistoricalInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.header != null && message.hasOwnProperty("header")) { - var error = $root.tendermint.abci.types.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.valset != null && message.hasOwnProperty("valset")) { - if (!Array.isArray(message.valset)) - return "valset: array expected"; - for (var i = 0; i < message.valset.length; ++i) { - var error = $root.cosmos_sdk.x.staking.v1.Validator.verify(message.valset[i]); - if (error) - return "valset." + error; - } - } - return null; - }; - - /** - * Creates a HistoricalInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.HistoricalInfo} HistoricalInfo - */ - HistoricalInfo.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.HistoricalInfo) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.HistoricalInfo(); - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.HistoricalInfo.header: object expected"); - message.header = $root.tendermint.abci.types.Header.fromObject(object.header); - } - if (object.valset) { - if (!Array.isArray(object.valset)) - throw TypeError(".cosmos_sdk.x.staking.v1.HistoricalInfo.valset: array expected"); - message.valset = []; - for (var i = 0; i < object.valset.length; ++i) { - if (typeof object.valset[i] !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.HistoricalInfo.valset: object expected"); - message.valset[i] = $root.cosmos_sdk.x.staking.v1.Validator.fromObject(object.valset[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HistoricalInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @static - * @param {cosmos_sdk.x.staking.v1.HistoricalInfo} message HistoricalInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HistoricalInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.valset = []; - if (options.defaults) - object.header = null; - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.tendermint.abci.types.Header.toObject(message.header, options); - if (message.valset && message.valset.length) { - object.valset = []; - for (var j = 0; j < message.valset.length; ++j) - object.valset[j] = $root.cosmos_sdk.x.staking.v1.Validator.toObject(message.valset[j], options); - } - return object; - }; - - /** - * Converts this HistoricalInfo to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @instance - * @returns {Object.} JSON object - */ - HistoricalInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return HistoricalInfo; @@ -31129,13 +15427,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a CommissionRates. * @implements ICommissionRates * @constructor - * @param {cosmos_sdk.x.staking.v1.ICommissionRates=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.ICommissionRates=} [p] Properties to set */ - function CommissionRates(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function CommissionRates(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]]; } /** @@ -31179,33 +15477,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.CommissionRates * @static - * @param {cosmos_sdk.x.staking.v1.ICommissionRates} message CommissionRates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.ICommissionRates} m CommissionRates message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommissionRates.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rate != null && Object.hasOwnProperty.call(message, "rate")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.rate); - if (message.maxRate != null && Object.hasOwnProperty.call(message, "maxRate")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.maxRate); - if (message.maxChangeRate != null && Object.hasOwnProperty.call(message, "maxChangeRate")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.maxChangeRate); - return writer; - }; - - /** - * Encodes the specified CommissionRates message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @static - * @param {cosmos_sdk.x.staking.v1.ICommissionRates} message CommissionRates message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommissionRates.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CommissionRates.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.rate != null && Object.hasOwnProperty.call(m, "rate")) + w.uint32(10).string(m.rate); + if (m.maxRate != null && Object.hasOwnProperty.call(m, "maxRate")) + w.uint32(18).string(m.maxRate); + if (m.maxChangeRate != null && Object.hasOwnProperty.call(m, "maxChangeRate")) + w.uint32(26).string(m.maxChangeRate); + return w; }; /** @@ -31213,132 +15498,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.CommissionRates * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.CommissionRates} CommissionRates * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CommissionRates.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.CommissionRates(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + CommissionRates.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.staking.v1.CommissionRates(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.rate = reader.string(); + m.rate = r.string(); break; case 2: - message.maxRate = reader.string(); + m.maxRate = r.string(); break; case 3: - message.maxChangeRate = reader.string(); + m.maxChangeRate = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a CommissionRates message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.CommissionRates} CommissionRates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommissionRates.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommissionRates message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommissionRates.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rate != null && message.hasOwnProperty("rate")) - if (!$util.isString(message.rate)) - return "rate: string expected"; - if (message.maxRate != null && message.hasOwnProperty("maxRate")) - if (!$util.isString(message.maxRate)) - return "maxRate: string expected"; - if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) - if (!$util.isString(message.maxChangeRate)) - return "maxChangeRate: string expected"; - return null; - }; - - /** - * Creates a CommissionRates message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.CommissionRates} CommissionRates - */ - CommissionRates.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.CommissionRates) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.CommissionRates(); - if (object.rate != null) - message.rate = String(object.rate); - if (object.maxRate != null) - message.maxRate = String(object.maxRate); - if (object.maxChangeRate != null) - message.maxChangeRate = String(object.maxChangeRate); - return message; - }; - - /** - * Creates a plain object from a CommissionRates message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @static - * @param {cosmos_sdk.x.staking.v1.CommissionRates} message CommissionRates - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommissionRates.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.rate = ""; - object.maxRate = ""; - object.maxChangeRate = ""; - } - if (message.rate != null && message.hasOwnProperty("rate")) - object.rate = message.rate; - if (message.maxRate != null && message.hasOwnProperty("maxRate")) - object.maxRate = message.maxRate; - if (message.maxChangeRate != null && message.hasOwnProperty("maxChangeRate")) - object.maxChangeRate = message.maxChangeRate; - return object; - }; - - /** - * Converts this CommissionRates to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @instance - * @returns {Object.} JSON object - */ - CommissionRates.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return CommissionRates; @@ -31360,13 +15547,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Commission. * @implements ICommission * @constructor - * @param {cosmos_sdk.x.staking.v1.ICommission=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.ICommission=} [p] Properties to set */ - function Commission(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Commission(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]]; } /** @@ -31402,31 +15589,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.Commission * @static - * @param {cosmos_sdk.x.staking.v1.ICommission} message Commission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.ICommission} m Commission message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Commission.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.commissionRates != null && Object.hasOwnProperty.call(message, "commissionRates")) - $root.cosmos_sdk.x.staking.v1.CommissionRates.encode(message.commissionRates, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Commission message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Commission - * @static - * @param {cosmos_sdk.x.staking.v1.ICommission} message Commission message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Commission.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Commission.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.commissionRates != null && Object.hasOwnProperty.call(m, "commissionRates")) + $root.cosmos_sdk.x.staking.v1.CommissionRates.encode(m.commissionRates, w.uint32(10).fork()).ldelim(); + if (m.updateTime != null && Object.hasOwnProperty.call(m, "updateTime")) + $root.google.protobuf.Timestamp.encode(m.updateTime, w.uint32(18).fork()).ldelim(); + return w; }; /** @@ -31434,131 +15608,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.Commission * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.Commission} Commission * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Commission.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Commission(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Commission.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.staking.v1.Commission(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.commissionRates = $root.cosmos_sdk.x.staking.v1.CommissionRates.decode(reader, reader.uint32()); + m.commissionRates = $root.cosmos_sdk.x.staking.v1.CommissionRates.decode(r, r.uint32()); break; case 2: - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.updateTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Commission message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Commission - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.Commission} Commission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Commission.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Commission message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.Commission - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Commission.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) { - var error = $root.cosmos_sdk.x.staking.v1.CommissionRates.verify(message.commissionRates); - if (error) - return "commissionRates." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - return null; - }; - - /** - * Creates a Commission message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.Commission - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.Commission} Commission - */ - Commission.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.Commission) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.Commission(); - if (object.commissionRates != null) { - if (typeof object.commissionRates !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.Commission.commissionRates: object expected"); - message.commissionRates = $root.cosmos_sdk.x.staking.v1.CommissionRates.fromObject(object.commissionRates); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.Commission.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - return message; - }; - - /** - * Creates a plain object from a Commission message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.Commission - * @static - * @param {cosmos_sdk.x.staking.v1.Commission} message Commission - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Commission.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.commissionRates = null; - object.updateTime = null; - } - if (message.commissionRates != null && message.hasOwnProperty("commissionRates")) - object.commissionRates = $root.cosmos_sdk.x.staking.v1.CommissionRates.toObject(message.commissionRates, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - return object; - }; - - /** - * Converts this Commission to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.Commission - * @instance - * @returns {Object.} JSON object - */ - Commission.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Commission; @@ -31583,13 +15657,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Description. * @implements IDescription * @constructor - * @param {cosmos_sdk.x.staking.v1.IDescription=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IDescription=} [p] Properties to set */ - function Description(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Description(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]]; } /** @@ -31649,37 +15723,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.Description * @static - * @param {cosmos_sdk.x.staking.v1.IDescription} message Description message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IDescription} m Description message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Description.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.moniker != null && Object.hasOwnProperty.call(message, "moniker")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.moniker); - if (message.identity != null && Object.hasOwnProperty.call(message, "identity")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.identity); - if (message.website != null && Object.hasOwnProperty.call(message, "website")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.website); - if (message.securityContact != null && Object.hasOwnProperty.call(message, "securityContact")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.securityContact); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.details); - return writer; - }; - - /** - * Encodes the specified Description message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Description - * @static - * @param {cosmos_sdk.x.staking.v1.IDescription} message Description message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Description.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Description.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.moniker != null && Object.hasOwnProperty.call(m, "moniker")) + w.uint32(10).string(m.moniker); + if (m.identity != null && Object.hasOwnProperty.call(m, "identity")) + w.uint32(18).string(m.identity); + if (m.website != null && Object.hasOwnProperty.call(m, "website")) + w.uint32(26).string(m.website); + if (m.securityContact != null && Object.hasOwnProperty.call(m, "securityContact")) + w.uint32(34).string(m.securityContact); + if (m.details != null && Object.hasOwnProperty.call(m, "details")) + w.uint32(42).string(m.details); + return w; }; /** @@ -31687,154 +15748,40 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.Description * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.Description} Description * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Description.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Description(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Description.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.staking.v1.Description(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.moniker = reader.string(); + m.moniker = r.string(); break; case 2: - message.identity = reader.string(); + m.identity = r.string(); break; case 3: - message.website = reader.string(); + m.website = r.string(); break; case 4: - message.securityContact = reader.string(); + m.securityContact = r.string(); break; case 5: - message.details = reader.string(); + m.details = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Description message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Description - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.Description} Description - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Description.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Description message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.Description - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Description.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.moniker != null && message.hasOwnProperty("moniker")) - if (!$util.isString(message.moniker)) - return "moniker: string expected"; - if (message.identity != null && message.hasOwnProperty("identity")) - if (!$util.isString(message.identity)) - return "identity: string expected"; - if (message.website != null && message.hasOwnProperty("website")) - if (!$util.isString(message.website)) - return "website: string expected"; - if (message.securityContact != null && message.hasOwnProperty("securityContact")) - if (!$util.isString(message.securityContact)) - return "securityContact: string expected"; - if (message.details != null && message.hasOwnProperty("details")) - if (!$util.isString(message.details)) - return "details: string expected"; - return null; - }; - - /** - * Creates a Description message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.Description - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.Description} Description - */ - Description.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.Description) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.Description(); - if (object.moniker != null) - message.moniker = String(object.moniker); - if (object.identity != null) - message.identity = String(object.identity); - if (object.website != null) - message.website = String(object.website); - if (object.securityContact != null) - message.securityContact = String(object.securityContact); - if (object.details != null) - message.details = String(object.details); - return message; - }; - - /** - * Creates a plain object from a Description message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.Description - * @static - * @param {cosmos_sdk.x.staking.v1.Description} message Description - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Description.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.moniker = ""; - object.identity = ""; - object.website = ""; - object.securityContact = ""; - object.details = ""; - } - if (message.moniker != null && message.hasOwnProperty("moniker")) - object.moniker = message.moniker; - if (message.identity != null && message.hasOwnProperty("identity")) - object.identity = message.identity; - if (message.website != null && message.hasOwnProperty("website")) - object.website = message.website; - if (message.securityContact != null && message.hasOwnProperty("securityContact")) - object.securityContact = message.securityContact; - if (message.details != null && message.hasOwnProperty("details")) - object.details = message.details; - return object; - }; - - /** - * Converts this Description to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.Description - * @instance - * @returns {Object.} JSON object - */ - Description.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Description; @@ -31865,13 +15812,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Validator. * @implements IValidator * @constructor - * @param {cosmos_sdk.x.staking.v1.IValidator=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IValidator=} [p] Properties to set */ - function Validator(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -31979,49 +15926,36 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.Validator * @static - * @param {cosmos_sdk.x.staking.v1.IValidator} message Validator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IValidator} m Validator message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Validator.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.operatorAddress != null && Object.hasOwnProperty.call(message, "operatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.operatorAddress); - if (message.consensusPubkey != null && Object.hasOwnProperty.call(message, "consensusPubkey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.consensusPubkey); - if (message.jailed != null && Object.hasOwnProperty.call(message, "jailed")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.jailed); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.status); - if (message.tokens != null && Object.hasOwnProperty.call(message, "tokens")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.tokens); - if (message.delegatorShares != null && Object.hasOwnProperty.call(message, "delegatorShares")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.delegatorShares); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - $root.cosmos_sdk.x.staking.v1.Description.encode(message.description, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.unbondingHeight != null && Object.hasOwnProperty.call(message, "unbondingHeight")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.unbondingHeight); - if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) - $root.google.protobuf.Timestamp.encode(message.unbondingTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.commission != null && Object.hasOwnProperty.call(message, "commission")) - $root.cosmos_sdk.x.staking.v1.Commission.encode(message.commission, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.minSelfDelegation != null && Object.hasOwnProperty.call(message, "minSelfDelegation")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.minSelfDelegation); - return writer; - }; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Validator - * @static - * @param {cosmos_sdk.x.staking.v1.IValidator} message Validator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Validator.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Validator.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.operatorAddress != null && Object.hasOwnProperty.call(m, "operatorAddress")) + w.uint32(10).bytes(m.operatorAddress); + if (m.consensusPubkey != null && Object.hasOwnProperty.call(m, "consensusPubkey")) + w.uint32(18).string(m.consensusPubkey); + if (m.jailed != null && Object.hasOwnProperty.call(m, "jailed")) + w.uint32(24).bool(m.jailed); + if (m.status != null && Object.hasOwnProperty.call(m, "status")) + w.uint32(32).int32(m.status); + if (m.tokens != null && Object.hasOwnProperty.call(m, "tokens")) + w.uint32(42).string(m.tokens); + if (m.delegatorShares != null && Object.hasOwnProperty.call(m, "delegatorShares")) + w.uint32(50).string(m.delegatorShares); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + $root.cosmos_sdk.x.staking.v1.Description.encode(m.description, w.uint32(58).fork()).ldelim(); + if (m.unbondingHeight != null && Object.hasOwnProperty.call(m, "unbondingHeight")) + w.uint32(64).int64(m.unbondingHeight); + if (m.unbondingTime != null && Object.hasOwnProperty.call(m, "unbondingTime")) + $root.google.protobuf.Timestamp.encode(m.unbondingTime, w.uint32(74).fork()).ldelim(); + if (m.commission != null && Object.hasOwnProperty.call(m, "commission")) + $root.cosmos_sdk.x.staking.v1.Commission.encode(m.commission, w.uint32(82).fork()).ldelim(); + if (m.minSelfDelegation != null && Object.hasOwnProperty.call(m, "minSelfDelegation")) + w.uint32(90).string(m.minSelfDelegation); + return w; }; /** @@ -32029,258 +15963,58 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.Validator * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.Validator} Validator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Validator.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Validator(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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.cosmos_sdk.x.staking.v1.Validator(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.operatorAddress = reader.bytes(); + m.operatorAddress = r.bytes(); break; case 2: - message.consensusPubkey = reader.string(); + m.consensusPubkey = r.string(); break; case 3: - message.jailed = reader.bool(); + m.jailed = r.bool(); break; case 4: - message.status = reader.int32(); + m.status = r.int32(); break; case 5: - message.tokens = reader.string(); + m.tokens = r.string(); break; case 6: - message.delegatorShares = reader.string(); + m.delegatorShares = r.string(); break; case 7: - message.description = $root.cosmos_sdk.x.staking.v1.Description.decode(reader, reader.uint32()); + m.description = $root.cosmos_sdk.x.staking.v1.Description.decode(r, r.uint32()); break; case 8: - message.unbondingHeight = reader.int64(); + m.unbondingHeight = r.int64(); break; case 9: - message.unbondingTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.unbondingTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 10: - message.commission = $root.cosmos_sdk.x.staking.v1.Commission.decode(reader, reader.uint32()); + m.commission = $root.cosmos_sdk.x.staking.v1.Commission.decode(r, r.uint32()); break; case 11: - message.minSelfDelegation = reader.string(); + m.minSelfDelegation = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Validator message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.Validator} Validator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Validator.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Validator message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.Validator - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Validator.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) - if (!(message.operatorAddress && typeof message.operatorAddress.length === "number" || $util.isString(message.operatorAddress))) - return "operatorAddress: buffer expected"; - if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) - if (!$util.isString(message.consensusPubkey)) - return "consensusPubkey: string expected"; - if (message.jailed != null && message.hasOwnProperty("jailed")) - if (typeof message.jailed !== "boolean") - return "jailed: boolean expected"; - if (message.status != null && message.hasOwnProperty("status")) - if (!$util.isInteger(message.status)) - return "status: integer expected"; - if (message.tokens != null && message.hasOwnProperty("tokens")) - if (!$util.isString(message.tokens)) - return "tokens: string expected"; - if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) - if (!$util.isString(message.delegatorShares)) - return "delegatorShares: string expected"; - if (message.description != null && message.hasOwnProperty("description")) { - var error = $root.cosmos_sdk.x.staking.v1.Description.verify(message.description); - if (error) - return "description." + error; - } - if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) - if (!$util.isInteger(message.unbondingHeight) && !(message.unbondingHeight && $util.isInteger(message.unbondingHeight.low) && $util.isInteger(message.unbondingHeight.high))) - return "unbondingHeight: integer|Long expected"; - if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.unbondingTime); - if (error) - return "unbondingTime." + error; - } - if (message.commission != null && message.hasOwnProperty("commission")) { - var error = $root.cosmos_sdk.x.staking.v1.Commission.verify(message.commission); - if (error) - return "commission." + error; - } - if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) - if (!$util.isString(message.minSelfDelegation)) - return "minSelfDelegation: string expected"; - return null; - }; - - /** - * Creates a Validator message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.Validator - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.Validator} Validator - */ - Validator.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.Validator) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.Validator(); - if (object.operatorAddress != null) - if (typeof object.operatorAddress === "string") - $util.base64.decode(object.operatorAddress, message.operatorAddress = $util.newBuffer($util.base64.length(object.operatorAddress)), 0); - else if (object.operatorAddress.length) - message.operatorAddress = object.operatorAddress; - if (object.consensusPubkey != null) - message.consensusPubkey = String(object.consensusPubkey); - if (object.jailed != null) - message.jailed = Boolean(object.jailed); - if (object.status != null) - message.status = object.status | 0; - if (object.tokens != null) - message.tokens = String(object.tokens); - if (object.delegatorShares != null) - message.delegatorShares = String(object.delegatorShares); - if (object.description != null) { - if (typeof object.description !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.Validator.description: object expected"); - message.description = $root.cosmos_sdk.x.staking.v1.Description.fromObject(object.description); - } - if (object.unbondingHeight != null) - if ($util.Long) - (message.unbondingHeight = $util.Long.fromValue(object.unbondingHeight)).unsigned = false; - else if (typeof object.unbondingHeight === "string") - message.unbondingHeight = parseInt(object.unbondingHeight, 10); - else if (typeof object.unbondingHeight === "number") - message.unbondingHeight = object.unbondingHeight; - else if (typeof object.unbondingHeight === "object") - message.unbondingHeight = new $util.LongBits(object.unbondingHeight.low >>> 0, object.unbondingHeight.high >>> 0).toNumber(); - if (object.unbondingTime != null) { - if (typeof object.unbondingTime !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.Validator.unbondingTime: object expected"); - message.unbondingTime = $root.google.protobuf.Timestamp.fromObject(object.unbondingTime); - } - if (object.commission != null) { - if (typeof object.commission !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.Validator.commission: object expected"); - message.commission = $root.cosmos_sdk.x.staking.v1.Commission.fromObject(object.commission); - } - if (object.minSelfDelegation != null) - message.minSelfDelegation = String(object.minSelfDelegation); - return message; - }; - - /** - * Creates a plain object from a Validator message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.Validator - * @static - * @param {cosmos_sdk.x.staking.v1.Validator} message Validator - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Validator.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.operatorAddress = ""; - else { - object.operatorAddress = []; - if (options.bytes !== Array) - object.operatorAddress = $util.newBuffer(object.operatorAddress); - } - object.consensusPubkey = ""; - object.jailed = false; - object.status = 0; - object.tokens = ""; - object.delegatorShares = ""; - object.description = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.unbondingHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.unbondingHeight = options.longs === String ? "0" : 0; - object.unbondingTime = null; - object.commission = null; - object.minSelfDelegation = ""; - } - if (message.operatorAddress != null && message.hasOwnProperty("operatorAddress")) - object.operatorAddress = options.bytes === String ? $util.base64.encode(message.operatorAddress, 0, message.operatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.operatorAddress) : message.operatorAddress; - if (message.consensusPubkey != null && message.hasOwnProperty("consensusPubkey")) - object.consensusPubkey = message.consensusPubkey; - if (message.jailed != null && message.hasOwnProperty("jailed")) - object.jailed = message.jailed; - if (message.status != null && message.hasOwnProperty("status")) - object.status = message.status; - if (message.tokens != null && message.hasOwnProperty("tokens")) - object.tokens = message.tokens; - if (message.delegatorShares != null && message.hasOwnProperty("delegatorShares")) - object.delegatorShares = message.delegatorShares; - if (message.description != null && message.hasOwnProperty("description")) - object.description = $root.cosmos_sdk.x.staking.v1.Description.toObject(message.description, options); - if (message.unbondingHeight != null && message.hasOwnProperty("unbondingHeight")) - if (typeof message.unbondingHeight === "number") - object.unbondingHeight = options.longs === String ? String(message.unbondingHeight) : message.unbondingHeight; - else - object.unbondingHeight = options.longs === String ? $util.Long.prototype.toString.call(message.unbondingHeight) : options.longs === Number ? new $util.LongBits(message.unbondingHeight.low >>> 0, message.unbondingHeight.high >>> 0).toNumber() : message.unbondingHeight; - if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) - object.unbondingTime = $root.google.protobuf.Timestamp.toObject(message.unbondingTime, options); - if (message.commission != null && message.hasOwnProperty("commission")) - object.commission = $root.cosmos_sdk.x.staking.v1.Commission.toObject(message.commission, options); - if (message.minSelfDelegation != null && message.hasOwnProperty("minSelfDelegation")) - object.minSelfDelegation = message.minSelfDelegation; - return object; - }; - - /** - * Converts this Validator to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - * @returns {Object.} JSON object - */ - Validator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Validator; @@ -32302,13 +16036,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a DVPair. * @implements IDVPair * @constructor - * @param {cosmos_sdk.x.staking.v1.IDVPair=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IDVPair=} [p] Properties to set */ - function DVPair(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function DVPair(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]]; } /** @@ -32344,31 +16078,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.DVPair * @static - * @param {cosmos_sdk.x.staking.v1.IDVPair} message DVPair message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IDVPair} m DVPair message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DVPair.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); - return writer; - }; - - /** - * Encodes the specified DVPair message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @static - * @param {cosmos_sdk.x.staking.v1.IDVPair} message DVPair message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DVPair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DVPair.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(18).bytes(m.validatorAddress); + return w; }; /** @@ -32376,139 +16097,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.DVPair * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.DVPair} DVPair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DVPair.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.DVPair(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + DVPair.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.staking.v1.DVPair(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.validatorAddress = reader.bytes(); + m.validatorAddress = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a DVPair message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.DVPair} DVPair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DVPair.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DVPair message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DVPair.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) - return "validatorAddress: buffer expected"; - return null; - }; - - /** - * Creates a DVPair message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.DVPair} DVPair - */ - DVPair.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.DVPair) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.DVPair(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorAddress != null) - if (typeof object.validatorAddress === "string") - $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); - else if (object.validatorAddress.length) - message.validatorAddress = object.validatorAddress; - return message; - }; - - /** - * Creates a plain object from a DVPair message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @static - * @param {cosmos_sdk.x.staking.v1.DVPair} message DVPair - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DVPair.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorAddress = ""; - else { - object.validatorAddress = []; - if (options.bytes !== Array) - object.validatorAddress = $util.newBuffer(object.validatorAddress); - } - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; - return object; - }; - - /** - * Converts this DVPair to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @instance - * @returns {Object.} JSON object - */ - DVPair.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return DVPair; @@ -32529,14 +16142,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a DVPairs. * @implements IDVPairs * @constructor - * @param {cosmos_sdk.x.staking.v1.IDVPairs=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IDVPairs=} [p] Properties to set */ - function DVPairs(properties) { + function DVPairs(p) { this.pairs = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -32564,30 +16177,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.DVPairs * @static - * @param {cosmos_sdk.x.staking.v1.IDVPairs} message DVPairs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IDVPairs} m DVPairs message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DVPairs.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pairs != null && message.pairs.length) - for (var i = 0; i < message.pairs.length; ++i) - $root.cosmos_sdk.x.staking.v1.DVPair.encode(message.pairs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DVPairs message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @static - * @param {cosmos_sdk.x.staking.v1.IDVPairs} message DVPairs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DVPairs.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DVPairs.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.pairs != null && m.pairs.length) { + for (var i = 0; i < m.pairs.length; ++i) + $root.cosmos_sdk.x.staking.v1.DVPair.encode(m.pairs[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -32595,128 +16196,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.DVPairs * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.DVPairs} DVPairs * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DVPairs.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.DVPairs(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + DVPairs.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.staking.v1.DVPairs(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.pairs && message.pairs.length)) - message.pairs = []; - message.pairs.push($root.cosmos_sdk.x.staking.v1.DVPair.decode(reader, reader.uint32())); + if (!(m.pairs && m.pairs.length)) + m.pairs = []; + m.pairs.push($root.cosmos_sdk.x.staking.v1.DVPair.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a DVPairs message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.DVPairs} DVPairs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DVPairs.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DVPairs message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DVPairs.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pairs != null && message.hasOwnProperty("pairs")) { - if (!Array.isArray(message.pairs)) - return "pairs: array expected"; - for (var i = 0; i < message.pairs.length; ++i) { - var error = $root.cosmos_sdk.x.staking.v1.DVPair.verify(message.pairs[i]); - if (error) - return "pairs." + error; - } - } - return null; - }; - - /** - * Creates a DVPairs message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.DVPairs} DVPairs - */ - DVPairs.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.DVPairs) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.DVPairs(); - if (object.pairs) { - if (!Array.isArray(object.pairs)) - throw TypeError(".cosmos_sdk.x.staking.v1.DVPairs.pairs: array expected"); - message.pairs = []; - for (var i = 0; i < object.pairs.length; ++i) { - if (typeof object.pairs[i] !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.DVPairs.pairs: object expected"); - message.pairs[i] = $root.cosmos_sdk.x.staking.v1.DVPair.fromObject(object.pairs[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a DVPairs message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @static - * @param {cosmos_sdk.x.staking.v1.DVPairs} message DVPairs - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DVPairs.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pairs = []; - if (message.pairs && message.pairs.length) { - object.pairs = []; - for (var j = 0; j < message.pairs.length; ++j) - object.pairs[j] = $root.cosmos_sdk.x.staking.v1.DVPair.toObject(message.pairs[j], options); - } - return object; - }; - - /** - * Converts this DVPairs to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @instance - * @returns {Object.} JSON object - */ - DVPairs.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return DVPairs; @@ -32739,13 +16242,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a DVVTriplet. * @implements IDVVTriplet * @constructor - * @param {cosmos_sdk.x.staking.v1.IDVVTriplet=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IDVVTriplet=} [p] Properties to set */ - function DVVTriplet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function DVVTriplet(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]]; } /** @@ -32789,33 +16292,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.DVVTriplet * @static - * @param {cosmos_sdk.x.staking.v1.IDVVTriplet} message DVVTriplet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IDVVTriplet} m DVVTriplet message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DVVTriplet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorSrcAddress); - if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.validatorDstAddress); - return writer; - }; - - /** - * Encodes the specified DVVTriplet message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @static - * @param {cosmos_sdk.x.staking.v1.IDVVTriplet} message DVVTriplet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DVVTriplet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DVVTriplet.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.validatorSrcAddress != null && Object.hasOwnProperty.call(m, "validatorSrcAddress")) + w.uint32(18).bytes(m.validatorSrcAddress); + if (m.validatorDstAddress != null && Object.hasOwnProperty.call(m, "validatorDstAddress")) + w.uint32(26).bytes(m.validatorDstAddress); + return w; }; /** @@ -32823,159 +16313,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.DVVTriplet * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.DVVTriplet} DVVTriplet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DVVTriplet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.DVVTriplet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + DVVTriplet.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.staking.v1.DVVTriplet(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.validatorSrcAddress = reader.bytes(); + m.validatorSrcAddress = r.bytes(); break; case 3: - message.validatorDstAddress = reader.bytes(); + m.validatorDstAddress = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a DVVTriplet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.DVVTriplet} DVVTriplet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DVVTriplet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DVVTriplet message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DVVTriplet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) - if (!(message.validatorSrcAddress && typeof message.validatorSrcAddress.length === "number" || $util.isString(message.validatorSrcAddress))) - return "validatorSrcAddress: buffer expected"; - if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) - if (!(message.validatorDstAddress && typeof message.validatorDstAddress.length === "number" || $util.isString(message.validatorDstAddress))) - return "validatorDstAddress: buffer expected"; - return null; - }; - - /** - * Creates a DVVTriplet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.DVVTriplet} DVVTriplet - */ - DVVTriplet.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.DVVTriplet) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.DVVTriplet(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorSrcAddress != null) - if (typeof object.validatorSrcAddress === "string") - $util.base64.decode(object.validatorSrcAddress, message.validatorSrcAddress = $util.newBuffer($util.base64.length(object.validatorSrcAddress)), 0); - else if (object.validatorSrcAddress.length) - message.validatorSrcAddress = object.validatorSrcAddress; - if (object.validatorDstAddress != null) - if (typeof object.validatorDstAddress === "string") - $util.base64.decode(object.validatorDstAddress, message.validatorDstAddress = $util.newBuffer($util.base64.length(object.validatorDstAddress)), 0); - else if (object.validatorDstAddress.length) - message.validatorDstAddress = object.validatorDstAddress; - return message; - }; - - /** - * Creates a plain object from a DVVTriplet message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @static - * @param {cosmos_sdk.x.staking.v1.DVVTriplet} message DVVTriplet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DVVTriplet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorSrcAddress = ""; - else { - object.validatorSrcAddress = []; - if (options.bytes !== Array) - object.validatorSrcAddress = $util.newBuffer(object.validatorSrcAddress); - } - if (options.bytes === String) - object.validatorDstAddress = ""; - else { - object.validatorDstAddress = []; - if (options.bytes !== Array) - object.validatorDstAddress = $util.newBuffer(object.validatorDstAddress); - } - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) - object.validatorSrcAddress = options.bytes === String ? $util.base64.encode(message.validatorSrcAddress, 0, message.validatorSrcAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorSrcAddress) : message.validatorSrcAddress; - if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) - object.validatorDstAddress = options.bytes === String ? $util.base64.encode(message.validatorDstAddress, 0, message.validatorDstAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorDstAddress) : message.validatorDstAddress; - return object; - }; - - /** - * Converts this DVVTriplet to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @instance - * @returns {Object.} JSON object - */ - DVVTriplet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return DVVTriplet; @@ -32996,14 +16361,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a DVVTriplets. * @implements IDVVTriplets * @constructor - * @param {cosmos_sdk.x.staking.v1.IDVVTriplets=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IDVVTriplets=} [p] Properties to set */ - function DVVTriplets(properties) { + function DVVTriplets(p) { this.triplets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -33031,30 +16396,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.DVVTriplets * @static - * @param {cosmos_sdk.x.staking.v1.IDVVTriplets} message DVVTriplets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IDVVTriplets} m DVVTriplets message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DVVTriplets.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.triplets != null && message.triplets.length) - for (var i = 0; i < message.triplets.length; ++i) - $root.cosmos_sdk.x.staking.v1.DVVTriplet.encode(message.triplets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DVVTriplets message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @static - * @param {cosmos_sdk.x.staking.v1.IDVVTriplets} message DVVTriplets message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DVVTriplets.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + DVVTriplets.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.triplets != null && m.triplets.length) { + for (var i = 0; i < m.triplets.length; ++i) + $root.cosmos_sdk.x.staking.v1.DVVTriplet.encode(m.triplets[i], w.uint32(10).fork()).ldelim(); + } + return w; }; /** @@ -33062,128 +16415,30 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.DVVTriplets * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.DVVTriplets} DVVTriplets * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DVVTriplets.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.DVVTriplets(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + DVVTriplets.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.staking.v1.DVVTriplets(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - if (!(message.triplets && message.triplets.length)) - message.triplets = []; - message.triplets.push($root.cosmos_sdk.x.staking.v1.DVVTriplet.decode(reader, reader.uint32())); + if (!(m.triplets && m.triplets.length)) + m.triplets = []; + m.triplets.push($root.cosmos_sdk.x.staking.v1.DVVTriplet.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a DVVTriplets message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.DVVTriplets} DVVTriplets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DVVTriplets.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DVVTriplets message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DVVTriplets.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.triplets != null && message.hasOwnProperty("triplets")) { - if (!Array.isArray(message.triplets)) - return "triplets: array expected"; - for (var i = 0; i < message.triplets.length; ++i) { - var error = $root.cosmos_sdk.x.staking.v1.DVVTriplet.verify(message.triplets[i]); - if (error) - return "triplets." + error; - } - } - return null; - }; - - /** - * Creates a DVVTriplets message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.DVVTriplets} DVVTriplets - */ - DVVTriplets.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.DVVTriplets) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.DVVTriplets(); - if (object.triplets) { - if (!Array.isArray(object.triplets)) - throw TypeError(".cosmos_sdk.x.staking.v1.DVVTriplets.triplets: array expected"); - message.triplets = []; - for (var i = 0; i < object.triplets.length; ++i) { - if (typeof object.triplets[i] !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.DVVTriplets.triplets: object expected"); - message.triplets[i] = $root.cosmos_sdk.x.staking.v1.DVVTriplet.fromObject(object.triplets[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a DVVTriplets message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @static - * @param {cosmos_sdk.x.staking.v1.DVVTriplets} message DVVTriplets - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DVVTriplets.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.triplets = []; - if (message.triplets && message.triplets.length) { - object.triplets = []; - for (var j = 0; j < message.triplets.length; ++j) - object.triplets[j] = $root.cosmos_sdk.x.staking.v1.DVVTriplet.toObject(message.triplets[j], options); - } - return object; - }; - - /** - * Converts this DVVTriplets to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @instance - * @returns {Object.} JSON object - */ - DVVTriplets.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return DVVTriplets; @@ -33206,13 +16461,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Delegation. * @implements IDelegation * @constructor - * @param {cosmos_sdk.x.staking.v1.IDelegation=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IDelegation=} [p] Properties to set */ - function Delegation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Delegation(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]]; } /** @@ -33256,33 +16511,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.Delegation * @static - * @param {cosmos_sdk.x.staking.v1.IDelegation} message Delegation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IDelegation} m Delegation message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Delegation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); - if (message.shares != null && Object.hasOwnProperty.call(message, "shares")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.shares); - return writer; - }; - - /** - * Encodes the specified Delegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @static - * @param {cosmos_sdk.x.staking.v1.IDelegation} message Delegation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Delegation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Delegation.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(18).bytes(m.validatorAddress); + if (m.shares != null && Object.hasOwnProperty.call(m, "shares")) + w.uint32(26).string(m.shares); + return w; }; /** @@ -33290,150 +16532,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.Delegation * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.Delegation} Delegation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Delegation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Delegation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Delegation.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.staking.v1.Delegation(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.validatorAddress = reader.bytes(); + m.validatorAddress = r.bytes(); break; case 3: - message.shares = reader.string(); + m.shares = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Delegation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.Delegation} Delegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Delegation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Delegation message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Delegation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) - return "validatorAddress: buffer expected"; - if (message.shares != null && message.hasOwnProperty("shares")) - if (!$util.isString(message.shares)) - return "shares: string expected"; - return null; - }; - - /** - * Creates a Delegation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.Delegation} Delegation - */ - Delegation.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.Delegation) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.Delegation(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorAddress != null) - if (typeof object.validatorAddress === "string") - $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); - else if (object.validatorAddress.length) - message.validatorAddress = object.validatorAddress; - if (object.shares != null) - message.shares = String(object.shares); - return message; - }; - - /** - * Creates a plain object from a Delegation message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @static - * @param {cosmos_sdk.x.staking.v1.Delegation} message Delegation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Delegation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorAddress = ""; - else { - object.validatorAddress = []; - if (options.bytes !== Array) - object.validatorAddress = $util.newBuffer(object.validatorAddress); - } - object.shares = ""; - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; - if (message.shares != null && message.hasOwnProperty("shares")) - object.shares = message.shares; - return object; - }; - - /** - * Converts this Delegation to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @instance - * @returns {Object.} JSON object - */ - Delegation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Delegation; @@ -33456,14 +16582,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an UnbondingDelegation. * @implements IUnbondingDelegation * @constructor - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation=} [p] Properties to set */ - function UnbondingDelegation(properties) { + function UnbondingDelegation(p) { this.entries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -33507,34 +16633,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation * @static - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation} m UnbondingDelegation message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbondingDelegation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.validatorAddress != null && Object.hasOwnProperty.call(message, "validatorAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorAddress); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.encode(message.entries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UnbondingDelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @static - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation} message UnbondingDelegation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnbondingDelegation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + UnbondingDelegation.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) + w.uint32(18).bytes(m.validatorAddress); + if (m.entries != null && m.entries.length) { + for (var i = 0; i < m.entries.length; ++i) + $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.encode(m.entries[i], w.uint32(26).fork()).ldelim(); + } + return w; }; /** @@ -33542,170 +16656,36 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegation} UnbondingDelegation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbondingDelegation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.UnbondingDelegation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + UnbondingDelegation.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.staking.v1.UnbondingDelegation(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.validatorAddress = reader.bytes(); + m.validatorAddress = r.bytes(); break; case 3: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.decode(reader, reader.uint32())); + if (!(m.entries && m.entries.length)) + m.entries = []; + m.entries.push($root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an UnbondingDelegation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegation} UnbondingDelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnbondingDelegation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnbondingDelegation message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnbondingDelegation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - if (!(message.validatorAddress && typeof message.validatorAddress.length === "number" || $util.isString(message.validatorAddress))) - return "validatorAddress: buffer expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - return null; - }; - - /** - * Creates an UnbondingDelegation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegation} UnbondingDelegation - */ - UnbondingDelegation.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.UnbondingDelegation) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.UnbondingDelegation(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorAddress != null) - if (typeof object.validatorAddress === "string") - $util.base64.decode(object.validatorAddress, message.validatorAddress = $util.newBuffer($util.base64.length(object.validatorAddress)), 0); - else if (object.validatorAddress.length) - message.validatorAddress = object.validatorAddress; - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".cosmos_sdk.x.staking.v1.UnbondingDelegation.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.UnbondingDelegation.entries: object expected"); - message.entries[i] = $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.fromObject(object.entries[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an UnbondingDelegation message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @static - * @param {cosmos_sdk.x.staking.v1.UnbondingDelegation} message UnbondingDelegation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnbondingDelegation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorAddress = ""; - else { - object.validatorAddress = []; - if (options.bytes !== Array) - object.validatorAddress = $util.newBuffer(object.validatorAddress); - } - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorAddress != null && message.hasOwnProperty("validatorAddress")) - object.validatorAddress = options.bytes === String ? $util.base64.encode(message.validatorAddress, 0, message.validatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorAddress) : message.validatorAddress; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.toObject(message.entries[j], options); - } - return object; - }; - - /** - * Converts this UnbondingDelegation to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @instance - * @returns {Object.} JSON object - */ - UnbondingDelegation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return UnbondingDelegation; @@ -33729,13 +16709,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents an UnbondingDelegationEntry. * @implements IUnbondingDelegationEntry * @constructor - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry=} [p] Properties to set */ - function UnbondingDelegationEntry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function UnbondingDelegationEntry(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]]; } /** @@ -33787,35 +16767,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry * @static - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry} m UnbondingDelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UnbondingDelegationEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); - if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) - $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); - if (message.balance != null && Object.hasOwnProperty.call(message, "balance")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.balance); - return writer; - }; - - /** - * Encodes the specified UnbondingDelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @static - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry} message UnbondingDelegationEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnbondingDelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + UnbondingDelegationEntry.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.creationHeight != null && Object.hasOwnProperty.call(m, "creationHeight")) + w.uint32(8).int64(m.creationHeight); + if (m.completionTime != null && Object.hasOwnProperty.call(m, "completionTime")) + $root.google.protobuf.Timestamp.encode(m.completionTime, w.uint32(18).fork()).ldelim(); + if (m.initialBalance != null && Object.hasOwnProperty.call(m, "initialBalance")) + w.uint32(26).string(m.initialBalance); + if (m.balance != null && Object.hasOwnProperty.call(m, "balance")) + w.uint32(34).string(m.balance); + return w; }; /** @@ -33823,162 +16790,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} UnbondingDelegationEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UnbondingDelegationEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + UnbondingDelegationEntry.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.staking.v1.UnbondingDelegationEntry(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.creationHeight = reader.int64(); + m.creationHeight = r.int64(); break; case 2: - message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.completionTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 3: - message.initialBalance = reader.string(); + m.initialBalance = r.string(); break; case 4: - message.balance = reader.string(); + m.balance = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an UnbondingDelegationEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} UnbondingDelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnbondingDelegationEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnbondingDelegationEntry message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnbondingDelegationEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) - if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) - return "creationHeight: integer|Long expected"; - if (message.completionTime != null && message.hasOwnProperty("completionTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.completionTime); - if (error) - return "completionTime." + error; - } - if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) - if (!$util.isString(message.initialBalance)) - return "initialBalance: string expected"; - if (message.balance != null && message.hasOwnProperty("balance")) - if (!$util.isString(message.balance)) - return "balance: string expected"; - return null; - }; - - /** - * Creates an UnbondingDelegationEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} UnbondingDelegationEntry - */ - UnbondingDelegationEntry.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry(); - if (object.creationHeight != null) - if ($util.Long) - (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; - else if (typeof object.creationHeight === "string") - message.creationHeight = parseInt(object.creationHeight, 10); - else if (typeof object.creationHeight === "number") - message.creationHeight = object.creationHeight; - else if (typeof object.creationHeight === "object") - message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); - if (object.completionTime != null) { - if (typeof object.completionTime !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.completionTime: object expected"); - message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); - } - if (object.initialBalance != null) - message.initialBalance = String(object.initialBalance); - if (object.balance != null) - message.balance = String(object.balance); - return message; - }; - - /** - * Creates a plain object from an UnbondingDelegationEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @static - * @param {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} message UnbondingDelegationEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnbondingDelegationEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.creationHeight = options.longs === String ? "0" : 0; - object.completionTime = null; - object.initialBalance = ""; - object.balance = ""; - } - if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) - if (typeof message.creationHeight === "number") - object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; - else - object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; - if (message.completionTime != null && message.hasOwnProperty("completionTime")) - object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); - if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) - object.initialBalance = message.initialBalance; - if (message.balance != null && message.hasOwnProperty("balance")) - object.balance = message.balance; - return object; - }; - - /** - * Converts this UnbondingDelegationEntry to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @instance - * @returns {Object.} JSON object - */ - UnbondingDelegationEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return UnbondingDelegationEntry; @@ -34002,13 +16844,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a RedelegationEntry. * @implements IRedelegationEntry * @constructor - * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry=} [p] Properties to set */ - function RedelegationEntry(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function RedelegationEntry(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]]; } /** @@ -34060,35 +16902,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry * @static - * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry} message RedelegationEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry} m RedelegationEntry message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RedelegationEntry.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.creationHeight != null && Object.hasOwnProperty.call(message, "creationHeight")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.creationHeight); - if (message.completionTime != null && Object.hasOwnProperty.call(message, "completionTime")) - $root.google.protobuf.Timestamp.encode(message.completionTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.initialBalance != null && Object.hasOwnProperty.call(message, "initialBalance")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.initialBalance); - if (message.sharesDst != null && Object.hasOwnProperty.call(message, "sharesDst")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.sharesDst); - return writer; - }; - - /** - * Encodes the specified RedelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @static - * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry} message RedelegationEntry message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedelegationEntry.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RedelegationEntry.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.creationHeight != null && Object.hasOwnProperty.call(m, "creationHeight")) + w.uint32(8).int64(m.creationHeight); + if (m.completionTime != null && Object.hasOwnProperty.call(m, "completionTime")) + $root.google.protobuf.Timestamp.encode(m.completionTime, w.uint32(18).fork()).ldelim(); + if (m.initialBalance != null && Object.hasOwnProperty.call(m, "initialBalance")) + w.uint32(26).string(m.initialBalance); + if (m.sharesDst != null && Object.hasOwnProperty.call(m, "sharesDst")) + w.uint32(34).string(m.sharesDst); + return w; }; /** @@ -34096,162 +16925,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.RedelegationEntry} RedelegationEntry * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RedelegationEntry.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.RedelegationEntry(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + RedelegationEntry.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.staking.v1.RedelegationEntry(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.creationHeight = reader.int64(); + m.creationHeight = r.int64(); break; case 2: - message.completionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.completionTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 3: - message.initialBalance = reader.string(); + m.initialBalance = r.string(); break; case 4: - message.sharesDst = reader.string(); + m.sharesDst = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RedelegationEntry message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.RedelegationEntry} RedelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedelegationEntry.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RedelegationEntry message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RedelegationEntry.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) - if (!$util.isInteger(message.creationHeight) && !(message.creationHeight && $util.isInteger(message.creationHeight.low) && $util.isInteger(message.creationHeight.high))) - return "creationHeight: integer|Long expected"; - if (message.completionTime != null && message.hasOwnProperty("completionTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.completionTime); - if (error) - return "completionTime." + error; - } - if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) - if (!$util.isString(message.initialBalance)) - return "initialBalance: string expected"; - if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) - if (!$util.isString(message.sharesDst)) - return "sharesDst: string expected"; - return null; - }; - - /** - * Creates a RedelegationEntry message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.RedelegationEntry} RedelegationEntry - */ - RedelegationEntry.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.RedelegationEntry) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.RedelegationEntry(); - if (object.creationHeight != null) - if ($util.Long) - (message.creationHeight = $util.Long.fromValue(object.creationHeight)).unsigned = false; - else if (typeof object.creationHeight === "string") - message.creationHeight = parseInt(object.creationHeight, 10); - else if (typeof object.creationHeight === "number") - message.creationHeight = object.creationHeight; - else if (typeof object.creationHeight === "object") - message.creationHeight = new $util.LongBits(object.creationHeight.low >>> 0, object.creationHeight.high >>> 0).toNumber(); - if (object.completionTime != null) { - if (typeof object.completionTime !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.RedelegationEntry.completionTime: object expected"); - message.completionTime = $root.google.protobuf.Timestamp.fromObject(object.completionTime); - } - if (object.initialBalance != null) - message.initialBalance = String(object.initialBalance); - if (object.sharesDst != null) - message.sharesDst = String(object.sharesDst); - return message; - }; - - /** - * Creates a plain object from a RedelegationEntry message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @static - * @param {cosmos_sdk.x.staking.v1.RedelegationEntry} message RedelegationEntry - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RedelegationEntry.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.creationHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.creationHeight = options.longs === String ? "0" : 0; - object.completionTime = null; - object.initialBalance = ""; - object.sharesDst = ""; - } - if (message.creationHeight != null && message.hasOwnProperty("creationHeight")) - if (typeof message.creationHeight === "number") - object.creationHeight = options.longs === String ? String(message.creationHeight) : message.creationHeight; - else - object.creationHeight = options.longs === String ? $util.Long.prototype.toString.call(message.creationHeight) : options.longs === Number ? new $util.LongBits(message.creationHeight.low >>> 0, message.creationHeight.high >>> 0).toNumber() : message.creationHeight; - if (message.completionTime != null && message.hasOwnProperty("completionTime")) - object.completionTime = $root.google.protobuf.Timestamp.toObject(message.completionTime, options); - if (message.initialBalance != null && message.hasOwnProperty("initialBalance")) - object.initialBalance = message.initialBalance; - if (message.sharesDst != null && message.hasOwnProperty("sharesDst")) - object.sharesDst = message.sharesDst; - return object; - }; - - /** - * Converts this RedelegationEntry to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @instance - * @returns {Object.} JSON object - */ - RedelegationEntry.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RedelegationEntry; @@ -34275,14 +16979,14 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Redelegation. * @implements IRedelegation * @constructor - * @param {cosmos_sdk.x.staking.v1.IRedelegation=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IRedelegation=} [p] Properties to set */ - function Redelegation(properties) { + function Redelegation(p) { this.entries = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -34334,36 +17038,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.Redelegation * @static - * @param {cosmos_sdk.x.staking.v1.IRedelegation} message Redelegation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IRedelegation} m Redelegation message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Redelegation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.delegatorAddress != null && Object.hasOwnProperty.call(message, "delegatorAddress")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.delegatorAddress); - if (message.validatorSrcAddress != null && Object.hasOwnProperty.call(message, "validatorSrcAddress")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.validatorSrcAddress); - if (message.validatorDstAddress != null && Object.hasOwnProperty.call(message, "validatorDstAddress")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.validatorDstAddress); - if (message.entries != null && message.entries.length) - for (var i = 0; i < message.entries.length; ++i) - $root.cosmos_sdk.x.staking.v1.RedelegationEntry.encode(message.entries[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Redelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @static - * @param {cosmos_sdk.x.staking.v1.IRedelegation} message Redelegation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Redelegation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Redelegation.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) + w.uint32(10).bytes(m.delegatorAddress); + if (m.validatorSrcAddress != null && Object.hasOwnProperty.call(m, "validatorSrcAddress")) + w.uint32(18).bytes(m.validatorSrcAddress); + if (m.validatorDstAddress != null && Object.hasOwnProperty.call(m, "validatorDstAddress")) + w.uint32(26).bytes(m.validatorDstAddress); + if (m.entries != null && m.entries.length) { + for (var i = 0; i < m.entries.length; ++i) + $root.cosmos_sdk.x.staking.v1.RedelegationEntry.encode(m.entries[i], w.uint32(34).fork()).ldelim(); + } + return w; }; /** @@ -34371,190 +17063,39 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.Redelegation * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.Redelegation} Redelegation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Redelegation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Redelegation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Redelegation.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.staking.v1.Redelegation(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.delegatorAddress = reader.bytes(); + m.delegatorAddress = r.bytes(); break; case 2: - message.validatorSrcAddress = reader.bytes(); + m.validatorSrcAddress = r.bytes(); break; case 3: - message.validatorDstAddress = reader.bytes(); + m.validatorDstAddress = r.bytes(); break; case 4: - if (!(message.entries && message.entries.length)) - message.entries = []; - message.entries.push($root.cosmos_sdk.x.staking.v1.RedelegationEntry.decode(reader, reader.uint32())); + if (!(m.entries && m.entries.length)) + m.entries = []; + m.entries.push($root.cosmos_sdk.x.staking.v1.RedelegationEntry.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Redelegation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.Redelegation} Redelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Redelegation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Redelegation message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Redelegation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - if (!(message.delegatorAddress && typeof message.delegatorAddress.length === "number" || $util.isString(message.delegatorAddress))) - return "delegatorAddress: buffer expected"; - if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) - if (!(message.validatorSrcAddress && typeof message.validatorSrcAddress.length === "number" || $util.isString(message.validatorSrcAddress))) - return "validatorSrcAddress: buffer expected"; - if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) - if (!(message.validatorDstAddress && typeof message.validatorDstAddress.length === "number" || $util.isString(message.validatorDstAddress))) - return "validatorDstAddress: buffer expected"; - if (message.entries != null && message.hasOwnProperty("entries")) { - if (!Array.isArray(message.entries)) - return "entries: array expected"; - for (var i = 0; i < message.entries.length; ++i) { - var error = $root.cosmos_sdk.x.staking.v1.RedelegationEntry.verify(message.entries[i]); - if (error) - return "entries." + error; - } - } - return null; - }; - - /** - * Creates a Redelegation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.Redelegation} Redelegation - */ - Redelegation.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.Redelegation) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.Redelegation(); - if (object.delegatorAddress != null) - if (typeof object.delegatorAddress === "string") - $util.base64.decode(object.delegatorAddress, message.delegatorAddress = $util.newBuffer($util.base64.length(object.delegatorAddress)), 0); - else if (object.delegatorAddress.length) - message.delegatorAddress = object.delegatorAddress; - if (object.validatorSrcAddress != null) - if (typeof object.validatorSrcAddress === "string") - $util.base64.decode(object.validatorSrcAddress, message.validatorSrcAddress = $util.newBuffer($util.base64.length(object.validatorSrcAddress)), 0); - else if (object.validatorSrcAddress.length) - message.validatorSrcAddress = object.validatorSrcAddress; - if (object.validatorDstAddress != null) - if (typeof object.validatorDstAddress === "string") - $util.base64.decode(object.validatorDstAddress, message.validatorDstAddress = $util.newBuffer($util.base64.length(object.validatorDstAddress)), 0); - else if (object.validatorDstAddress.length) - message.validatorDstAddress = object.validatorDstAddress; - if (object.entries) { - if (!Array.isArray(object.entries)) - throw TypeError(".cosmos_sdk.x.staking.v1.Redelegation.entries: array expected"); - message.entries = []; - for (var i = 0; i < object.entries.length; ++i) { - if (typeof object.entries[i] !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.Redelegation.entries: object expected"); - message.entries[i] = $root.cosmos_sdk.x.staking.v1.RedelegationEntry.fromObject(object.entries[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Redelegation message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @static - * @param {cosmos_sdk.x.staking.v1.Redelegation} message Redelegation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Redelegation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.entries = []; - if (options.defaults) { - if (options.bytes === String) - object.delegatorAddress = ""; - else { - object.delegatorAddress = []; - if (options.bytes !== Array) - object.delegatorAddress = $util.newBuffer(object.delegatorAddress); - } - if (options.bytes === String) - object.validatorSrcAddress = ""; - else { - object.validatorSrcAddress = []; - if (options.bytes !== Array) - object.validatorSrcAddress = $util.newBuffer(object.validatorSrcAddress); - } - if (options.bytes === String) - object.validatorDstAddress = ""; - else { - object.validatorDstAddress = []; - if (options.bytes !== Array) - object.validatorDstAddress = $util.newBuffer(object.validatorDstAddress); - } - } - if (message.delegatorAddress != null && message.hasOwnProperty("delegatorAddress")) - object.delegatorAddress = options.bytes === String ? $util.base64.encode(message.delegatorAddress, 0, message.delegatorAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.delegatorAddress) : message.delegatorAddress; - if (message.validatorSrcAddress != null && message.hasOwnProperty("validatorSrcAddress")) - object.validatorSrcAddress = options.bytes === String ? $util.base64.encode(message.validatorSrcAddress, 0, message.validatorSrcAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorSrcAddress) : message.validatorSrcAddress; - if (message.validatorDstAddress != null && message.hasOwnProperty("validatorDstAddress")) - object.validatorDstAddress = options.bytes === String ? $util.base64.encode(message.validatorDstAddress, 0, message.validatorDstAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorDstAddress) : message.validatorDstAddress; - if (message.entries && message.entries.length) { - object.entries = []; - for (var j = 0; j < message.entries.length; ++j) - object.entries[j] = $root.cosmos_sdk.x.staking.v1.RedelegationEntry.toObject(message.entries[j], options); - } - return object; - }; - - /** - * Converts this Redelegation to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @instance - * @returns {Object.} JSON object - */ - Redelegation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Redelegation; @@ -34579,13 +17120,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Params. * @implements IParams * @constructor - * @param {cosmos_sdk.x.staking.v1.IParams=} [properties] Properties to set + * @param {cosmos_sdk.x.staking.v1.IParams=} [p] Properties to set */ - function Params(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Params(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]]; } /** @@ -34645,37 +17186,24 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.staking.v1.Params * @static - * @param {cosmos_sdk.x.staking.v1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.staking.v1.IParams} m Params message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Params.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.unbondingTime != null && Object.hasOwnProperty.call(message, "unbondingTime")) - $root.google.protobuf.Duration.encode(message.unbondingTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.maxValidators != null && Object.hasOwnProperty.call(message, "maxValidators")) - writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.maxValidators); - if (message.maxEntries != null && Object.hasOwnProperty.call(message, "maxEntries")) - writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.maxEntries); - if (message.historicalEntries != null && Object.hasOwnProperty.call(message, "historicalEntries")) - writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.historicalEntries); - if (message.bondDenom != null && Object.hasOwnProperty.call(message, "bondDenom")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.bondDenom); - return writer; - }; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Params - * @static - * @param {cosmos_sdk.x.staking.v1.IParams} message Params message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Params.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.unbondingTime != null && Object.hasOwnProperty.call(m, "unbondingTime")) + $root.google.protobuf.Duration.encode(m.unbondingTime, w.uint32(10).fork()).ldelim(); + if (m.maxValidators != null && Object.hasOwnProperty.call(m, "maxValidators")) + w.uint32(16).uint32(m.maxValidators); + if (m.maxEntries != null && Object.hasOwnProperty.call(m, "maxEntries")) + w.uint32(24).uint32(m.maxEntries); + if (m.historicalEntries != null && Object.hasOwnProperty.call(m, "historicalEntries")) + w.uint32(32).uint32(m.historicalEntries); + if (m.bondDenom != null && Object.hasOwnProperty.call(m, "bondDenom")) + w.uint32(42).string(m.bondDenom); + return w; }; /** @@ -34683,159 +17211,40 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.staking.v1.Params * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.staking.v1.Params} Params * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Params.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.staking.v1.Params(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Params.decode = function decode(r, l) { + if (!(r instanceof $Reader)) + r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, m = new $root.cosmos_sdk.x.staking.v1.Params(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.unbondingTime = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + m.unbondingTime = $root.google.protobuf.Duration.decode(r, r.uint32()); break; case 2: - message.maxValidators = reader.uint32(); + m.maxValidators = r.uint32(); break; case 3: - message.maxEntries = reader.uint32(); + m.maxEntries = r.uint32(); break; case 4: - message.historicalEntries = reader.uint32(); + m.historicalEntries = r.uint32(); break; case 5: - message.bondDenom = reader.string(); + m.bondDenom = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.staking.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.staking.v1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Params message. - * @function verify - * @memberof cosmos_sdk.x.staking.v1.Params - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Params.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) { - var error = $root.google.protobuf.Duration.verify(message.unbondingTime); - if (error) - return "unbondingTime." + error; - } - if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) - if (!$util.isInteger(message.maxValidators)) - return "maxValidators: integer expected"; - if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) - if (!$util.isInteger(message.maxEntries)) - return "maxEntries: integer expected"; - if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) - if (!$util.isInteger(message.historicalEntries)) - return "historicalEntries: integer expected"; - if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) - if (!$util.isString(message.bondDenom)) - return "bondDenom: string expected"; - return null; - }; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.staking.v1.Params - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.staking.v1.Params} Params - */ - Params.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.staking.v1.Params) - return object; - var message = new $root.cosmos_sdk.x.staking.v1.Params(); - if (object.unbondingTime != null) { - if (typeof object.unbondingTime !== "object") - throw TypeError(".cosmos_sdk.x.staking.v1.Params.unbondingTime: object expected"); - message.unbondingTime = $root.google.protobuf.Duration.fromObject(object.unbondingTime); - } - if (object.maxValidators != null) - message.maxValidators = object.maxValidators >>> 0; - if (object.maxEntries != null) - message.maxEntries = object.maxEntries >>> 0; - if (object.historicalEntries != null) - message.historicalEntries = object.historicalEntries >>> 0; - if (object.bondDenom != null) - message.bondDenom = String(object.bondDenom); - return message; - }; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.staking.v1.Params - * @static - * @param {cosmos_sdk.x.staking.v1.Params} message Params - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Params.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.unbondingTime = null; - object.maxValidators = 0; - object.maxEntries = 0; - object.historicalEntries = 0; - object.bondDenom = ""; - } - if (message.unbondingTime != null && message.hasOwnProperty("unbondingTime")) - object.unbondingTime = $root.google.protobuf.Duration.toObject(message.unbondingTime, options); - if (message.maxValidators != null && message.hasOwnProperty("maxValidators")) - object.maxValidators = message.maxValidators; - if (message.maxEntries != null && message.hasOwnProperty("maxEntries")) - object.maxEntries = message.maxEntries; - if (message.historicalEntries != null && message.hasOwnProperty("historicalEntries")) - object.historicalEntries = message.historicalEntries; - if (message.bondDenom != null && message.hasOwnProperty("bondDenom")) - object.bondDenom = message.bondDenom; - return object; - }; - - /** - * Converts this Params to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.staking.v1.Params - * @instance - * @returns {Object.} JSON object - */ - Params.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Params; @@ -34883,13 +17292,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a Plan. * @implements IPlan * @constructor - * @param {cosmos_sdk.x.upgrade.v1.IPlan=} [properties] Properties to set + * @param {cosmos_sdk.x.upgrade.v1.IPlan=} [p] Properties to set */ - function Plan(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function Plan(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]]; } /** @@ -34941,35 +17350,22 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.upgrade.v1.Plan * @static - * @param {cosmos_sdk.x.upgrade.v1.IPlan} message Plan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.upgrade.v1.IPlan} m Plan message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Plan.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) - $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); - return writer; - }; - - /** - * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @static - * @param {cosmos_sdk.x.upgrade.v1.IPlan} message Plan message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Plan.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + Plan.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.name != null && Object.hasOwnProperty.call(m, "name")) + w.uint32(10).string(m.name); + if (m.time != null && Object.hasOwnProperty.call(m, "time")) + $root.google.protobuf.Timestamp.encode(m.time, w.uint32(18).fork()).ldelim(); + if (m.height != null && Object.hasOwnProperty.call(m, "height")) + w.uint32(24).int64(m.height); + if (m.info != null && Object.hasOwnProperty.call(m, "info")) + w.uint32(34).string(m.info); + return w; }; /** @@ -34977,162 +17373,37 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.upgrade.v1.Plan * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.upgrade.v1.Plan} Plan * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Plan.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.upgrade.v1.Plan(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + Plan.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.upgrade.v1.Plan(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.name = reader.string(); + m.name = r.string(); break; case 2: - message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 3: - message.height = reader.int64(); + m.height = r.int64(); break; case 4: - message.info = reader.string(); + m.info = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Plan message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.upgrade.v1.Plan} Plan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Plan.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Plan message. - * @function verify - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Plan.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.time != null && message.hasOwnProperty("time")) { - var error = $root.google.protobuf.Timestamp.verify(message.time); - if (error) - return "time." + error; - } - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) - return "height: integer|Long expected"; - if (message.info != null && message.hasOwnProperty("info")) - if (!$util.isString(message.info)) - return "info: string expected"; - return null; - }; - - /** - * Creates a Plan message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.upgrade.v1.Plan} Plan - */ - Plan.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.upgrade.v1.Plan) - return object; - var message = new $root.cosmos_sdk.x.upgrade.v1.Plan(); - if (object.name != null) - message.name = String(object.name); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".cosmos_sdk.x.upgrade.v1.Plan.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.height != null) - if ($util.Long) - (message.height = $util.Long.fromValue(object.height)).unsigned = false; - else if (typeof object.height === "string") - message.height = parseInt(object.height, 10); - else if (typeof object.height === "number") - message.height = object.height; - else if (typeof object.height === "object") - message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); - if (object.info != null) - message.info = String(object.info); - return message; - }; - - /** - * Creates a plain object from a Plan message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @static - * @param {cosmos_sdk.x.upgrade.v1.Plan} message Plan - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Plan.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.time = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.info = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.time != null && message.hasOwnProperty("time")) - object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height === "number") - object.height = options.longs === String ? String(message.height) : message.height; - else - object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; - if (message.info != null && message.hasOwnProperty("info")) - object.info = message.info; - return object; - }; - - /** - * Converts this Plan to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @instance - * @returns {Object.} JSON object - */ - Plan.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Plan; @@ -35155,13 +17426,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a SoftwareUpgradeProposal. * @implements ISoftwareUpgradeProposal * @constructor - * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal=} [properties] Properties to set + * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal=} [p] Properties to set */ - function SoftwareUpgradeProposal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function SoftwareUpgradeProposal(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]]; } /** @@ -35205,33 +17476,20 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal * @static - * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal} message SoftwareUpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal} m SoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SoftwareUpgradeProposal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.plan != null && Object.hasOwnProperty.call(message, "plan")) - $root.cosmos_sdk.x.upgrade.v1.Plan.encode(message.plan, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @static - * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal} message SoftwareUpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwareUpgradeProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + SoftwareUpgradeProposal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.title != null && Object.hasOwnProperty.call(m, "title")) + w.uint32(10).string(m.title); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + w.uint32(18).string(m.description); + if (m.plan != null && Object.hasOwnProperty.call(m, "plan")) + $root.cosmos_sdk.x.upgrade.v1.Plan.encode(m.plan, w.uint32(26).fork()).ldelim(); + return w; }; /** @@ -35239,137 +17497,34 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} SoftwareUpgradeProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SoftwareUpgradeProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + SoftwareUpgradeProposal.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.upgrade.v1.SoftwareUpgradeProposal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.title = reader.string(); + m.title = r.string(); break; case 2: - message.description = reader.string(); + m.description = r.string(); break; case 3: - message.plan = $root.cosmos_sdk.x.upgrade.v1.Plan.decode(reader, reader.uint32()); + m.plan = $root.cosmos_sdk.x.upgrade.v1.Plan.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} SoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwareUpgradeProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SoftwareUpgradeProposal message. - * @function verify - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SoftwareUpgradeProposal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.plan != null && message.hasOwnProperty("plan")) { - var error = $root.cosmos_sdk.x.upgrade.v1.Plan.verify(message.plan); - if (error) - return "plan." + error; - } - return null; - }; - - /** - * Creates a SoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} SoftwareUpgradeProposal - */ - SoftwareUpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal) - return object; - var message = new $root.cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - if (object.plan != null) { - if (typeof object.plan !== "object") - throw TypeError(".cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.plan: object expected"); - message.plan = $root.cosmos_sdk.x.upgrade.v1.Plan.fromObject(object.plan); - } - return message; - }; - - /** - * Creates a plain object from a SoftwareUpgradeProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @static - * @param {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} message SoftwareUpgradeProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SoftwareUpgradeProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - object.plan = null; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.plan != null && message.hasOwnProperty("plan")) - object.plan = $root.cosmos_sdk.x.upgrade.v1.Plan.toObject(message.plan, options); - return object; - }; - - /** - * Converts this SoftwareUpgradeProposal to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - SoftwareUpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return SoftwareUpgradeProposal; @@ -35391,13 +17546,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a CancelSoftwareUpgradeProposal. * @implements ICancelSoftwareUpgradeProposal * @constructor - * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal=} [properties] Properties to set + * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal=} [p] Properties to set */ - function CancelSoftwareUpgradeProposal(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function CancelSoftwareUpgradeProposal(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]]; } /** @@ -35433,31 +17588,18 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal * @static - * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal} m CancelSoftwareUpgradeProposal message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CancelSoftwareUpgradeProposal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.title != null && Object.hasOwnProperty.call(message, "title")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.title); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelSoftwareUpgradeProposal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + CancelSoftwareUpgradeProposal.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.title != null && Object.hasOwnProperty.call(m, "title")) + w.uint32(10).string(m.title); + if (m.description != null && Object.hasOwnProperty.call(m, "description")) + w.uint32(18).string(m.description); + return w; }; /** @@ -35465,121 +17607,31 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CancelSoftwareUpgradeProposal.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + CancelSoftwareUpgradeProposal.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.upgrade.v1.CancelSoftwareUpgradeProposal(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.title = reader.string(); + m.title = r.string(); break; case 2: - message.description = reader.string(); + m.description = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelSoftwareUpgradeProposal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CancelSoftwareUpgradeProposal message. - * @function verify - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CancelSoftwareUpgradeProposal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.title != null && message.hasOwnProperty("title")) - if (!$util.isString(message.title)) - return "title: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a CancelSoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal - */ - CancelSoftwareUpgradeProposal.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal) - return object; - var message = new $root.cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal(); - if (object.title != null) - message.title = String(object.title); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a CancelSoftwareUpgradeProposal message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} message CancelSoftwareUpgradeProposal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CancelSoftwareUpgradeProposal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.title = ""; - object.description = ""; - } - if (message.title != null && message.hasOwnProperty("title")) - object.title = message.title; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this CancelSoftwareUpgradeProposal to JSON. - * @function toJSON - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @instance - * @returns {Object.} JSON object - */ - CancelSoftwareUpgradeProposal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return CancelSoftwareUpgradeProposal; @@ -35636,13 +17688,13 @@ $root.cosmos_sdk = (function() { * @classdesc Represents a MsgCreateClient. * @implements IMsgCreateClient * @constructor - * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient=} [properties] Properties to set + * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient=} [p] Properties to set */ - function MsgCreateClient(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MsgCreateClient(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]]; } /** @@ -35670,29 +17722,16 @@ $root.cosmos_sdk = (function() { * @function encode * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient * @static - * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient} m MsgCreateClient message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MsgCreateClient.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.signer != null && Object.hasOwnProperty.call(message, "signer")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.signer); - return writer; - }; - - /** - * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. - * @function encodeDelimited - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @static - * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient} message MsgCreateClient message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateClient.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MsgCreateClient.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) + w.uint32(10).bytes(m.signer); + return w; }; /** @@ -35700,118 +17739,28 @@ $root.cosmos_sdk = (function() { * @function decode * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} MsgCreateClient * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MsgCreateClient.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.cosmos_sdk.ibc.localhost.v1.MsgCreateClient(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + MsgCreateClient.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.ibc.localhost.v1.MsgCreateClient(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { case 1: - message.signer = reader.bytes(); + m.signer = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} MsgCreateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateClient.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MsgCreateClient message. - * @function verify - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MsgCreateClient.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.signer != null && message.hasOwnProperty("signer")) - if (!(message.signer && typeof message.signer.length === "number" || $util.isString(message.signer))) - return "signer: buffer expected"; - return null; - }; - - /** - * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @static - * @param {Object.} object Plain object - * @returns {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} MsgCreateClient - */ - MsgCreateClient.fromObject = function fromObject(object) { - if (object instanceof $root.cosmos_sdk.ibc.localhost.v1.MsgCreateClient) - return object; - var message = new $root.cosmos_sdk.ibc.localhost.v1.MsgCreateClient(); - if (object.signer != null) - if (typeof object.signer === "string") - $util.base64.decode(object.signer, message.signer = $util.newBuffer($util.base64.length(object.signer)), 0); - else if (object.signer.length) - message.signer = object.signer; - return message; - }; - - /** - * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. - * @function toObject - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @static - * @param {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} message MsgCreateClient - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MsgCreateClient.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.signer = ""; - else { - object.signer = []; - if (options.bytes !== Array) - object.signer = $util.newBuffer(object.signer); - } - if (message.signer != null && message.hasOwnProperty("signer")) - object.signer = options.bytes === String ? $util.base64.encode(message.signer, 0, message.signer.length) : options.bytes === Array ? Array.prototype.slice.call(message.signer) : message.signer; - return object; - }; - - /** - * Converts this MsgCreateClient to JSON. - * @function toJSON - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @instance - * @returns {Object.} JSON object - */ - MsgCreateClient.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MsgCreateClient; @@ -35905,13 +17854,13 @@ $root.tendermint = (function() { * @classdesc Represents a Request. * @implements IRequest * @constructor - * @param {tendermint.abci.types.IRequest=} [properties] Properties to set + * @param {tendermint.abci.types.IRequest=} [p] Properties to set */ - function Request(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -36033,49 +17982,36 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.Request * @static - * @param {tendermint.abci.types.IRequest} message Request message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequest} m Request message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Request.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) - $root.tendermint.abci.types.RequestEcho.encode(message.echo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) - $root.tendermint.abci.types.RequestFlush.encode(message.flush, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.tendermint.abci.types.RequestInfo.encode(message.info, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) - $root.tendermint.abci.types.RequestSetOption.encode(message.setOption, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) - $root.tendermint.abci.types.RequestInitChain.encode(message.initChain, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.tendermint.abci.types.RequestQuery.encode(message.query, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) - $root.tendermint.abci.types.RequestBeginBlock.encode(message.beginBlock, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) - $root.tendermint.abci.types.RequestCheckTx.encode(message.checkTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) - $root.tendermint.abci.types.RequestEndBlock.encode(message.endBlock, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) - $root.tendermint.abci.types.RequestCommit.encode(message.commit, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) - $root.tendermint.abci.types.RequestDeliverTx.encode(message.deliverTx, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.Request - * @static - * @param {tendermint.abci.types.IRequest} message Request message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Request.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -36083,349 +18019,58 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.Request * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.Request} Request * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Request.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Request(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.echo = $root.tendermint.abci.types.RequestEcho.decode(reader, reader.uint32()); + m.echo = $root.tendermint.abci.types.RequestEcho.decode(r, r.uint32()); break; case 3: - message.flush = $root.tendermint.abci.types.RequestFlush.decode(reader, reader.uint32()); + m.flush = $root.tendermint.abci.types.RequestFlush.decode(r, r.uint32()); break; case 4: - message.info = $root.tendermint.abci.types.RequestInfo.decode(reader, reader.uint32()); + m.info = $root.tendermint.abci.types.RequestInfo.decode(r, r.uint32()); break; case 5: - message.setOption = $root.tendermint.abci.types.RequestSetOption.decode(reader, reader.uint32()); + m.setOption = $root.tendermint.abci.types.RequestSetOption.decode(r, r.uint32()); break; case 6: - message.initChain = $root.tendermint.abci.types.RequestInitChain.decode(reader, reader.uint32()); + m.initChain = $root.tendermint.abci.types.RequestInitChain.decode(r, r.uint32()); break; case 7: - message.query = $root.tendermint.abci.types.RequestQuery.decode(reader, reader.uint32()); + m.query = $root.tendermint.abci.types.RequestQuery.decode(r, r.uint32()); break; case 8: - message.beginBlock = $root.tendermint.abci.types.RequestBeginBlock.decode(reader, reader.uint32()); + m.beginBlock = $root.tendermint.abci.types.RequestBeginBlock.decode(r, r.uint32()); break; case 9: - message.checkTx = $root.tendermint.abci.types.RequestCheckTx.decode(reader, reader.uint32()); + m.checkTx = $root.tendermint.abci.types.RequestCheckTx.decode(r, r.uint32()); break; case 19: - message.deliverTx = $root.tendermint.abci.types.RequestDeliverTx.decode(reader, reader.uint32()); + m.deliverTx = $root.tendermint.abci.types.RequestDeliverTx.decode(r, r.uint32()); break; case 11: - message.endBlock = $root.tendermint.abci.types.RequestEndBlock.decode(reader, reader.uint32()); + m.endBlock = $root.tendermint.abci.types.RequestEndBlock.decode(r, r.uint32()); break; case 12: - message.commit = $root.tendermint.abci.types.RequestCommit.decode(reader, reader.uint32()); + m.commit = $root.tendermint.abci.types.RequestCommit.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Request message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.Request - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.Request} Request - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Request.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Request message. - * @function verify - * @memberof tendermint.abci.types.Request - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Request.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.echo != null && message.hasOwnProperty("echo")) { - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestEcho.verify(message.echo); - if (error) - return "echo." + error; - } - } - if (message.flush != null && message.hasOwnProperty("flush")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestFlush.verify(message.flush); - if (error) - return "flush." + error; - } - } - if (message.info != null && message.hasOwnProperty("info")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestInfo.verify(message.info); - if (error) - return "info." + error; - } - } - if (message.setOption != null && message.hasOwnProperty("setOption")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestSetOption.verify(message.setOption); - if (error) - return "setOption." + error; - } - } - if (message.initChain != null && message.hasOwnProperty("initChain")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestInitChain.verify(message.initChain); - if (error) - return "initChain." + error; - } - } - if (message.query != null && message.hasOwnProperty("query")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestQuery.verify(message.query); - if (error) - return "query." + error; - } - } - if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestBeginBlock.verify(message.beginBlock); - if (error) - return "beginBlock." + error; - } - } - if (message.checkTx != null && message.hasOwnProperty("checkTx")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestCheckTx.verify(message.checkTx); - if (error) - return "checkTx." + error; - } - } - if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestDeliverTx.verify(message.deliverTx); - if (error) - return "deliverTx." + error; - } - } - if (message.endBlock != null && message.hasOwnProperty("endBlock")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestEndBlock.verify(message.endBlock); - if (error) - return "endBlock." + error; - } - } - if (message.commit != null && message.hasOwnProperty("commit")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.RequestCommit.verify(message.commit); - if (error) - return "commit." + error; - } - } - return null; - }; - - /** - * Creates a Request message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.Request - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.Request} Request - */ - Request.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.Request) - return object; - var message = new $root.tendermint.abci.types.Request(); - if (object.echo != null) { - if (typeof object.echo !== "object") - throw TypeError(".tendermint.abci.types.Request.echo: object expected"); - message.echo = $root.tendermint.abci.types.RequestEcho.fromObject(object.echo); - } - if (object.flush != null) { - if (typeof object.flush !== "object") - throw TypeError(".tendermint.abci.types.Request.flush: object expected"); - message.flush = $root.tendermint.abci.types.RequestFlush.fromObject(object.flush); - } - if (object.info != null) { - if (typeof object.info !== "object") - throw TypeError(".tendermint.abci.types.Request.info: object expected"); - message.info = $root.tendermint.abci.types.RequestInfo.fromObject(object.info); - } - if (object.setOption != null) { - if (typeof object.setOption !== "object") - throw TypeError(".tendermint.abci.types.Request.setOption: object expected"); - message.setOption = $root.tendermint.abci.types.RequestSetOption.fromObject(object.setOption); - } - if (object.initChain != null) { - if (typeof object.initChain !== "object") - throw TypeError(".tendermint.abci.types.Request.initChain: object expected"); - message.initChain = $root.tendermint.abci.types.RequestInitChain.fromObject(object.initChain); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".tendermint.abci.types.Request.query: object expected"); - message.query = $root.tendermint.abci.types.RequestQuery.fromObject(object.query); - } - if (object.beginBlock != null) { - if (typeof object.beginBlock !== "object") - throw TypeError(".tendermint.abci.types.Request.beginBlock: object expected"); - message.beginBlock = $root.tendermint.abci.types.RequestBeginBlock.fromObject(object.beginBlock); - } - if (object.checkTx != null) { - if (typeof object.checkTx !== "object") - throw TypeError(".tendermint.abci.types.Request.checkTx: object expected"); - message.checkTx = $root.tendermint.abci.types.RequestCheckTx.fromObject(object.checkTx); - } - if (object.deliverTx != null) { - if (typeof object.deliverTx !== "object") - throw TypeError(".tendermint.abci.types.Request.deliverTx: object expected"); - message.deliverTx = $root.tendermint.abci.types.RequestDeliverTx.fromObject(object.deliverTx); - } - if (object.endBlock != null) { - if (typeof object.endBlock !== "object") - throw TypeError(".tendermint.abci.types.Request.endBlock: object expected"); - message.endBlock = $root.tendermint.abci.types.RequestEndBlock.fromObject(object.endBlock); - } - if (object.commit != null) { - if (typeof object.commit !== "object") - throw TypeError(".tendermint.abci.types.Request.commit: object expected"); - message.commit = $root.tendermint.abci.types.RequestCommit.fromObject(object.commit); - } - return message; - }; - - /** - * Creates a plain object from a Request message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.Request - * @static - * @param {tendermint.abci.types.Request} message Request - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Request.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.echo != null && message.hasOwnProperty("echo")) { - object.echo = $root.tendermint.abci.types.RequestEcho.toObject(message.echo, options); - if (options.oneofs) - object.value = "echo"; - } - if (message.flush != null && message.hasOwnProperty("flush")) { - object.flush = $root.tendermint.abci.types.RequestFlush.toObject(message.flush, options); - if (options.oneofs) - object.value = "flush"; - } - if (message.info != null && message.hasOwnProperty("info")) { - object.info = $root.tendermint.abci.types.RequestInfo.toObject(message.info, options); - if (options.oneofs) - object.value = "info"; - } - if (message.setOption != null && message.hasOwnProperty("setOption")) { - object.setOption = $root.tendermint.abci.types.RequestSetOption.toObject(message.setOption, options); - if (options.oneofs) - object.value = "setOption"; - } - if (message.initChain != null && message.hasOwnProperty("initChain")) { - object.initChain = $root.tendermint.abci.types.RequestInitChain.toObject(message.initChain, options); - if (options.oneofs) - object.value = "initChain"; - } - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.tendermint.abci.types.RequestQuery.toObject(message.query, options); - if (options.oneofs) - object.value = "query"; - } - if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { - object.beginBlock = $root.tendermint.abci.types.RequestBeginBlock.toObject(message.beginBlock, options); - if (options.oneofs) - object.value = "beginBlock"; - } - if (message.checkTx != null && message.hasOwnProperty("checkTx")) { - object.checkTx = $root.tendermint.abci.types.RequestCheckTx.toObject(message.checkTx, options); - if (options.oneofs) - object.value = "checkTx"; - } - if (message.endBlock != null && message.hasOwnProperty("endBlock")) { - object.endBlock = $root.tendermint.abci.types.RequestEndBlock.toObject(message.endBlock, options); - if (options.oneofs) - object.value = "endBlock"; - } - if (message.commit != null && message.hasOwnProperty("commit")) { - object.commit = $root.tendermint.abci.types.RequestCommit.toObject(message.commit, options); - if (options.oneofs) - object.value = "commit"; - } - if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { - object.deliverTx = $root.tendermint.abci.types.RequestDeliverTx.toObject(message.deliverTx, options); - if (options.oneofs) - object.value = "deliverTx"; - } - return object; - }; - - /** - * Converts this Request to JSON. - * @function toJSON - * @memberof tendermint.abci.types.Request - * @instance - * @returns {Object.} JSON object - */ - Request.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Request; @@ -36446,13 +18091,13 @@ $root.tendermint = (function() { * @classdesc Represents a RequestEcho. * @implements IRequestEcho * @constructor - * @param {tendermint.abci.types.IRequestEcho=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestEcho=} [p] Properties to set */ - function RequestEcho(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -36480,29 +18125,16 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestEcho * @static - * @param {tendermint.abci.types.IRequestEcho} message RequestEcho message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestEcho} m RequestEcho message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestEcho.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - return writer; - }; - - /** - * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestEcho - * @static - * @param {tendermint.abci.types.IRequestEcho} message RequestEcho message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestEcho.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -36510,109 +18142,28 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestEcho * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestEcho} RequestEcho * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestEcho.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestEcho(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.message = reader.string(); + m.message = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestEcho message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestEcho - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestEcho} RequestEcho - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestEcho.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestEcho message. - * @function verify - * @memberof tendermint.abci.types.RequestEcho - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestEcho.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a RequestEcho message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestEcho - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestEcho} RequestEcho - */ - RequestEcho.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestEcho) - return object; - var message = new $root.tendermint.abci.types.RequestEcho(); - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a RequestEcho message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestEcho - * @static - * @param {tendermint.abci.types.RequestEcho} message RequestEcho - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestEcho.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.message = ""; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this RequestEcho to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestEcho - * @instance - * @returns {Object.} JSON object - */ - RequestEcho.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestEcho; @@ -36632,13 +18183,13 @@ $root.tendermint = (function() { * @classdesc Represents a RequestFlush. * @implements IRequestFlush * @constructor - * @param {tendermint.abci.types.IRequestFlush=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestFlush=} [p] Properties to set */ - function RequestFlush(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -36658,27 +18209,14 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestFlush * @static - * @param {tendermint.abci.types.IRequestFlush} message RequestFlush message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestFlush} m RequestFlush message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestFlush.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestFlush - * @static - * @param {tendermint.abci.types.IRequestFlush} message RequestFlush message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestFlush.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RequestFlush.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + return w; }; /** @@ -36686,93 +18224,25 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestFlush * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestFlush} RequestFlush * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestFlush.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestFlush(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestFlush message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestFlush - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestFlush} RequestFlush - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestFlush.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestFlush message. - * @function verify - * @memberof tendermint.abci.types.RequestFlush - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestFlush.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RequestFlush message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestFlush - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestFlush} RequestFlush - */ - RequestFlush.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestFlush) - return object; - return new $root.tendermint.abci.types.RequestFlush(); - }; - - /** - * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestFlush - * @static - * @param {tendermint.abci.types.RequestFlush} message RequestFlush - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestFlush.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RequestFlush to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestFlush - * @instance - * @returns {Object.} JSON object - */ - RequestFlush.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestFlush; @@ -36795,13 +18265,13 @@ $root.tendermint = (function() { * @classdesc Represents a RequestInfo. * @implements IRequestInfo * @constructor - * @param {tendermint.abci.types.IRequestInfo=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestInfo=} [p] Properties to set */ - function RequestInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -36845,33 +18315,20 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestInfo * @static - * @param {tendermint.abci.types.IRequestInfo} message RequestInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestInfo} m RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.blockVersion != null && Object.hasOwnProperty.call(message, "blockVersion")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.blockVersion); - if (message.p2pVersion != null && Object.hasOwnProperty.call(message, "p2pVersion")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.p2pVersion); - return writer; - }; - - /** - * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestInfo - * @static - * @param {tendermint.abci.types.IRequestInfo} message RequestInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -36879,160 +18336,34 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestInfo} RequestInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.version = reader.string(); + m.version = r.string(); break; case 2: - message.blockVersion = reader.uint64(); + m.blockVersion = r.uint64(); break; case 3: - message.p2pVersion = reader.uint64(); + m.p2pVersion = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestInfo} RequestInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestInfo message. - * @function verify - * @memberof tendermint.abci.types.RequestInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) - if (!$util.isInteger(message.blockVersion) && !(message.blockVersion && $util.isInteger(message.blockVersion.low) && $util.isInteger(message.blockVersion.high))) - return "blockVersion: integer|Long expected"; - if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) - if (!$util.isInteger(message.p2pVersion) && !(message.p2pVersion && $util.isInteger(message.p2pVersion.low) && $util.isInteger(message.p2pVersion.high))) - return "p2pVersion: integer|Long expected"; - return null; - }; - - /** - * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestInfo - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestInfo} RequestInfo - */ - RequestInfo.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestInfo) - return object; - var message = new $root.tendermint.abci.types.RequestInfo(); - if (object.version != null) - message.version = String(object.version); - if (object.blockVersion != null) - if ($util.Long) - (message.blockVersion = $util.Long.fromValue(object.blockVersion)).unsigned = true; - else if (typeof object.blockVersion === "string") - message.blockVersion = parseInt(object.blockVersion, 10); - else if (typeof object.blockVersion === "number") - message.blockVersion = object.blockVersion; - else if (typeof object.blockVersion === "object") - message.blockVersion = new $util.LongBits(object.blockVersion.low >>> 0, object.blockVersion.high >>> 0).toNumber(true); - if (object.p2pVersion != null) - if ($util.Long) - (message.p2pVersion = $util.Long.fromValue(object.p2pVersion)).unsigned = true; - else if (typeof object.p2pVersion === "string") - message.p2pVersion = parseInt(object.p2pVersion, 10); - else if (typeof object.p2pVersion === "number") - message.p2pVersion = object.p2pVersion; - else if (typeof object.p2pVersion === "object") - message.p2pVersion = new $util.LongBits(object.p2pVersion.low >>> 0, object.p2pVersion.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestInfo - * @static - * @param {tendermint.abci.types.RequestInfo} message RequestInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.blockVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.blockVersion = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.p2pVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.p2pVersion = options.longs === String ? "0" : 0; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.blockVersion != null && message.hasOwnProperty("blockVersion")) - if (typeof message.blockVersion === "number") - object.blockVersion = options.longs === String ? String(message.blockVersion) : message.blockVersion; - else - object.blockVersion = options.longs === String ? $util.Long.prototype.toString.call(message.blockVersion) : options.longs === Number ? new $util.LongBits(message.blockVersion.low >>> 0, message.blockVersion.high >>> 0).toNumber(true) : message.blockVersion; - if (message.p2pVersion != null && message.hasOwnProperty("p2pVersion")) - if (typeof message.p2pVersion === "number") - object.p2pVersion = options.longs === String ? String(message.p2pVersion) : message.p2pVersion; - else - object.p2pVersion = options.longs === String ? $util.Long.prototype.toString.call(message.p2pVersion) : options.longs === Number ? new $util.LongBits(message.p2pVersion.low >>> 0, message.p2pVersion.high >>> 0).toNumber(true) : message.p2pVersion; - return object; - }; - - /** - * Converts this RequestInfo to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestInfo - * @instance - * @returns {Object.} JSON object - */ - RequestInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestInfo; @@ -37054,13 +18385,13 @@ $root.tendermint = (function() { * @classdesc Represents a RequestSetOption. * @implements IRequestSetOption * @constructor - * @param {tendermint.abci.types.IRequestSetOption=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestSetOption=} [p] Properties to set */ - function RequestSetOption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -37096,31 +18427,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestSetOption * @static - * @param {tendermint.abci.types.IRequestSetOption} message RequestSetOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestSetOption} m RequestSetOption message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestSetOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - return writer; - }; - - /** - * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestSetOption - * @static - * @param {tendermint.abci.types.IRequestSetOption} message RequestSetOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestSetOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -37128,121 +18446,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestSetOption * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestSetOption} RequestSetOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestSetOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestSetOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.key = reader.string(); + m.key = r.string(); break; case 2: - message.value = reader.string(); + m.value = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestSetOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestSetOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestSetOption} RequestSetOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestSetOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestSetOption message. - * @function verify - * @memberof tendermint.abci.types.RequestSetOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestSetOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates a RequestSetOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestSetOption - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestSetOption} RequestSetOption - */ - RequestSetOption.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestSetOption) - return object; - var message = new $root.tendermint.abci.types.RequestSetOption(); - if (object.key != null) - message.key = String(object.key); - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from a RequestSetOption message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestSetOption - * @static - * @param {tendermint.abci.types.RequestSetOption} message RequestSetOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestSetOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.value = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; - - /** - * Converts this RequestSetOption to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestSetOption - * @instance - * @returns {Object.} JSON object - */ - RequestSetOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestSetOption; @@ -37267,14 +18495,14 @@ $root.tendermint = (function() { * @classdesc Represents a RequestInitChain. * @implements IRequestInitChain * @constructor - * @param {tendermint.abci.types.IRequestInitChain=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestInitChain=} [p] Properties to set */ - function RequestInitChain(properties) { + function RequestInitChain(p) { this.validators = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -37334,38 +18562,26 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestInitChain * @static - * @param {tendermint.abci.types.IRequestInitChain} message RequestInitChain message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestInitChain} m RequestInitChain message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestInitChain.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) - $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); - if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) - $root.tendermint.abci.types.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.validators != null && message.validators.length) - for (var i = 0; i < message.validators.length; ++i) - $root.tendermint.abci.types.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.appStateBytes != null && Object.hasOwnProperty.call(message, "appStateBytes")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.appStateBytes); - return writer; - }; - - /** - * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestInitChain - * @static - * @param {tendermint.abci.types.IRequestInitChain} message RequestInitChain message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestInitChain.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -37373,193 +18589,42 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestInitChain * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestInitChain} RequestInitChain * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestInitChain.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestInitChain(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 2: - message.chainId = reader.string(); + m.chainId = r.string(); break; case 3: - message.consensusParams = $root.tendermint.abci.types.ConsensusParams.decode(reader, reader.uint32()); + m.consensusParams = $root.tendermint.abci.types.ConsensusParams.decode(r, r.uint32()); break; case 4: - if (!(message.validators && message.validators.length)) - message.validators = []; - message.validators.push($root.tendermint.abci.types.ValidatorUpdate.decode(reader, reader.uint32())); + if (!(m.validators && m.validators.length)) + m.validators = []; + m.validators.push($root.tendermint.abci.types.ValidatorUpdate.decode(r, r.uint32())); break; case 5: - message.appStateBytes = reader.bytes(); + m.appStateBytes = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestInitChain message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestInitChain - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestInitChain} RequestInitChain - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestInitChain.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestInitChain message. - * @function verify - * @memberof tendermint.abci.types.RequestInitChain - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestInitChain.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.time != null && message.hasOwnProperty("time")) { - var error = $root.google.protobuf.Timestamp.verify(message.time); - if (error) - return "time." + error; - } - if (message.chainId != null && message.hasOwnProperty("chainId")) - if (!$util.isString(message.chainId)) - return "chainId: string expected"; - if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { - var error = $root.tendermint.abci.types.ConsensusParams.verify(message.consensusParams); - if (error) - return "consensusParams." + error; - } - if (message.validators != null && message.hasOwnProperty("validators")) { - if (!Array.isArray(message.validators)) - return "validators: array expected"; - for (var i = 0; i < message.validators.length; ++i) { - var error = $root.tendermint.abci.types.ValidatorUpdate.verify(message.validators[i]); - if (error) - return "validators." + error; - } - } - if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) - if (!(message.appStateBytes && typeof message.appStateBytes.length === "number" || $util.isString(message.appStateBytes))) - return "appStateBytes: buffer expected"; - return null; - }; - - /** - * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestInitChain - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestInitChain} RequestInitChain - */ - RequestInitChain.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestInitChain) - return object; - var message = new $root.tendermint.abci.types.RequestInitChain(); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".tendermint.abci.types.RequestInitChain.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.chainId != null) - message.chainId = String(object.chainId); - if (object.consensusParams != null) { - if (typeof object.consensusParams !== "object") - throw TypeError(".tendermint.abci.types.RequestInitChain.consensusParams: object expected"); - message.consensusParams = $root.tendermint.abci.types.ConsensusParams.fromObject(object.consensusParams); - } - if (object.validators) { - if (!Array.isArray(object.validators)) - throw TypeError(".tendermint.abci.types.RequestInitChain.validators: array expected"); - message.validators = []; - for (var i = 0; i < object.validators.length; ++i) { - if (typeof object.validators[i] !== "object") - throw TypeError(".tendermint.abci.types.RequestInitChain.validators: object expected"); - message.validators[i] = $root.tendermint.abci.types.ValidatorUpdate.fromObject(object.validators[i]); - } - } - if (object.appStateBytes != null) - if (typeof object.appStateBytes === "string") - $util.base64.decode(object.appStateBytes, message.appStateBytes = $util.newBuffer($util.base64.length(object.appStateBytes)), 0); - else if (object.appStateBytes.length) - message.appStateBytes = object.appStateBytes; - return message; - }; - - /** - * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestInitChain - * @static - * @param {tendermint.abci.types.RequestInitChain} message RequestInitChain - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestInitChain.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.validators = []; - if (options.defaults) { - object.time = null; - object.chainId = ""; - object.consensusParams = null; - if (options.bytes === String) - object.appStateBytes = ""; - else { - object.appStateBytes = []; - if (options.bytes !== Array) - object.appStateBytes = $util.newBuffer(object.appStateBytes); - } - } - if (message.time != null && message.hasOwnProperty("time")) - object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); - if (message.chainId != null && message.hasOwnProperty("chainId")) - object.chainId = message.chainId; - if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) - object.consensusParams = $root.tendermint.abci.types.ConsensusParams.toObject(message.consensusParams, options); - if (message.validators && message.validators.length) { - object.validators = []; - for (var j = 0; j < message.validators.length; ++j) - object.validators[j] = $root.tendermint.abci.types.ValidatorUpdate.toObject(message.validators[j], options); - } - if (message.appStateBytes != null && message.hasOwnProperty("appStateBytes")) - object.appStateBytes = options.bytes === String ? $util.base64.encode(message.appStateBytes, 0, message.appStateBytes.length) : options.bytes === Array ? Array.prototype.slice.call(message.appStateBytes) : message.appStateBytes; - return object; - }; - - /** - * Converts this RequestInitChain to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestInitChain - * @instance - * @returns {Object.} JSON object - */ - RequestInitChain.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestInitChain; @@ -37583,13 +18648,13 @@ $root.tendermint = (function() { * @classdesc Represents a RequestQuery. * @implements IRequestQuery * @constructor - * @param {tendermint.abci.types.IRequestQuery=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestQuery=} [p] Properties to set */ - function RequestQuery(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -37641,35 +18706,22 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestQuery * @static - * @param {tendermint.abci.types.IRequestQuery} message RequestQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestQuery} m RequestQuery message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestQuery.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); - if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.prove); - return writer; - }; - - /** - * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestQuery - * @static - * @param {tendermint.abci.types.IRequestQuery} message RequestQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -37677,166 +18729,37 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestQuery * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestQuery} RequestQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestQuery.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestQuery(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.data = reader.bytes(); + m.data = r.bytes(); break; case 2: - message.path = reader.string(); + m.path = r.string(); break; case 3: - message.height = reader.int64(); + m.height = r.int64(); break; case 4: - message.prove = reader.bool(); + m.prove = r.bool(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestQuery message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestQuery} RequestQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestQuery.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestQuery message. - * @function verify - * @memberof tendermint.abci.types.RequestQuery - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestQuery.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) - return "height: integer|Long expected"; - if (message.prove != null && message.hasOwnProperty("prove")) - if (typeof message.prove !== "boolean") - return "prove: boolean expected"; - return null; - }; - - /** - * Creates a RequestQuery message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestQuery - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestQuery} RequestQuery - */ - RequestQuery.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestQuery) - return object; - var message = new $root.tendermint.abci.types.RequestQuery(); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - if (object.path != null) - message.path = String(object.path); - if (object.height != null) - if ($util.Long) - (message.height = $util.Long.fromValue(object.height)).unsigned = false; - else if (typeof object.height === "string") - message.height = parseInt(object.height, 10); - else if (typeof object.height === "number") - message.height = object.height; - else if (typeof object.height === "object") - message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); - if (object.prove != null) - message.prove = Boolean(object.prove); - return message; - }; - - /** - * Creates a plain object from a RequestQuery message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestQuery - * @static - * @param {tendermint.abci.types.RequestQuery} message RequestQuery - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestQuery.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.path = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.prove = false; - } - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height === "number") - object.height = options.longs === String ? String(message.height) : message.height; - else - object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; - if (message.prove != null && message.hasOwnProperty("prove")) - object.prove = message.prove; - return object; - }; - - /** - * Converts this RequestQuery to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestQuery - * @instance - * @returns {Object.} JSON object - */ - RequestQuery.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestQuery; @@ -37860,14 +18783,14 @@ $root.tendermint = (function() { * @classdesc Represents a RequestBeginBlock. * @implements IRequestBeginBlock * @constructor - * @param {tendermint.abci.types.IRequestBeginBlock=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestBeginBlock=} [p] Properties to set */ - function RequestBeginBlock(properties) { + function RequestBeginBlock(p) { this.byzantineValidators = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -37919,36 +18842,24 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestBeginBlock * @static - * @param {tendermint.abci.types.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestBeginBlock} m RequestBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestBeginBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); - if (message.header != null && Object.hasOwnProperty.call(message, "header")) - $root.tendermint.abci.types.Header.encode(message.header, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.lastCommitInfo != null && Object.hasOwnProperty.call(message, "lastCommitInfo")) - $root.tendermint.abci.types.LastCommitInfo.encode(message.lastCommitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.byzantineValidators != null && message.byzantineValidators.length) - for (var i = 0; i < message.byzantineValidators.length; ++i) - $root.tendermint.abci.types.Evidence.encode(message.byzantineValidators[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestBeginBlock - * @static - * @param {tendermint.abci.types.IRequestBeginBlock} message RequestBeginBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -37956,182 +18867,39 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestBeginBlock * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestBeginBlock} RequestBeginBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestBeginBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestBeginBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.hash = reader.bytes(); + m.hash = r.bytes(); break; case 2: - message.header = $root.tendermint.abci.types.Header.decode(reader, reader.uint32()); + m.header = $root.tendermint.abci.types.Header.decode(r, r.uint32()); break; case 3: - message.lastCommitInfo = $root.tendermint.abci.types.LastCommitInfo.decode(reader, reader.uint32()); + m.lastCommitInfo = $root.tendermint.abci.types.LastCommitInfo.decode(r, r.uint32()); break; case 4: - if (!(message.byzantineValidators && message.byzantineValidators.length)) - message.byzantineValidators = []; - message.byzantineValidators.push($root.tendermint.abci.types.Evidence.decode(reader, reader.uint32())); + if (!(m.byzantineValidators && m.byzantineValidators.length)) + m.byzantineValidators = []; + m.byzantineValidators.push($root.tendermint.abci.types.Evidence.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestBeginBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestBeginBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestBeginBlock} RequestBeginBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestBeginBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestBeginBlock message. - * @function verify - * @memberof tendermint.abci.types.RequestBeginBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestBeginBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) - return "hash: buffer expected"; - if (message.header != null && message.hasOwnProperty("header")) { - var error = $root.tendermint.abci.types.Header.verify(message.header); - if (error) - return "header." + error; - } - if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) { - var error = $root.tendermint.abci.types.LastCommitInfo.verify(message.lastCommitInfo); - if (error) - return "lastCommitInfo." + error; - } - if (message.byzantineValidators != null && message.hasOwnProperty("byzantineValidators")) { - if (!Array.isArray(message.byzantineValidators)) - return "byzantineValidators: array expected"; - for (var i = 0; i < message.byzantineValidators.length; ++i) { - var error = $root.tendermint.abci.types.Evidence.verify(message.byzantineValidators[i]); - if (error) - return "byzantineValidators." + error; - } - } - return null; - }; - - /** - * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestBeginBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestBeginBlock} RequestBeginBlock - */ - RequestBeginBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestBeginBlock) - return object; - var message = new $root.tendermint.abci.types.RequestBeginBlock(); - if (object.hash != null) - if (typeof object.hash === "string") - $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); - else if (object.hash.length) - message.hash = object.hash; - if (object.header != null) { - if (typeof object.header !== "object") - throw TypeError(".tendermint.abci.types.RequestBeginBlock.header: object expected"); - message.header = $root.tendermint.abci.types.Header.fromObject(object.header); - } - if (object.lastCommitInfo != null) { - if (typeof object.lastCommitInfo !== "object") - throw TypeError(".tendermint.abci.types.RequestBeginBlock.lastCommitInfo: object expected"); - message.lastCommitInfo = $root.tendermint.abci.types.LastCommitInfo.fromObject(object.lastCommitInfo); - } - if (object.byzantineValidators) { - if (!Array.isArray(object.byzantineValidators)) - throw TypeError(".tendermint.abci.types.RequestBeginBlock.byzantineValidators: array expected"); - message.byzantineValidators = []; - for (var i = 0; i < object.byzantineValidators.length; ++i) { - if (typeof object.byzantineValidators[i] !== "object") - throw TypeError(".tendermint.abci.types.RequestBeginBlock.byzantineValidators: object expected"); - message.byzantineValidators[i] = $root.tendermint.abci.types.Evidence.fromObject(object.byzantineValidators[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestBeginBlock - * @static - * @param {tendermint.abci.types.RequestBeginBlock} message RequestBeginBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestBeginBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.byzantineValidators = []; - if (options.defaults) { - if (options.bytes === String) - object.hash = ""; - else { - object.hash = []; - if (options.bytes !== Array) - object.hash = $util.newBuffer(object.hash); - } - object.header = null; - object.lastCommitInfo = null; - } - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; - if (message.header != null && message.hasOwnProperty("header")) - object.header = $root.tendermint.abci.types.Header.toObject(message.header, options); - if (message.lastCommitInfo != null && message.hasOwnProperty("lastCommitInfo")) - object.lastCommitInfo = $root.tendermint.abci.types.LastCommitInfo.toObject(message.lastCommitInfo, options); - if (message.byzantineValidators && message.byzantineValidators.length) { - object.byzantineValidators = []; - for (var j = 0; j < message.byzantineValidators.length; ++j) - object.byzantineValidators[j] = $root.tendermint.abci.types.Evidence.toObject(message.byzantineValidators[j], options); - } - return object; - }; - - /** - * Converts this RequestBeginBlock to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestBeginBlock - * @instance - * @returns {Object.} JSON object - */ - RequestBeginBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestBeginBlock; @@ -38167,13 +18935,13 @@ $root.tendermint = (function() { * @classdesc Represents a RequestCheckTx. * @implements IRequestCheckTx * @constructor - * @param {tendermint.abci.types.IRequestCheckTx=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestCheckTx=} [p] Properties to set */ - function RequestCheckTx(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -38209,31 +18977,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestCheckTx * @static - * @param {tendermint.abci.types.IRequestCheckTx} message RequestCheckTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestCheckTx} m RequestCheckTx message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestCheckTx.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - return writer; - }; - - /** - * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestCheckTx - * @static - * @param {tendermint.abci.types.IRequestCheckTx} message RequestCheckTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestCheckTx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -38241,143 +18996,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestCheckTx * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestCheckTx} RequestCheckTx * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestCheckTx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestCheckTx(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.tx = reader.bytes(); + m.tx = r.bytes(); break; case 2: - message.type = reader.int32(); + m.type = r.int32(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestCheckTx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestCheckTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestCheckTx} RequestCheckTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestCheckTx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestCheckTx message. - * @function verify - * @memberof tendermint.abci.types.RequestCheckTx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestCheckTx.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tx != null && message.hasOwnProperty("tx")) - if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) - return "tx: buffer expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates a RequestCheckTx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestCheckTx - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestCheckTx} RequestCheckTx - */ - RequestCheckTx.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestCheckTx) - return object; - var message = new $root.tendermint.abci.types.RequestCheckTx(); - if (object.tx != null) - if (typeof object.tx === "string") - $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); - else if (object.tx.length) - message.tx = object.tx; - switch (object.type) { - case "New": - case 0: - message.type = 0; - break; - case "Recheck": - case 1: - message.type = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from a RequestCheckTx message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestCheckTx - * @static - * @param {tendermint.abci.types.RequestCheckTx} message RequestCheckTx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestCheckTx.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.tx = ""; - else { - object.tx = []; - if (options.bytes !== Array) - object.tx = $util.newBuffer(object.tx); - } - object.type = options.enums === String ? "New" : 0; - } - if (message.tx != null && message.hasOwnProperty("tx")) - object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.tendermint.abci.types.CheckTxType[message.type] : message.type; - return object; - }; - - /** - * Converts this RequestCheckTx to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestCheckTx - * @instance - * @returns {Object.} JSON object - */ - RequestCheckTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestCheckTx; @@ -38398,13 +19041,13 @@ $root.tendermint = (function() { * @classdesc Represents a RequestDeliverTx. * @implements IRequestDeliverTx * @constructor - * @param {tendermint.abci.types.IRequestDeliverTx=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestDeliverTx=} [p] Properties to set */ - function RequestDeliverTx(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -38432,29 +19075,16 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestDeliverTx * @static - * @param {tendermint.abci.types.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestDeliverTx} m RequestDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestDeliverTx.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tx != null && Object.hasOwnProperty.call(message, "tx")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.tx); - return writer; - }; - - /** - * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestDeliverTx - * @static - * @param {tendermint.abci.types.IRequestDeliverTx} message RequestDeliverTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -38462,118 +19092,28 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestDeliverTx * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestDeliverTx} RequestDeliverTx * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestDeliverTx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestDeliverTx(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.tx = reader.bytes(); + m.tx = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestDeliverTx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestDeliverTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestDeliverTx} RequestDeliverTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestDeliverTx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestDeliverTx message. - * @function verify - * @memberof tendermint.abci.types.RequestDeliverTx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestDeliverTx.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.tx != null && message.hasOwnProperty("tx")) - if (!(message.tx && typeof message.tx.length === "number" || $util.isString(message.tx))) - return "tx: buffer expected"; - return null; - }; - - /** - * Creates a RequestDeliverTx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestDeliverTx - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestDeliverTx} RequestDeliverTx - */ - RequestDeliverTx.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestDeliverTx) - return object; - var message = new $root.tendermint.abci.types.RequestDeliverTx(); - if (object.tx != null) - if (typeof object.tx === "string") - $util.base64.decode(object.tx, message.tx = $util.newBuffer($util.base64.length(object.tx)), 0); - else if (object.tx.length) - message.tx = object.tx; - return message; - }; - - /** - * Creates a plain object from a RequestDeliverTx message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestDeliverTx - * @static - * @param {tendermint.abci.types.RequestDeliverTx} message RequestDeliverTx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestDeliverTx.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.tx = ""; - else { - object.tx = []; - if (options.bytes !== Array) - object.tx = $util.newBuffer(object.tx); - } - if (message.tx != null && message.hasOwnProperty("tx")) - object.tx = options.bytes === String ? $util.base64.encode(message.tx, 0, message.tx.length) : options.bytes === Array ? Array.prototype.slice.call(message.tx) : message.tx; - return object; - }; - - /** - * Converts this RequestDeliverTx to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestDeliverTx - * @instance - * @returns {Object.} JSON object - */ - RequestDeliverTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestDeliverTx; @@ -38594,13 +19134,13 @@ $root.tendermint = (function() { * @classdesc Represents a RequestEndBlock. * @implements IRequestEndBlock * @constructor - * @param {tendermint.abci.types.IRequestEndBlock=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestEndBlock=} [p] Properties to set */ - function RequestEndBlock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -38628,29 +19168,16 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestEndBlock * @static - * @param {tendermint.abci.types.IRequestEndBlock} message RequestEndBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestEndBlock} m RequestEndBlock message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestEndBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.height); - return writer; - }; - - /** - * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestEndBlock - * @static - * @param {tendermint.abci.types.IRequestEndBlock} message RequestEndBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestEndBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -38658,123 +19185,28 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestEndBlock * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestEndBlock} RequestEndBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestEndBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestEndBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.height = reader.int64(); + m.height = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestEndBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestEndBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestEndBlock} RequestEndBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestEndBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestEndBlock message. - * @function verify - * @memberof tendermint.abci.types.RequestEndBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestEndBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) - return "height: integer|Long expected"; - return null; - }; - - /** - * Creates a RequestEndBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestEndBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestEndBlock} RequestEndBlock - */ - RequestEndBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestEndBlock) - return object; - var message = new $root.tendermint.abci.types.RequestEndBlock(); - if (object.height != null) - if ($util.Long) - (message.height = $util.Long.fromValue(object.height)).unsigned = false; - else if (typeof object.height === "string") - message.height = parseInt(object.height, 10); - else if (typeof object.height === "number") - message.height = object.height; - else if (typeof object.height === "object") - message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a RequestEndBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestEndBlock - * @static - * @param {tendermint.abci.types.RequestEndBlock} message RequestEndBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestEndBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height === "number") - object.height = options.longs === String ? String(message.height) : message.height; - else - object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; - return object; - }; - - /** - * Converts this RequestEndBlock to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestEndBlock - * @instance - * @returns {Object.} JSON object - */ - RequestEndBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestEndBlock; @@ -38794,13 +19226,13 @@ $root.tendermint = (function() { * @classdesc Represents a RequestCommit. * @implements IRequestCommit * @constructor - * @param {tendermint.abci.types.IRequestCommit=} [properties] Properties to set + * @param {tendermint.abci.types.IRequestCommit=} [p] Properties to set */ - function RequestCommit(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -38820,27 +19252,14 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.RequestCommit * @static - * @param {tendermint.abci.types.IRequestCommit} message RequestCommit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IRequestCommit} m RequestCommit message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RequestCommit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.RequestCommit - * @static - * @param {tendermint.abci.types.IRequestCommit} message RequestCommit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestCommit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + RequestCommit.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + return w; }; /** @@ -38848,93 +19267,25 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.RequestCommit * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.RequestCommit} RequestCommit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RequestCommit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.RequestCommit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a RequestCommit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.RequestCommit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.RequestCommit} RequestCommit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestCommit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestCommit message. - * @function verify - * @memberof tendermint.abci.types.RequestCommit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestCommit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a RequestCommit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.RequestCommit - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.RequestCommit} RequestCommit - */ - RequestCommit.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.RequestCommit) - return object; - return new $root.tendermint.abci.types.RequestCommit(); - }; - - /** - * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.RequestCommit - * @static - * @param {tendermint.abci.types.RequestCommit} message RequestCommit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestCommit.toObject = function toObject() { - return {}; - }; - - /** - * Converts this RequestCommit to JSON. - * @function toJSON - * @memberof tendermint.abci.types.RequestCommit - * @instance - * @returns {Object.} JSON object - */ - RequestCommit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return RequestCommit; @@ -38966,13 +19317,13 @@ $root.tendermint = (function() { * @classdesc Represents a Response. * @implements IResponse * @constructor - * @param {tendermint.abci.types.IResponse=} [properties] Properties to set + * @param {tendermint.abci.types.IResponse=} [p] Properties to set */ - function Response(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -39102,51 +19453,38 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.Response * @static - * @param {tendermint.abci.types.IResponse} message Response message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponse} m Response message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Response.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exception != null && Object.hasOwnProperty.call(message, "exception")) - $root.tendermint.abci.types.ResponseException.encode(message.exception, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.echo != null && Object.hasOwnProperty.call(message, "echo")) - $root.tendermint.abci.types.ResponseEcho.encode(message.echo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.flush != null && Object.hasOwnProperty.call(message, "flush")) - $root.tendermint.abci.types.ResponseFlush.encode(message.flush, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - $root.tendermint.abci.types.ResponseInfo.encode(message.info, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.setOption != null && Object.hasOwnProperty.call(message, "setOption")) - $root.tendermint.abci.types.ResponseSetOption.encode(message.setOption, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.initChain != null && Object.hasOwnProperty.call(message, "initChain")) - $root.tendermint.abci.types.ResponseInitChain.encode(message.initChain, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - $root.tendermint.abci.types.ResponseQuery.encode(message.query, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.beginBlock != null && Object.hasOwnProperty.call(message, "beginBlock")) - $root.tendermint.abci.types.ResponseBeginBlock.encode(message.beginBlock, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.checkTx != null && Object.hasOwnProperty.call(message, "checkTx")) - $root.tendermint.abci.types.ResponseCheckTx.encode(message.checkTx, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.deliverTx != null && Object.hasOwnProperty.call(message, "deliverTx")) - $root.tendermint.abci.types.ResponseDeliverTx.encode(message.deliverTx, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.endBlock != null && Object.hasOwnProperty.call(message, "endBlock")) - $root.tendermint.abci.types.ResponseEndBlock.encode(message.endBlock, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.commit != null && Object.hasOwnProperty.call(message, "commit")) - $root.tendermint.abci.types.ResponseCommit.encode(message.commit, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.Response - * @static - * @param {tendermint.abci.types.IResponse} message Response message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Response.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -39154,372 +19492,61 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.Response * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.Response} Response * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Response.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Response(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.exception = $root.tendermint.abci.types.ResponseException.decode(reader, reader.uint32()); + m.exception = $root.tendermint.abci.types.ResponseException.decode(r, r.uint32()); break; case 2: - message.echo = $root.tendermint.abci.types.ResponseEcho.decode(reader, reader.uint32()); + m.echo = $root.tendermint.abci.types.ResponseEcho.decode(r, r.uint32()); break; case 3: - message.flush = $root.tendermint.abci.types.ResponseFlush.decode(reader, reader.uint32()); + m.flush = $root.tendermint.abci.types.ResponseFlush.decode(r, r.uint32()); break; case 4: - message.info = $root.tendermint.abci.types.ResponseInfo.decode(reader, reader.uint32()); + m.info = $root.tendermint.abci.types.ResponseInfo.decode(r, r.uint32()); break; case 5: - message.setOption = $root.tendermint.abci.types.ResponseSetOption.decode(reader, reader.uint32()); + m.setOption = $root.tendermint.abci.types.ResponseSetOption.decode(r, r.uint32()); break; case 6: - message.initChain = $root.tendermint.abci.types.ResponseInitChain.decode(reader, reader.uint32()); + m.initChain = $root.tendermint.abci.types.ResponseInitChain.decode(r, r.uint32()); break; case 7: - message.query = $root.tendermint.abci.types.ResponseQuery.decode(reader, reader.uint32()); + m.query = $root.tendermint.abci.types.ResponseQuery.decode(r, r.uint32()); break; case 8: - message.beginBlock = $root.tendermint.abci.types.ResponseBeginBlock.decode(reader, reader.uint32()); + m.beginBlock = $root.tendermint.abci.types.ResponseBeginBlock.decode(r, r.uint32()); break; case 9: - message.checkTx = $root.tendermint.abci.types.ResponseCheckTx.decode(reader, reader.uint32()); + m.checkTx = $root.tendermint.abci.types.ResponseCheckTx.decode(r, r.uint32()); break; case 10: - message.deliverTx = $root.tendermint.abci.types.ResponseDeliverTx.decode(reader, reader.uint32()); + m.deliverTx = $root.tendermint.abci.types.ResponseDeliverTx.decode(r, r.uint32()); break; case 11: - message.endBlock = $root.tendermint.abci.types.ResponseEndBlock.decode(reader, reader.uint32()); + m.endBlock = $root.tendermint.abci.types.ResponseEndBlock.decode(r, r.uint32()); break; case 12: - message.commit = $root.tendermint.abci.types.ResponseCommit.decode(reader, reader.uint32()); + m.commit = $root.tendermint.abci.types.ResponseCommit.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Response message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.Response - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.Response} Response - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Response.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Response message. - * @function verify - * @memberof tendermint.abci.types.Response - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Response.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.exception != null && message.hasOwnProperty("exception")) { - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseException.verify(message.exception); - if (error) - return "exception." + error; - } - } - if (message.echo != null && message.hasOwnProperty("echo")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseEcho.verify(message.echo); - if (error) - return "echo." + error; - } - } - if (message.flush != null && message.hasOwnProperty("flush")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseFlush.verify(message.flush); - if (error) - return "flush." + error; - } - } - if (message.info != null && message.hasOwnProperty("info")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseInfo.verify(message.info); - if (error) - return "info." + error; - } - } - if (message.setOption != null && message.hasOwnProperty("setOption")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseSetOption.verify(message.setOption); - if (error) - return "setOption." + error; - } - } - if (message.initChain != null && message.hasOwnProperty("initChain")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseInitChain.verify(message.initChain); - if (error) - return "initChain." + error; - } - } - if (message.query != null && message.hasOwnProperty("query")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseQuery.verify(message.query); - if (error) - return "query." + error; - } - } - if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseBeginBlock.verify(message.beginBlock); - if (error) - return "beginBlock." + error; - } - } - if (message.checkTx != null && message.hasOwnProperty("checkTx")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseCheckTx.verify(message.checkTx); - if (error) - return "checkTx." + error; - } - } - if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseDeliverTx.verify(message.deliverTx); - if (error) - return "deliverTx." + error; - } - } - if (message.endBlock != null && message.hasOwnProperty("endBlock")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseEndBlock.verify(message.endBlock); - if (error) - return "endBlock." + error; - } - } - if (message.commit != null && message.hasOwnProperty("commit")) { - if (properties.value === 1) - return "value: multiple values"; - properties.value = 1; - { - var error = $root.tendermint.abci.types.ResponseCommit.verify(message.commit); - if (error) - return "commit." + error; - } - } - return null; - }; - - /** - * Creates a Response message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.Response - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.Response} Response - */ - Response.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.Response) - return object; - var message = new $root.tendermint.abci.types.Response(); - if (object.exception != null) { - if (typeof object.exception !== "object") - throw TypeError(".tendermint.abci.types.Response.exception: object expected"); - message.exception = $root.tendermint.abci.types.ResponseException.fromObject(object.exception); - } - if (object.echo != null) { - if (typeof object.echo !== "object") - throw TypeError(".tendermint.abci.types.Response.echo: object expected"); - message.echo = $root.tendermint.abci.types.ResponseEcho.fromObject(object.echo); - } - if (object.flush != null) { - if (typeof object.flush !== "object") - throw TypeError(".tendermint.abci.types.Response.flush: object expected"); - message.flush = $root.tendermint.abci.types.ResponseFlush.fromObject(object.flush); - } - if (object.info != null) { - if (typeof object.info !== "object") - throw TypeError(".tendermint.abci.types.Response.info: object expected"); - message.info = $root.tendermint.abci.types.ResponseInfo.fromObject(object.info); - } - if (object.setOption != null) { - if (typeof object.setOption !== "object") - throw TypeError(".tendermint.abci.types.Response.setOption: object expected"); - message.setOption = $root.tendermint.abci.types.ResponseSetOption.fromObject(object.setOption); - } - if (object.initChain != null) { - if (typeof object.initChain !== "object") - throw TypeError(".tendermint.abci.types.Response.initChain: object expected"); - message.initChain = $root.tendermint.abci.types.ResponseInitChain.fromObject(object.initChain); - } - if (object.query != null) { - if (typeof object.query !== "object") - throw TypeError(".tendermint.abci.types.Response.query: object expected"); - message.query = $root.tendermint.abci.types.ResponseQuery.fromObject(object.query); - } - if (object.beginBlock != null) { - if (typeof object.beginBlock !== "object") - throw TypeError(".tendermint.abci.types.Response.beginBlock: object expected"); - message.beginBlock = $root.tendermint.abci.types.ResponseBeginBlock.fromObject(object.beginBlock); - } - if (object.checkTx != null) { - if (typeof object.checkTx !== "object") - throw TypeError(".tendermint.abci.types.Response.checkTx: object expected"); - message.checkTx = $root.tendermint.abci.types.ResponseCheckTx.fromObject(object.checkTx); - } - if (object.deliverTx != null) { - if (typeof object.deliverTx !== "object") - throw TypeError(".tendermint.abci.types.Response.deliverTx: object expected"); - message.deliverTx = $root.tendermint.abci.types.ResponseDeliverTx.fromObject(object.deliverTx); - } - if (object.endBlock != null) { - if (typeof object.endBlock !== "object") - throw TypeError(".tendermint.abci.types.Response.endBlock: object expected"); - message.endBlock = $root.tendermint.abci.types.ResponseEndBlock.fromObject(object.endBlock); - } - if (object.commit != null) { - if (typeof object.commit !== "object") - throw TypeError(".tendermint.abci.types.Response.commit: object expected"); - message.commit = $root.tendermint.abci.types.ResponseCommit.fromObject(object.commit); - } - return message; - }; - - /** - * Creates a plain object from a Response message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.Response - * @static - * @param {tendermint.abci.types.Response} message Response - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Response.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.exception != null && message.hasOwnProperty("exception")) { - object.exception = $root.tendermint.abci.types.ResponseException.toObject(message.exception, options); - if (options.oneofs) - object.value = "exception"; - } - if (message.echo != null && message.hasOwnProperty("echo")) { - object.echo = $root.tendermint.abci.types.ResponseEcho.toObject(message.echo, options); - if (options.oneofs) - object.value = "echo"; - } - if (message.flush != null && message.hasOwnProperty("flush")) { - object.flush = $root.tendermint.abci.types.ResponseFlush.toObject(message.flush, options); - if (options.oneofs) - object.value = "flush"; - } - if (message.info != null && message.hasOwnProperty("info")) { - object.info = $root.tendermint.abci.types.ResponseInfo.toObject(message.info, options); - if (options.oneofs) - object.value = "info"; - } - if (message.setOption != null && message.hasOwnProperty("setOption")) { - object.setOption = $root.tendermint.abci.types.ResponseSetOption.toObject(message.setOption, options); - if (options.oneofs) - object.value = "setOption"; - } - if (message.initChain != null && message.hasOwnProperty("initChain")) { - object.initChain = $root.tendermint.abci.types.ResponseInitChain.toObject(message.initChain, options); - if (options.oneofs) - object.value = "initChain"; - } - if (message.query != null && message.hasOwnProperty("query")) { - object.query = $root.tendermint.abci.types.ResponseQuery.toObject(message.query, options); - if (options.oneofs) - object.value = "query"; - } - if (message.beginBlock != null && message.hasOwnProperty("beginBlock")) { - object.beginBlock = $root.tendermint.abci.types.ResponseBeginBlock.toObject(message.beginBlock, options); - if (options.oneofs) - object.value = "beginBlock"; - } - if (message.checkTx != null && message.hasOwnProperty("checkTx")) { - object.checkTx = $root.tendermint.abci.types.ResponseCheckTx.toObject(message.checkTx, options); - if (options.oneofs) - object.value = "checkTx"; - } - if (message.deliverTx != null && message.hasOwnProperty("deliverTx")) { - object.deliverTx = $root.tendermint.abci.types.ResponseDeliverTx.toObject(message.deliverTx, options); - if (options.oneofs) - object.value = "deliverTx"; - } - if (message.endBlock != null && message.hasOwnProperty("endBlock")) { - object.endBlock = $root.tendermint.abci.types.ResponseEndBlock.toObject(message.endBlock, options); - if (options.oneofs) - object.value = "endBlock"; - } - if (message.commit != null && message.hasOwnProperty("commit")) { - object.commit = $root.tendermint.abci.types.ResponseCommit.toObject(message.commit, options); - if (options.oneofs) - object.value = "commit"; - } - return object; - }; - - /** - * Converts this Response to JSON. - * @function toJSON - * @memberof tendermint.abci.types.Response - * @instance - * @returns {Object.} JSON object - */ - Response.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Response; @@ -39540,13 +19567,13 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseException. * @implements IResponseException * @constructor - * @param {tendermint.abci.types.IResponseException=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseException=} [p] Properties to set */ - function ResponseException(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -39574,29 +19601,16 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseException * @static - * @param {tendermint.abci.types.IResponseException} message ResponseException message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseException} m ResponseException message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseException.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.error); - return writer; - }; - - /** - * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseException - * @static - * @param {tendermint.abci.types.IResponseException} message ResponseException message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseException.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -39604,109 +19618,28 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseException * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseException} ResponseException * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseException.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseException(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.error = reader.string(); + m.error = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseException message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseException - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseException} ResponseException - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseException.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseException message. - * @function verify - * @memberof tendermint.abci.types.ResponseException - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseException.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.error != null && message.hasOwnProperty("error")) - if (!$util.isString(message.error)) - return "error: string expected"; - return null; - }; - - /** - * Creates a ResponseException message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseException - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseException} ResponseException - */ - ResponseException.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseException) - return object; - var message = new $root.tendermint.abci.types.ResponseException(); - if (object.error != null) - message.error = String(object.error); - return message; - }; - - /** - * Creates a plain object from a ResponseException message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseException - * @static - * @param {tendermint.abci.types.ResponseException} message ResponseException - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseException.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.error = ""; - if (message.error != null && message.hasOwnProperty("error")) - object.error = message.error; - return object; - }; - - /** - * Converts this ResponseException to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseException - * @instance - * @returns {Object.} JSON object - */ - ResponseException.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseException; @@ -39727,13 +19660,13 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseEcho. * @implements IResponseEcho * @constructor - * @param {tendermint.abci.types.IResponseEcho=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseEcho=} [p] Properties to set */ - function ResponseEcho(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -39761,29 +19694,16 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseEcho * @static - * @param {tendermint.abci.types.IResponseEcho} message ResponseEcho message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseEcho} m ResponseEcho message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseEcho.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.message); - return writer; - }; - - /** - * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseEcho - * @static - * @param {tendermint.abci.types.IResponseEcho} message ResponseEcho message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseEcho.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -39791,109 +19711,28 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseEcho * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseEcho} ResponseEcho * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseEcho.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseEcho(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.message = reader.string(); + m.message = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseEcho message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseEcho - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseEcho} ResponseEcho - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseEcho.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseEcho message. - * @function verify - * @memberof tendermint.abci.types.ResponseEcho - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseEcho.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a ResponseEcho message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseEcho - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseEcho} ResponseEcho - */ - ResponseEcho.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseEcho) - return object; - var message = new $root.tendermint.abci.types.ResponseEcho(); - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a ResponseEcho message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseEcho - * @static - * @param {tendermint.abci.types.ResponseEcho} message ResponseEcho - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseEcho.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.message = ""; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this ResponseEcho to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseEcho - * @instance - * @returns {Object.} JSON object - */ - ResponseEcho.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseEcho; @@ -39913,13 +19752,13 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseFlush. * @implements IResponseFlush * @constructor - * @param {tendermint.abci.types.IResponseFlush=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseFlush=} [p] Properties to set */ - function ResponseFlush(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -39939,27 +19778,14 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseFlush * @static - * @param {tendermint.abci.types.IResponseFlush} message ResponseFlush message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseFlush} m ResponseFlush message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseFlush.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseFlush - * @static - * @param {tendermint.abci.types.IResponseFlush} message ResponseFlush message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseFlush.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + ResponseFlush.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + return w; }; /** @@ -39967,93 +19793,25 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseFlush * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseFlush} ResponseFlush * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseFlush.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseFlush(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseFlush message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseFlush - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseFlush} ResponseFlush - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseFlush.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseFlush message. - * @function verify - * @memberof tendermint.abci.types.ResponseFlush - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseFlush.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a ResponseFlush message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseFlush - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseFlush} ResponseFlush - */ - ResponseFlush.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseFlush) - return object; - return new $root.tendermint.abci.types.ResponseFlush(); - }; - - /** - * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseFlush - * @static - * @param {tendermint.abci.types.ResponseFlush} message ResponseFlush - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseFlush.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ResponseFlush to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseFlush - * @instance - * @returns {Object.} JSON object - */ - ResponseFlush.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseFlush; @@ -40078,13 +19836,13 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseInfo. * @implements IResponseInfo * @constructor - * @param {tendermint.abci.types.IResponseInfo=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseInfo=} [p] Properties to set */ - function ResponseInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -40144,37 +19902,24 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseInfo * @static - * @param {tendermint.abci.types.IResponseInfo} message ResponseInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseInfo} m ResponseInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.data); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); - if (message.appVersion != null && Object.hasOwnProperty.call(message, "appVersion")) - writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.appVersion); - if (message.lastBlockHeight != null && Object.hasOwnProperty.call(message, "lastBlockHeight")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.lastBlockHeight); - if (message.lastBlockAppHash != null && Object.hasOwnProperty.call(message, "lastBlockAppHash")) - writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.lastBlockAppHash); - return writer; - }; - - /** - * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseInfo - * @static - * @param {tendermint.abci.types.IResponseInfo} message ResponseInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -40182,191 +19927,40 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseInfo} ResponseInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.data = reader.string(); + m.data = r.string(); break; case 2: - message.version = reader.string(); + m.version = r.string(); break; case 3: - message.appVersion = reader.uint64(); + m.appVersion = r.uint64(); break; case 4: - message.lastBlockHeight = reader.int64(); + m.lastBlockHeight = r.int64(); break; case 5: - message.lastBlockAppHash = reader.bytes(); + m.lastBlockAppHash = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseInfo} ResponseInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseInfo message. - * @function verify - * @memberof tendermint.abci.types.ResponseInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!$util.isString(message.data)) - return "data: string expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.appVersion != null && message.hasOwnProperty("appVersion")) - if (!$util.isInteger(message.appVersion) && !(message.appVersion && $util.isInteger(message.appVersion.low) && $util.isInteger(message.appVersion.high))) - return "appVersion: integer|Long expected"; - if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) - if (!$util.isInteger(message.lastBlockHeight) && !(message.lastBlockHeight && $util.isInteger(message.lastBlockHeight.low) && $util.isInteger(message.lastBlockHeight.high))) - return "lastBlockHeight: integer|Long expected"; - if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) - if (!(message.lastBlockAppHash && typeof message.lastBlockAppHash.length === "number" || $util.isString(message.lastBlockAppHash))) - return "lastBlockAppHash: buffer expected"; - return null; - }; - - /** - * Creates a ResponseInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseInfo - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseInfo} ResponseInfo - */ - ResponseInfo.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseInfo) - return object; - var message = new $root.tendermint.abci.types.ResponseInfo(); - if (object.data != null) - message.data = String(object.data); - if (object.version != null) - message.version = String(object.version); - if (object.appVersion != null) - if ($util.Long) - (message.appVersion = $util.Long.fromValue(object.appVersion)).unsigned = true; - else if (typeof object.appVersion === "string") - message.appVersion = parseInt(object.appVersion, 10); - else if (typeof object.appVersion === "number") - message.appVersion = object.appVersion; - else if (typeof object.appVersion === "object") - message.appVersion = new $util.LongBits(object.appVersion.low >>> 0, object.appVersion.high >>> 0).toNumber(true); - if (object.lastBlockHeight != null) - if ($util.Long) - (message.lastBlockHeight = $util.Long.fromValue(object.lastBlockHeight)).unsigned = false; - else if (typeof object.lastBlockHeight === "string") - message.lastBlockHeight = parseInt(object.lastBlockHeight, 10); - else if (typeof object.lastBlockHeight === "number") - message.lastBlockHeight = object.lastBlockHeight; - else if (typeof object.lastBlockHeight === "object") - message.lastBlockHeight = new $util.LongBits(object.lastBlockHeight.low >>> 0, object.lastBlockHeight.high >>> 0).toNumber(); - if (object.lastBlockAppHash != null) - if (typeof object.lastBlockAppHash === "string") - $util.base64.decode(object.lastBlockAppHash, message.lastBlockAppHash = $util.newBuffer($util.base64.length(object.lastBlockAppHash)), 0); - else if (object.lastBlockAppHash.length) - message.lastBlockAppHash = object.lastBlockAppHash; - return message; - }; - - /** - * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseInfo - * @static - * @param {tendermint.abci.types.ResponseInfo} message ResponseInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.data = ""; - object.version = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.appVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.appVersion = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.lastBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.lastBlockHeight = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.lastBlockAppHash = ""; - else { - object.lastBlockAppHash = []; - if (options.bytes !== Array) - object.lastBlockAppHash = $util.newBuffer(object.lastBlockAppHash); - } - } - if (message.data != null && message.hasOwnProperty("data")) - object.data = message.data; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.appVersion != null && message.hasOwnProperty("appVersion")) - if (typeof message.appVersion === "number") - object.appVersion = options.longs === String ? String(message.appVersion) : message.appVersion; - else - object.appVersion = options.longs === String ? $util.Long.prototype.toString.call(message.appVersion) : options.longs === Number ? new $util.LongBits(message.appVersion.low >>> 0, message.appVersion.high >>> 0).toNumber(true) : message.appVersion; - if (message.lastBlockHeight != null && message.hasOwnProperty("lastBlockHeight")) - if (typeof message.lastBlockHeight === "number") - object.lastBlockHeight = options.longs === String ? String(message.lastBlockHeight) : message.lastBlockHeight; - else - object.lastBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.lastBlockHeight) : options.longs === Number ? new $util.LongBits(message.lastBlockHeight.low >>> 0, message.lastBlockHeight.high >>> 0).toNumber() : message.lastBlockHeight; - if (message.lastBlockAppHash != null && message.hasOwnProperty("lastBlockAppHash")) - object.lastBlockAppHash = options.bytes === String ? $util.base64.encode(message.lastBlockAppHash, 0, message.lastBlockAppHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastBlockAppHash) : message.lastBlockAppHash; - return object; - }; - - /** - * Converts this ResponseInfo to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseInfo - * @instance - * @returns {Object.} JSON object - */ - ResponseInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseInfo; @@ -40389,13 +19983,13 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseSetOption. * @implements IResponseSetOption * @constructor - * @param {tendermint.abci.types.IResponseSetOption=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseSetOption=} [p] Properties to set */ - function ResponseSetOption(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -40439,33 +20033,20 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseSetOption * @static - * @param {tendermint.abci.types.IResponseSetOption} message ResponseSetOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseSetOption} m ResponseSetOption message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseSetOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); - if (message.log != null && Object.hasOwnProperty.call(message, "log")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); - return writer; - }; - - /** - * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseSetOption - * @static - * @param {tendermint.abci.types.IResponseSetOption} message ResponseSetOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseSetOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -40473,132 +20054,34 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseSetOption * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseSetOption} ResponseSetOption * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseSetOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseSetOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.code = reader.uint32(); + m.code = r.uint32(); break; case 3: - message.log = reader.string(); + m.log = r.string(); break; case 4: - message.info = reader.string(); + m.info = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseSetOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseSetOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseSetOption} ResponseSetOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseSetOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseSetOption message. - * @function verify - * @memberof tendermint.abci.types.ResponseSetOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseSetOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.log != null && message.hasOwnProperty("log")) - if (!$util.isString(message.log)) - return "log: string expected"; - if (message.info != null && message.hasOwnProperty("info")) - if (!$util.isString(message.info)) - return "info: string expected"; - return null; - }; - - /** - * Creates a ResponseSetOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseSetOption - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseSetOption} ResponseSetOption - */ - ResponseSetOption.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseSetOption) - return object; - var message = new $root.tendermint.abci.types.ResponseSetOption(); - if (object.code != null) - message.code = object.code >>> 0; - if (object.log != null) - message.log = String(object.log); - if (object.info != null) - message.info = String(object.info); - return message; - }; - - /** - * Creates a plain object from a ResponseSetOption message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseSetOption - * @static - * @param {tendermint.abci.types.ResponseSetOption} message ResponseSetOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseSetOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.code = 0; - object.log = ""; - object.info = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.log != null && message.hasOwnProperty("log")) - object.log = message.log; - if (message.info != null && message.hasOwnProperty("info")) - object.info = message.info; - return object; - }; - - /** - * Converts this ResponseSetOption to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseSetOption - * @instance - * @returns {Object.} JSON object - */ - ResponseSetOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseSetOption; @@ -40620,14 +20103,14 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseInitChain. * @implements IResponseInitChain * @constructor - * @param {tendermint.abci.types.IResponseInitChain=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseInitChain=} [p] Properties to set */ - function ResponseInitChain(properties) { + function ResponseInitChain(p) { this.validators = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -40663,32 +20146,20 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseInitChain * @static - * @param {tendermint.abci.types.IResponseInitChain} message ResponseInitChain message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseInitChain} m ResponseInitChain message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseInitChain.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.consensusParams != null && Object.hasOwnProperty.call(message, "consensusParams")) - $root.tendermint.abci.types.ConsensusParams.encode(message.consensusParams, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.validators != null && message.validators.length) - for (var i = 0; i < message.validators.length; ++i) - $root.tendermint.abci.types.ValidatorUpdate.encode(message.validators[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseInitChain - * @static - * @param {tendermint.abci.types.IResponseInitChain} message ResponseInitChain message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseInitChain.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -40696,145 +20167,33 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseInitChain * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseInitChain} ResponseInitChain * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseInitChain.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseInitChain(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.consensusParams = $root.tendermint.abci.types.ConsensusParams.decode(reader, reader.uint32()); + m.consensusParams = $root.tendermint.abci.types.ConsensusParams.decode(r, r.uint32()); break; case 2: - if (!(message.validators && message.validators.length)) - message.validators = []; - message.validators.push($root.tendermint.abci.types.ValidatorUpdate.decode(reader, reader.uint32())); + if (!(m.validators && m.validators.length)) + m.validators = []; + m.validators.push($root.tendermint.abci.types.ValidatorUpdate.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseInitChain message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseInitChain - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseInitChain} ResponseInitChain - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseInitChain.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseInitChain message. - * @function verify - * @memberof tendermint.abci.types.ResponseInitChain - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseInitChain.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) { - var error = $root.tendermint.abci.types.ConsensusParams.verify(message.consensusParams); - if (error) - return "consensusParams." + error; - } - if (message.validators != null && message.hasOwnProperty("validators")) { - if (!Array.isArray(message.validators)) - return "validators: array expected"; - for (var i = 0; i < message.validators.length; ++i) { - var error = $root.tendermint.abci.types.ValidatorUpdate.verify(message.validators[i]); - if (error) - return "validators." + error; - } - } - return null; - }; - - /** - * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseInitChain - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseInitChain} ResponseInitChain - */ - ResponseInitChain.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseInitChain) - return object; - var message = new $root.tendermint.abci.types.ResponseInitChain(); - if (object.consensusParams != null) { - if (typeof object.consensusParams !== "object") - throw TypeError(".tendermint.abci.types.ResponseInitChain.consensusParams: object expected"); - message.consensusParams = $root.tendermint.abci.types.ConsensusParams.fromObject(object.consensusParams); - } - if (object.validators) { - if (!Array.isArray(object.validators)) - throw TypeError(".tendermint.abci.types.ResponseInitChain.validators: array expected"); - message.validators = []; - for (var i = 0; i < object.validators.length; ++i) { - if (typeof object.validators[i] !== "object") - throw TypeError(".tendermint.abci.types.ResponseInitChain.validators: object expected"); - message.validators[i] = $root.tendermint.abci.types.ValidatorUpdate.fromObject(object.validators[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseInitChain - * @static - * @param {tendermint.abci.types.ResponseInitChain} message ResponseInitChain - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseInitChain.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.validators = []; - if (options.defaults) - object.consensusParams = null; - if (message.consensusParams != null && message.hasOwnProperty("consensusParams")) - object.consensusParams = $root.tendermint.abci.types.ConsensusParams.toObject(message.consensusParams, options); - if (message.validators && message.validators.length) { - object.validators = []; - for (var j = 0; j < message.validators.length; ++j) - object.validators[j] = $root.tendermint.abci.types.ValidatorUpdate.toObject(message.validators[j], options); - } - return object; - }; - - /** - * Converts this ResponseInitChain to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseInitChain - * @instance - * @returns {Object.} JSON object - */ - ResponseInitChain.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseInitChain; @@ -40863,13 +20222,13 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseQuery. * @implements IResponseQuery * @constructor - * @param {tendermint.abci.types.IResponseQuery=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseQuery=} [p] Properties to set */ - function ResponseQuery(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -40961,45 +20320,32 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseQuery * @static - * @param {tendermint.abci.types.IResponseQuery} message ResponseQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseQuery} m ResponseQuery message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseQuery.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); - if (message.log != null && Object.hasOwnProperty.call(message, "log")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.index); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.value); - if (message.proof != null && Object.hasOwnProperty.call(message, "proof")) - $root.tendermint.crypto.merkle.Proof.encode(message.proof, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 9, wireType 0 =*/72).int64(message.height); - if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.codespace); - return writer; - }; - - /** - * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseQuery - * @static - * @param {tendermint.abci.types.IResponseQuery} message ResponseQuery message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseQuery.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -41007,249 +20353,52 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseQuery * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseQuery} ResponseQuery * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseQuery.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseQuery(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.code = reader.uint32(); + m.code = r.uint32(); break; case 3: - message.log = reader.string(); + m.log = r.string(); break; case 4: - message.info = reader.string(); + m.info = r.string(); break; case 5: - message.index = reader.int64(); + m.index = r.int64(); break; case 6: - message.key = reader.bytes(); + m.key = r.bytes(); break; case 7: - message.value = reader.bytes(); + m.value = r.bytes(); break; case 8: - message.proof = $root.tendermint.crypto.merkle.Proof.decode(reader, reader.uint32()); + m.proof = $root.tendermint.crypto.merkle.Proof.decode(r, r.uint32()); break; case 9: - message.height = reader.int64(); + m.height = r.int64(); break; case 10: - message.codespace = reader.string(); + m.codespace = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseQuery message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseQuery - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseQuery} ResponseQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseQuery.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseQuery message. - * @function verify - * @memberof tendermint.abci.types.ResponseQuery - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseQuery.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.log != null && message.hasOwnProperty("log")) - if (!$util.isString(message.log)) - return "log: string expected"; - if (message.info != null && message.hasOwnProperty("info")) - if (!$util.isString(message.info)) - return "info: string expected"; - if (message.index != null && message.hasOwnProperty("index")) - if (!$util.isInteger(message.index) && !(message.index && $util.isInteger(message.index.low) && $util.isInteger(message.index.high))) - return "index: integer|Long expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - if (message.proof != null && message.hasOwnProperty("proof")) { - var error = $root.tendermint.crypto.merkle.Proof.verify(message.proof); - if (error) - return "proof." + error; - } - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) - return "height: integer|Long expected"; - if (message.codespace != null && message.hasOwnProperty("codespace")) - if (!$util.isString(message.codespace)) - return "codespace: string expected"; - return null; - }; - - /** - * Creates a ResponseQuery message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseQuery - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseQuery} ResponseQuery - */ - ResponseQuery.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseQuery) - return object; - var message = new $root.tendermint.abci.types.ResponseQuery(); - if (object.code != null) - message.code = object.code >>> 0; - if (object.log != null) - message.log = String(object.log); - if (object.info != null) - message.info = String(object.info); - if (object.index != null) - if ($util.Long) - (message.index = $util.Long.fromValue(object.index)).unsigned = false; - else if (typeof object.index === "string") - message.index = parseInt(object.index, 10); - else if (typeof object.index === "number") - message.index = object.index; - else if (typeof object.index === "object") - message.index = new $util.LongBits(object.index.low >>> 0, object.index.high >>> 0).toNumber(); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - if (object.proof != null) { - if (typeof object.proof !== "object") - throw TypeError(".tendermint.abci.types.ResponseQuery.proof: object expected"); - message.proof = $root.tendermint.crypto.merkle.Proof.fromObject(object.proof); - } - if (object.height != null) - if ($util.Long) - (message.height = $util.Long.fromValue(object.height)).unsigned = false; - else if (typeof object.height === "string") - message.height = parseInt(object.height, 10); - else if (typeof object.height === "number") - message.height = object.height; - else if (typeof object.height === "object") - message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); - if (object.codespace != null) - message.codespace = String(object.codespace); - return message; - }; - - /** - * Creates a plain object from a ResponseQuery message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseQuery - * @static - * @param {tendermint.abci.types.ResponseQuery} message ResponseQuery - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseQuery.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.code = 0; - object.log = ""; - object.info = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.index = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.index = options.longs === String ? "0" : 0; - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - object.proof = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.codespace = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.log != null && message.hasOwnProperty("log")) - object.log = message.log; - if (message.info != null && message.hasOwnProperty("info")) - object.info = message.info; - if (message.index != null && message.hasOwnProperty("index")) - if (typeof message.index === "number") - object.index = options.longs === String ? String(message.index) : message.index; - else - object.index = options.longs === String ? $util.Long.prototype.toString.call(message.index) : options.longs === Number ? new $util.LongBits(message.index.low >>> 0, message.index.high >>> 0).toNumber() : message.index; - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - if (message.proof != null && message.hasOwnProperty("proof")) - object.proof = $root.tendermint.crypto.merkle.Proof.toObject(message.proof, options); - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height === "number") - object.height = options.longs === String ? String(message.height) : message.height; - else - object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; - if (message.codespace != null && message.hasOwnProperty("codespace")) - object.codespace = message.codespace; - return object; - }; - - /** - * Converts this ResponseQuery to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseQuery - * @instance - * @returns {Object.} JSON object - */ - ResponseQuery.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseQuery; @@ -41270,14 +20419,14 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseBeginBlock. * @implements IResponseBeginBlock * @constructor - * @param {tendermint.abci.types.IResponseBeginBlock=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseBeginBlock=} [p] Properties to set */ - function ResponseBeginBlock(properties) { + function ResponseBeginBlock(p) { this.events = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -41305,30 +20454,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseBeginBlock * @static - * @param {tendermint.abci.types.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseBeginBlock} m ResponseBeginBlock message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseBeginBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseBeginBlock - * @static - * @param {tendermint.abci.types.IResponseBeginBlock} message ResponseBeginBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseBeginBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -41336,128 +20473,30 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseBeginBlock * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseBeginBlock} ResponseBeginBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseBeginBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseBeginBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + if (!(m.events && m.events.length)) + m.events = []; + m.events.push($root.tendermint.abci.types.Event.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseBeginBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseBeginBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseBeginBlock} ResponseBeginBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseBeginBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseBeginBlock message. - * @function verify - * @memberof tendermint.abci.types.ResponseBeginBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseBeginBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.tendermint.abci.types.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - return null; - }; - - /** - * Creates a ResponseBeginBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseBeginBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseBeginBlock} ResponseBeginBlock - */ - ResponseBeginBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseBeginBlock) - return object; - var message = new $root.tendermint.abci.types.ResponseBeginBlock(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".tendermint.abci.types.ResponseBeginBlock.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".tendermint.abci.types.ResponseBeginBlock.events: object expected"); - message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ResponseBeginBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseBeginBlock - * @static - * @param {tendermint.abci.types.ResponseBeginBlock} message ResponseBeginBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseBeginBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this ResponseBeginBlock to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseBeginBlock - * @instance - * @returns {Object.} JSON object - */ - ResponseBeginBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseBeginBlock; @@ -41485,14 +20524,14 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseCheckTx. * @implements IResponseCheckTx * @constructor - * @param {tendermint.abci.types.IResponseCheckTx=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseCheckTx=} [p] Properties to set */ - function ResponseCheckTx(properties) { + function ResponseCheckTx(p) { this.events = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -41576,44 +20615,32 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseCheckTx * @static - * @param {tendermint.abci.types.IResponseCheckTx} message ResponseCheckTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseCheckTx} m ResponseCheckTx message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseCheckTx.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - if (message.log != null && Object.hasOwnProperty.call(message, "log")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); - if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); - if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); - return writer; - }; - - /** - * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseCheckTx - * @static - * @param {tendermint.abci.types.IResponseCheckTx} message ResponseCheckTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseCheckTx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -41621,244 +20648,51 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseCheckTx * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseCheckTx} ResponseCheckTx * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseCheckTx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseCheckTx(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.code = reader.uint32(); + m.code = r.uint32(); break; case 2: - message.data = reader.bytes(); + m.data = r.bytes(); break; case 3: - message.log = reader.string(); + m.log = r.string(); break; case 4: - message.info = reader.string(); + m.info = r.string(); break; case 5: - message.gasWanted = reader.int64(); + m.gasWanted = r.int64(); break; case 6: - message.gasUsed = reader.int64(); + m.gasUsed = r.int64(); break; case 7: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + if (!(m.events && m.events.length)) + m.events = []; + m.events.push($root.tendermint.abci.types.Event.decode(r, r.uint32())); break; case 8: - message.codespace = reader.string(); + m.codespace = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseCheckTx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseCheckTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseCheckTx} ResponseCheckTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseCheckTx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseCheckTx message. - * @function verify - * @memberof tendermint.abci.types.ResponseCheckTx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseCheckTx.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - if (message.log != null && message.hasOwnProperty("log")) - if (!$util.isString(message.log)) - return "log: string expected"; - if (message.info != null && message.hasOwnProperty("info")) - if (!$util.isString(message.info)) - return "info: string expected"; - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) - return "gasWanted: integer|Long expected"; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) - return "gasUsed: integer|Long expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.tendermint.abci.types.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - if (message.codespace != null && message.hasOwnProperty("codespace")) - if (!$util.isString(message.codespace)) - return "codespace: string expected"; - return null; - }; - - /** - * Creates a ResponseCheckTx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseCheckTx - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseCheckTx} ResponseCheckTx - */ - ResponseCheckTx.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseCheckTx) - return object; - var message = new $root.tendermint.abci.types.ResponseCheckTx(); - if (object.code != null) - message.code = object.code >>> 0; - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - if (object.log != null) - message.log = String(object.log); - if (object.info != null) - message.info = String(object.info); - if (object.gasWanted != null) - if ($util.Long) - (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; - else if (typeof object.gasWanted === "string") - message.gasWanted = parseInt(object.gasWanted, 10); - else if (typeof object.gasWanted === "number") - message.gasWanted = object.gasWanted; - else if (typeof object.gasWanted === "object") - message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); - if (object.gasUsed != null) - if ($util.Long) - (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; - else if (typeof object.gasUsed === "string") - message.gasUsed = parseInt(object.gasUsed, 10); - else if (typeof object.gasUsed === "number") - message.gasUsed = object.gasUsed; - else if (typeof object.gasUsed === "object") - message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".tendermint.abci.types.ResponseCheckTx.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".tendermint.abci.types.ResponseCheckTx.events: object expected"); - message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); - } - } - if (object.codespace != null) - message.codespace = String(object.codespace); - return message; - }; - - /** - * Creates a plain object from a ResponseCheckTx message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseCheckTx - * @static - * @param {tendermint.abci.types.ResponseCheckTx} message ResponseCheckTx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseCheckTx.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (options.defaults) { - object.code = 0; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.log = ""; - object.info = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasWanted = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasUsed = options.longs === String ? "0" : 0; - object.codespace = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.log != null && message.hasOwnProperty("log")) - object.log = message.log; - if (message.info != null && message.hasOwnProperty("info")) - object.info = message.info; - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (typeof message.gasWanted === "number") - object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; - else - object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (typeof message.gasUsed === "number") - object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; - else - object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); - } - if (message.codespace != null && message.hasOwnProperty("codespace")) - object.codespace = message.codespace; - return object; - }; - - /** - * Converts this ResponseCheckTx to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseCheckTx - * @instance - * @returns {Object.} JSON object - */ - ResponseCheckTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseCheckTx; @@ -41886,14 +20720,14 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseDeliverTx. * @implements IResponseDeliverTx * @constructor - * @param {tendermint.abci.types.IResponseDeliverTx=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseDeliverTx=} [p] Properties to set */ - function ResponseDeliverTx(properties) { + function ResponseDeliverTx(p) { this.events = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -41977,44 +20811,32 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseDeliverTx * @static - * @param {tendermint.abci.types.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseDeliverTx} m ResponseDeliverTx message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseDeliverTx.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.code); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - if (message.log != null && Object.hasOwnProperty.call(message, "log")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.log); - if (message.info != null && Object.hasOwnProperty.call(message, "info")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.info); - if (message.gasWanted != null && Object.hasOwnProperty.call(message, "gasWanted")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.gasWanted); - if (message.gasUsed != null && Object.hasOwnProperty.call(message, "gasUsed")) - writer.uint32(/* id 6, wireType 0 =*/48).int64(message.gasUsed); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.codespace != null && Object.hasOwnProperty.call(message, "codespace")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.codespace); - return writer; - }; - - /** - * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseDeliverTx - * @static - * @param {tendermint.abci.types.IResponseDeliverTx} message ResponseDeliverTx message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseDeliverTx.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -42022,244 +20844,51 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseDeliverTx * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseDeliverTx} ResponseDeliverTx * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseDeliverTx.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseDeliverTx(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.code = reader.uint32(); + m.code = r.uint32(); break; case 2: - message.data = reader.bytes(); + m.data = r.bytes(); break; case 3: - message.log = reader.string(); + m.log = r.string(); break; case 4: - message.info = reader.string(); + m.info = r.string(); break; case 5: - message.gasWanted = reader.int64(); + m.gasWanted = r.int64(); break; case 6: - message.gasUsed = reader.int64(); + m.gasUsed = r.int64(); break; case 7: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + if (!(m.events && m.events.length)) + m.events = []; + m.events.push($root.tendermint.abci.types.Event.decode(r, r.uint32())); break; case 8: - message.codespace = reader.string(); + m.codespace = r.string(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseDeliverTx message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseDeliverTx - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseDeliverTx} ResponseDeliverTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseDeliverTx.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseDeliverTx message. - * @function verify - * @memberof tendermint.abci.types.ResponseDeliverTx - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseDeliverTx.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - if (!$util.isInteger(message.code)) - return "code: integer expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - if (message.log != null && message.hasOwnProperty("log")) - if (!$util.isString(message.log)) - return "log: string expected"; - if (message.info != null && message.hasOwnProperty("info")) - if (!$util.isString(message.info)) - return "info: string expected"; - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (!$util.isInteger(message.gasWanted) && !(message.gasWanted && $util.isInteger(message.gasWanted.low) && $util.isInteger(message.gasWanted.high))) - return "gasWanted: integer|Long expected"; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (!$util.isInteger(message.gasUsed) && !(message.gasUsed && $util.isInteger(message.gasUsed.low) && $util.isInteger(message.gasUsed.high))) - return "gasUsed: integer|Long expected"; - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.tendermint.abci.types.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - if (message.codespace != null && message.hasOwnProperty("codespace")) - if (!$util.isString(message.codespace)) - return "codespace: string expected"; - return null; - }; - - /** - * Creates a ResponseDeliverTx message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseDeliverTx - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseDeliverTx} ResponseDeliverTx - */ - ResponseDeliverTx.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseDeliverTx) - return object; - var message = new $root.tendermint.abci.types.ResponseDeliverTx(); - if (object.code != null) - message.code = object.code >>> 0; - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - if (object.log != null) - message.log = String(object.log); - if (object.info != null) - message.info = String(object.info); - if (object.gasWanted != null) - if ($util.Long) - (message.gasWanted = $util.Long.fromValue(object.gasWanted)).unsigned = false; - else if (typeof object.gasWanted === "string") - message.gasWanted = parseInt(object.gasWanted, 10); - else if (typeof object.gasWanted === "number") - message.gasWanted = object.gasWanted; - else if (typeof object.gasWanted === "object") - message.gasWanted = new $util.LongBits(object.gasWanted.low >>> 0, object.gasWanted.high >>> 0).toNumber(); - if (object.gasUsed != null) - if ($util.Long) - (message.gasUsed = $util.Long.fromValue(object.gasUsed)).unsigned = false; - else if (typeof object.gasUsed === "string") - message.gasUsed = parseInt(object.gasUsed, 10); - else if (typeof object.gasUsed === "number") - message.gasUsed = object.gasUsed; - else if (typeof object.gasUsed === "object") - message.gasUsed = new $util.LongBits(object.gasUsed.low >>> 0, object.gasUsed.high >>> 0).toNumber(); - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".tendermint.abci.types.ResponseDeliverTx.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".tendermint.abci.types.ResponseDeliverTx.events: object expected"); - message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); - } - } - if (object.codespace != null) - message.codespace = String(object.codespace); - return message; - }; - - /** - * Creates a plain object from a ResponseDeliverTx message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseDeliverTx - * @static - * @param {tendermint.abci.types.ResponseDeliverTx} message ResponseDeliverTx - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseDeliverTx.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.events = []; - if (options.defaults) { - object.code = 0; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.log = ""; - object.info = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gasWanted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasWanted = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.gasUsed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.gasUsed = options.longs === String ? "0" : 0; - object.codespace = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - if (message.log != null && message.hasOwnProperty("log")) - object.log = message.log; - if (message.info != null && message.hasOwnProperty("info")) - object.info = message.info; - if (message.gasWanted != null && message.hasOwnProperty("gasWanted")) - if (typeof message.gasWanted === "number") - object.gasWanted = options.longs === String ? String(message.gasWanted) : message.gasWanted; - else - object.gasWanted = options.longs === String ? $util.Long.prototype.toString.call(message.gasWanted) : options.longs === Number ? new $util.LongBits(message.gasWanted.low >>> 0, message.gasWanted.high >>> 0).toNumber() : message.gasWanted; - if (message.gasUsed != null && message.hasOwnProperty("gasUsed")) - if (typeof message.gasUsed === "number") - object.gasUsed = options.longs === String ? String(message.gasUsed) : message.gasUsed; - else - object.gasUsed = options.longs === String ? $util.Long.prototype.toString.call(message.gasUsed) : options.longs === Number ? new $util.LongBits(message.gasUsed.low >>> 0, message.gasUsed.high >>> 0).toNumber() : message.gasUsed; - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); - } - if (message.codespace != null && message.hasOwnProperty("codespace")) - object.codespace = message.codespace; - return object; - }; - - /** - * Converts this ResponseDeliverTx to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseDeliverTx - * @instance - * @returns {Object.} JSON object - */ - ResponseDeliverTx.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseDeliverTx; @@ -42282,15 +20911,15 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseEndBlock. * @implements IResponseEndBlock * @constructor - * @param {tendermint.abci.types.IResponseEndBlock=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseEndBlock=} [p] Properties to set */ - function ResponseEndBlock(properties) { + function ResponseEndBlock(p) { this.validatorUpdates = []; this.events = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -42334,35 +20963,24 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseEndBlock * @static - * @param {tendermint.abci.types.IResponseEndBlock} message ResponseEndBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseEndBlock} m ResponseEndBlock message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseEndBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validatorUpdates != null && message.validatorUpdates.length) - for (var i = 0; i < message.validatorUpdates.length; ++i) - $root.tendermint.abci.types.ValidatorUpdate.encode(message.validatorUpdates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.consensusParamUpdates != null && Object.hasOwnProperty.call(message, "consensusParamUpdates")) - $root.tendermint.abci.types.ConsensusParams.encode(message.consensusParamUpdates, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.events != null && message.events.length) - for (var i = 0; i < message.events.length; ++i) - $root.tendermint.abci.types.Event.encode(message.events[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseEndBlock - * @static - * @param {tendermint.abci.types.IResponseEndBlock} message ResponseEndBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseEndBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -42370,176 +20988,38 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseEndBlock * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseEndBlock} ResponseEndBlock * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseEndBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseEndBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.validatorUpdates && message.validatorUpdates.length)) - message.validatorUpdates = []; - message.validatorUpdates.push($root.tendermint.abci.types.ValidatorUpdate.decode(reader, reader.uint32())); + if (!(m.validatorUpdates && m.validatorUpdates.length)) + m.validatorUpdates = []; + m.validatorUpdates.push($root.tendermint.abci.types.ValidatorUpdate.decode(r, r.uint32())); break; case 2: - message.consensusParamUpdates = $root.tendermint.abci.types.ConsensusParams.decode(reader, reader.uint32()); + m.consensusParamUpdates = $root.tendermint.abci.types.ConsensusParams.decode(r, r.uint32()); break; case 3: - if (!(message.events && message.events.length)) - message.events = []; - message.events.push($root.tendermint.abci.types.Event.decode(reader, reader.uint32())); + if (!(m.events && m.events.length)) + m.events = []; + m.events.push($root.tendermint.abci.types.Event.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseEndBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseEndBlock} ResponseEndBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseEndBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseEndBlock message. - * @function verify - * @memberof tendermint.abci.types.ResponseEndBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseEndBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validatorUpdates != null && message.hasOwnProperty("validatorUpdates")) { - if (!Array.isArray(message.validatorUpdates)) - return "validatorUpdates: array expected"; - for (var i = 0; i < message.validatorUpdates.length; ++i) { - var error = $root.tendermint.abci.types.ValidatorUpdate.verify(message.validatorUpdates[i]); - if (error) - return "validatorUpdates." + error; - } - } - if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) { - var error = $root.tendermint.abci.types.ConsensusParams.verify(message.consensusParamUpdates); - if (error) - return "consensusParamUpdates." + error; - } - if (message.events != null && message.hasOwnProperty("events")) { - if (!Array.isArray(message.events)) - return "events: array expected"; - for (var i = 0; i < message.events.length; ++i) { - var error = $root.tendermint.abci.types.Event.verify(message.events[i]); - if (error) - return "events." + error; - } - } - return null; - }; - - /** - * Creates a ResponseEndBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseEndBlock - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseEndBlock} ResponseEndBlock - */ - ResponseEndBlock.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseEndBlock) - return object; - var message = new $root.tendermint.abci.types.ResponseEndBlock(); - if (object.validatorUpdates) { - if (!Array.isArray(object.validatorUpdates)) - throw TypeError(".tendermint.abci.types.ResponseEndBlock.validatorUpdates: array expected"); - message.validatorUpdates = []; - for (var i = 0; i < object.validatorUpdates.length; ++i) { - if (typeof object.validatorUpdates[i] !== "object") - throw TypeError(".tendermint.abci.types.ResponseEndBlock.validatorUpdates: object expected"); - message.validatorUpdates[i] = $root.tendermint.abci.types.ValidatorUpdate.fromObject(object.validatorUpdates[i]); - } - } - if (object.consensusParamUpdates != null) { - if (typeof object.consensusParamUpdates !== "object") - throw TypeError(".tendermint.abci.types.ResponseEndBlock.consensusParamUpdates: object expected"); - message.consensusParamUpdates = $root.tendermint.abci.types.ConsensusParams.fromObject(object.consensusParamUpdates); - } - if (object.events) { - if (!Array.isArray(object.events)) - throw TypeError(".tendermint.abci.types.ResponseEndBlock.events: array expected"); - message.events = []; - for (var i = 0; i < object.events.length; ++i) { - if (typeof object.events[i] !== "object") - throw TypeError(".tendermint.abci.types.ResponseEndBlock.events: object expected"); - message.events[i] = $root.tendermint.abci.types.Event.fromObject(object.events[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ResponseEndBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseEndBlock - * @static - * @param {tendermint.abci.types.ResponseEndBlock} message ResponseEndBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseEndBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.validatorUpdates = []; - object.events = []; - } - if (options.defaults) - object.consensusParamUpdates = null; - if (message.validatorUpdates && message.validatorUpdates.length) { - object.validatorUpdates = []; - for (var j = 0; j < message.validatorUpdates.length; ++j) - object.validatorUpdates[j] = $root.tendermint.abci.types.ValidatorUpdate.toObject(message.validatorUpdates[j], options); - } - if (message.consensusParamUpdates != null && message.hasOwnProperty("consensusParamUpdates")) - object.consensusParamUpdates = $root.tendermint.abci.types.ConsensusParams.toObject(message.consensusParamUpdates, options); - if (message.events && message.events.length) { - object.events = []; - for (var j = 0; j < message.events.length; ++j) - object.events[j] = $root.tendermint.abci.types.Event.toObject(message.events[j], options); - } - return object; - }; - - /** - * Converts this ResponseEndBlock to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseEndBlock - * @instance - * @returns {Object.} JSON object - */ - ResponseEndBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseEndBlock; @@ -42560,13 +21040,13 @@ $root.tendermint = (function() { * @classdesc Represents a ResponseCommit. * @implements IResponseCommit * @constructor - * @param {tendermint.abci.types.IResponseCommit=} [properties] Properties to set + * @param {tendermint.abci.types.IResponseCommit=} [p] Properties to set */ - function ResponseCommit(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -42594,29 +21074,16 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ResponseCommit * @static - * @param {tendermint.abci.types.IResponseCommit} message ResponseCommit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IResponseCommit} m ResponseCommit message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResponseCommit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ResponseCommit - * @static - * @param {tendermint.abci.types.IResponseCommit} message ResponseCommit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseCommit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -42624,118 +21091,28 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ResponseCommit * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ResponseCommit} ResponseCommit * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResponseCommit.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ResponseCommit(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.data = reader.bytes(); + m.data = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ResponseCommit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ResponseCommit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ResponseCommit} ResponseCommit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResponseCommit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResponseCommit message. - * @function verify - * @memberof tendermint.abci.types.ResponseCommit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResponseCommit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - return null; - }; - - /** - * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ResponseCommit - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ResponseCommit} ResponseCommit - */ - ResponseCommit.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ResponseCommit) - return object; - var message = new $root.tendermint.abci.types.ResponseCommit(); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - return message; - }; - - /** - * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ResponseCommit - * @static - * @param {tendermint.abci.types.ResponseCommit} message ResponseCommit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResponseCommit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - return object; - }; - - /** - * Converts this ResponseCommit to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ResponseCommit - * @instance - * @returns {Object.} JSON object - */ - ResponseCommit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ResponseCommit; @@ -42758,13 +21135,13 @@ $root.tendermint = (function() { * @classdesc Represents a ConsensusParams. * @implements IConsensusParams * @constructor - * @param {tendermint.abci.types.IConsensusParams=} [properties] Properties to set + * @param {tendermint.abci.types.IConsensusParams=} [p] Properties to set */ - function ConsensusParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -42808,33 +21185,20 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ConsensusParams * @static - * @param {tendermint.abci.types.IConsensusParams} message ConsensusParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IConsensusParams} m ConsensusParams message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConsensusParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.block != null && Object.hasOwnProperty.call(message, "block")) - $root.tendermint.abci.types.BlockParams.encode(message.block, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.evidence != null && Object.hasOwnProperty.call(message, "evidence")) - $root.tendermint.abci.types.EvidenceParams.encode(message.evidence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) - $root.tendermint.abci.types.ValidatorParams.encode(message.validator, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ConsensusParams - * @static - * @param {tendermint.abci.types.IConsensusParams} message ConsensusParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConsensusParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -42842,147 +21206,34 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ConsensusParams * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ConsensusParams} ConsensusParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConsensusParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ConsensusParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.block = $root.tendermint.abci.types.BlockParams.decode(reader, reader.uint32()); + m.block = $root.tendermint.abci.types.BlockParams.decode(r, r.uint32()); break; case 2: - message.evidence = $root.tendermint.abci.types.EvidenceParams.decode(reader, reader.uint32()); + m.evidence = $root.tendermint.abci.types.EvidenceParams.decode(r, r.uint32()); break; case 3: - message.validator = $root.tendermint.abci.types.ValidatorParams.decode(reader, reader.uint32()); + m.validator = $root.tendermint.abci.types.ValidatorParams.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ConsensusParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ConsensusParams} ConsensusParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConsensusParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConsensusParams message. - * @function verify - * @memberof tendermint.abci.types.ConsensusParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConsensusParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.block != null && message.hasOwnProperty("block")) { - var error = $root.tendermint.abci.types.BlockParams.verify(message.block); - if (error) - return "block." + error; - } - if (message.evidence != null && message.hasOwnProperty("evidence")) { - var error = $root.tendermint.abci.types.EvidenceParams.verify(message.evidence); - if (error) - return "evidence." + error; - } - if (message.validator != null && message.hasOwnProperty("validator")) { - var error = $root.tendermint.abci.types.ValidatorParams.verify(message.validator); - if (error) - return "validator." + error; - } - return null; - }; - - /** - * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ConsensusParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ConsensusParams} ConsensusParams - */ - ConsensusParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ConsensusParams) - return object; - var message = new $root.tendermint.abci.types.ConsensusParams(); - if (object.block != null) { - if (typeof object.block !== "object") - throw TypeError(".tendermint.abci.types.ConsensusParams.block: object expected"); - message.block = $root.tendermint.abci.types.BlockParams.fromObject(object.block); - } - if (object.evidence != null) { - if (typeof object.evidence !== "object") - throw TypeError(".tendermint.abci.types.ConsensusParams.evidence: object expected"); - message.evidence = $root.tendermint.abci.types.EvidenceParams.fromObject(object.evidence); - } - if (object.validator != null) { - if (typeof object.validator !== "object") - throw TypeError(".tendermint.abci.types.ConsensusParams.validator: object expected"); - message.validator = $root.tendermint.abci.types.ValidatorParams.fromObject(object.validator); - } - return message; - }; - - /** - * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ConsensusParams - * @static - * @param {tendermint.abci.types.ConsensusParams} message ConsensusParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConsensusParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.block = null; - object.evidence = null; - object.validator = null; - } - if (message.block != null && message.hasOwnProperty("block")) - object.block = $root.tendermint.abci.types.BlockParams.toObject(message.block, options); - if (message.evidence != null && message.hasOwnProperty("evidence")) - object.evidence = $root.tendermint.abci.types.EvidenceParams.toObject(message.evidence, options); - if (message.validator != null && message.hasOwnProperty("validator")) - object.validator = $root.tendermint.abci.types.ValidatorParams.toObject(message.validator, options); - return object; - }; - - /** - * Converts this ConsensusParams to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ConsensusParams - * @instance - * @returns {Object.} JSON object - */ - ConsensusParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ConsensusParams; @@ -43004,13 +21255,13 @@ $root.tendermint = (function() { * @classdesc Represents a BlockParams. * @implements IBlockParams * @constructor - * @param {tendermint.abci.types.IBlockParams=} [properties] Properties to set + * @param {tendermint.abci.types.IBlockParams=} [p] Properties to set */ - function BlockParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -43046,31 +21297,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.BlockParams * @static - * @param {tendermint.abci.types.IBlockParams} message BlockParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IBlockParams} m BlockParams message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BlockParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxBytes); - if (message.maxGas != null && Object.hasOwnProperty.call(message, "maxGas")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxGas); - return writer; - }; - - /** - * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.BlockParams - * @static - * @param {tendermint.abci.types.IBlockParams} message BlockParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -43078,149 +21316,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.BlockParams * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.BlockParams} BlockParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BlockParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.BlockParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.maxBytes = reader.int64(); + m.maxBytes = r.int64(); break; case 2: - message.maxGas = reader.int64(); + m.maxGas = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a BlockParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.BlockParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.BlockParams} BlockParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlockParams message. - * @function verify - * @memberof tendermint.abci.types.BlockParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlockParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) - if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) - return "maxBytes: integer|Long expected"; - if (message.maxGas != null && message.hasOwnProperty("maxGas")) - if (!$util.isInteger(message.maxGas) && !(message.maxGas && $util.isInteger(message.maxGas.low) && $util.isInteger(message.maxGas.high))) - return "maxGas: integer|Long expected"; - return null; - }; - - /** - * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.BlockParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.BlockParams} BlockParams - */ - BlockParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.BlockParams) - return object; - var message = new $root.tendermint.abci.types.BlockParams(); - if (object.maxBytes != null) - if ($util.Long) - (message.maxBytes = $util.Long.fromValue(object.maxBytes)).unsigned = false; - else if (typeof object.maxBytes === "string") - message.maxBytes = parseInt(object.maxBytes, 10); - else if (typeof object.maxBytes === "number") - message.maxBytes = object.maxBytes; - else if (typeof object.maxBytes === "object") - message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); - if (object.maxGas != null) - if ($util.Long) - (message.maxGas = $util.Long.fromValue(object.maxGas)).unsigned = false; - else if (typeof object.maxGas === "string") - message.maxGas = parseInt(object.maxGas, 10); - else if (typeof object.maxGas === "number") - message.maxGas = object.maxGas; - else if (typeof object.maxGas === "object") - message.maxGas = new $util.LongBits(object.maxGas.low >>> 0, object.maxGas.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a BlockParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.BlockParams - * @static - * @param {tendermint.abci.types.BlockParams} message BlockParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlockParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxBytes = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxGas = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxGas = options.longs === String ? "0" : 0; - } - if (message.maxBytes != null && message.hasOwnProperty("maxBytes")) - if (typeof message.maxBytes === "number") - object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; - else - object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; - if (message.maxGas != null && message.hasOwnProperty("maxGas")) - if (typeof message.maxGas === "number") - object.maxGas = options.longs === String ? String(message.maxGas) : message.maxGas; - else - object.maxGas = options.longs === String ? $util.Long.prototype.toString.call(message.maxGas) : options.longs === Number ? new $util.LongBits(message.maxGas.low >>> 0, message.maxGas.high >>> 0).toNumber() : message.maxGas; - return object; - }; - - /** - * Converts this BlockParams to JSON. - * @function toJSON - * @memberof tendermint.abci.types.BlockParams - * @instance - * @returns {Object.} JSON object - */ - BlockParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return BlockParams; @@ -43242,13 +21362,13 @@ $root.tendermint = (function() { * @classdesc Represents an EvidenceParams. * @implements IEvidenceParams * @constructor - * @param {tendermint.abci.types.IEvidenceParams=} [properties] Properties to set + * @param {tendermint.abci.types.IEvidenceParams=} [p] Properties to set */ - function EvidenceParams(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -43284,31 +21404,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.EvidenceParams * @static - * @param {tendermint.abci.types.IEvidenceParams} message EvidenceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IEvidenceParams} m EvidenceParams message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EvidenceParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.maxAgeNumBlocks != null && Object.hasOwnProperty.call(message, "maxAgeNumBlocks")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.maxAgeNumBlocks); - if (message.maxAgeDuration != null && Object.hasOwnProperty.call(message, "maxAgeDuration")) - $root.google.protobuf.Duration.encode(message.maxAgeDuration, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.EvidenceParams - * @static - * @param {tendermint.abci.types.IEvidenceParams} message EvidenceParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EvidenceParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -43316,140 +21423,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.EvidenceParams * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.EvidenceParams} EvidenceParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EvidenceParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.EvidenceParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.maxAgeNumBlocks = reader.int64(); + m.maxAgeNumBlocks = r.int64(); break; case 2: - message.maxAgeDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + m.maxAgeDuration = $root.google.protobuf.Duration.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an EvidenceParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.EvidenceParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.EvidenceParams} EvidenceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EvidenceParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EvidenceParams message. - * @function verify - * @memberof tendermint.abci.types.EvidenceParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EvidenceParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) - if (!$util.isInteger(message.maxAgeNumBlocks) && !(message.maxAgeNumBlocks && $util.isInteger(message.maxAgeNumBlocks.low) && $util.isInteger(message.maxAgeNumBlocks.high))) - return "maxAgeNumBlocks: integer|Long expected"; - if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) { - var error = $root.google.protobuf.Duration.verify(message.maxAgeDuration); - if (error) - return "maxAgeDuration." + error; - } - return null; - }; - - /** - * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.EvidenceParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.EvidenceParams} EvidenceParams - */ - EvidenceParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.EvidenceParams) - return object; - var message = new $root.tendermint.abci.types.EvidenceParams(); - if (object.maxAgeNumBlocks != null) - if ($util.Long) - (message.maxAgeNumBlocks = $util.Long.fromValue(object.maxAgeNumBlocks)).unsigned = false; - else if (typeof object.maxAgeNumBlocks === "string") - message.maxAgeNumBlocks = parseInt(object.maxAgeNumBlocks, 10); - else if (typeof object.maxAgeNumBlocks === "number") - message.maxAgeNumBlocks = object.maxAgeNumBlocks; - else if (typeof object.maxAgeNumBlocks === "object") - message.maxAgeNumBlocks = new $util.LongBits(object.maxAgeNumBlocks.low >>> 0, object.maxAgeNumBlocks.high >>> 0).toNumber(); - if (object.maxAgeDuration != null) { - if (typeof object.maxAgeDuration !== "object") - throw TypeError(".tendermint.abci.types.EvidenceParams.maxAgeDuration: object expected"); - message.maxAgeDuration = $root.google.protobuf.Duration.fromObject(object.maxAgeDuration); - } - return message; - }; - - /** - * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.EvidenceParams - * @static - * @param {tendermint.abci.types.EvidenceParams} message EvidenceParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EvidenceParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxAgeNumBlocks = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.maxAgeNumBlocks = options.longs === String ? "0" : 0; - object.maxAgeDuration = null; - } - if (message.maxAgeNumBlocks != null && message.hasOwnProperty("maxAgeNumBlocks")) - if (typeof message.maxAgeNumBlocks === "number") - object.maxAgeNumBlocks = options.longs === String ? String(message.maxAgeNumBlocks) : message.maxAgeNumBlocks; - else - object.maxAgeNumBlocks = options.longs === String ? $util.Long.prototype.toString.call(message.maxAgeNumBlocks) : options.longs === Number ? new $util.LongBits(message.maxAgeNumBlocks.low >>> 0, message.maxAgeNumBlocks.high >>> 0).toNumber() : message.maxAgeNumBlocks; - if (message.maxAgeDuration != null && message.hasOwnProperty("maxAgeDuration")) - object.maxAgeDuration = $root.google.protobuf.Duration.toObject(message.maxAgeDuration, options); - return object; - }; - - /** - * Converts this EvidenceParams to JSON. - * @function toJSON - * @memberof tendermint.abci.types.EvidenceParams - * @instance - * @returns {Object.} JSON object - */ - EvidenceParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return EvidenceParams; @@ -43470,14 +21468,14 @@ $root.tendermint = (function() { * @classdesc Represents a ValidatorParams. * @implements IValidatorParams * @constructor - * @param {tendermint.abci.types.IValidatorParams=} [properties] Properties to set + * @param {tendermint.abci.types.IValidatorParams=} [p] Properties to set */ - function ValidatorParams(properties) { + function ValidatorParams(p) { this.pubKeyTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -43505,30 +21503,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ValidatorParams * @static - * @param {tendermint.abci.types.IValidatorParams} message ValidatorParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IValidatorParams} m ValidatorParams message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidatorParams.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pubKeyTypes != null && message.pubKeyTypes.length) - for (var i = 0; i < message.pubKeyTypes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pubKeyTypes[i]); - return writer; - }; - - /** - * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ValidatorParams - * @static - * @param {tendermint.abci.types.IValidatorParams} message ValidatorParams message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorParams.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -43536,123 +21522,30 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ValidatorParams * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ValidatorParams} ValidatorParams * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidatorParams.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ValidatorParams(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.pubKeyTypes && message.pubKeyTypes.length)) - message.pubKeyTypes = []; - message.pubKeyTypes.push(reader.string()); + if (!(m.pubKeyTypes && m.pubKeyTypes.length)) + m.pubKeyTypes = []; + m.pubKeyTypes.push(r.string()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValidatorParams message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ValidatorParams - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ValidatorParams} ValidatorParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorParams.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorParams message. - * @function verify - * @memberof tendermint.abci.types.ValidatorParams - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorParams.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pubKeyTypes != null && message.hasOwnProperty("pubKeyTypes")) { - if (!Array.isArray(message.pubKeyTypes)) - return "pubKeyTypes: array expected"; - for (var i = 0; i < message.pubKeyTypes.length; ++i) - if (!$util.isString(message.pubKeyTypes[i])) - return "pubKeyTypes: string[] expected"; - } - return null; - }; - - /** - * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ValidatorParams - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ValidatorParams} ValidatorParams - */ - ValidatorParams.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ValidatorParams) - return object; - var message = new $root.tendermint.abci.types.ValidatorParams(); - if (object.pubKeyTypes) { - if (!Array.isArray(object.pubKeyTypes)) - throw TypeError(".tendermint.abci.types.ValidatorParams.pubKeyTypes: array expected"); - message.pubKeyTypes = []; - for (var i = 0; i < object.pubKeyTypes.length; ++i) - message.pubKeyTypes[i] = String(object.pubKeyTypes[i]); - } - return message; - }; - - /** - * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ValidatorParams - * @static - * @param {tendermint.abci.types.ValidatorParams} message ValidatorParams - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorParams.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.pubKeyTypes = []; - if (message.pubKeyTypes && message.pubKeyTypes.length) { - object.pubKeyTypes = []; - for (var j = 0; j < message.pubKeyTypes.length; ++j) - object.pubKeyTypes[j] = message.pubKeyTypes[j]; - } - return object; - }; - - /** - * Converts this ValidatorParams to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ValidatorParams - * @instance - * @returns {Object.} JSON object - */ - ValidatorParams.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValidatorParams; @@ -43674,14 +21567,14 @@ $root.tendermint = (function() { * @classdesc Represents a LastCommitInfo. * @implements ILastCommitInfo * @constructor - * @param {tendermint.abci.types.ILastCommitInfo=} [properties] Properties to set + * @param {tendermint.abci.types.ILastCommitInfo=} [p] Properties to set */ - function LastCommitInfo(properties) { + function LastCommitInfo(p) { this.votes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -43717,32 +21610,20 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.LastCommitInfo * @static - * @param {tendermint.abci.types.ILastCommitInfo} message LastCommitInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.ILastCommitInfo} m LastCommitInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LastCommitInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.round != null && Object.hasOwnProperty.call(message, "round")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.round); - if (message.votes != null && message.votes.length) - for (var i = 0; i < message.votes.length; ++i) - $root.tendermint.abci.types.VoteInfo.encode(message.votes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.LastCommitInfo - * @static - * @param {tendermint.abci.types.ILastCommitInfo} message LastCommitInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LastCommitInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -43750,140 +21631,33 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.LastCommitInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.LastCommitInfo} LastCommitInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LastCommitInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.LastCommitInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.round = reader.int32(); + m.round = r.int32(); break; case 2: - if (!(message.votes && message.votes.length)) - message.votes = []; - message.votes.push($root.tendermint.abci.types.VoteInfo.decode(reader, reader.uint32())); + if (!(m.votes && m.votes.length)) + m.votes = []; + m.votes.push($root.tendermint.abci.types.VoteInfo.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a LastCommitInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.LastCommitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.LastCommitInfo} LastCommitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LastCommitInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LastCommitInfo message. - * @function verify - * @memberof tendermint.abci.types.LastCommitInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LastCommitInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.round != null && message.hasOwnProperty("round")) - if (!$util.isInteger(message.round)) - return "round: integer expected"; - if (message.votes != null && message.hasOwnProperty("votes")) { - if (!Array.isArray(message.votes)) - return "votes: array expected"; - for (var i = 0; i < message.votes.length; ++i) { - var error = $root.tendermint.abci.types.VoteInfo.verify(message.votes[i]); - if (error) - return "votes." + error; - } - } - return null; - }; - - /** - * Creates a LastCommitInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.LastCommitInfo - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.LastCommitInfo} LastCommitInfo - */ - LastCommitInfo.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.LastCommitInfo) - return object; - var message = new $root.tendermint.abci.types.LastCommitInfo(); - if (object.round != null) - message.round = object.round | 0; - if (object.votes) { - if (!Array.isArray(object.votes)) - throw TypeError(".tendermint.abci.types.LastCommitInfo.votes: array expected"); - message.votes = []; - for (var i = 0; i < object.votes.length; ++i) { - if (typeof object.votes[i] !== "object") - throw TypeError(".tendermint.abci.types.LastCommitInfo.votes: object expected"); - message.votes[i] = $root.tendermint.abci.types.VoteInfo.fromObject(object.votes[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a LastCommitInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.LastCommitInfo - * @static - * @param {tendermint.abci.types.LastCommitInfo} message LastCommitInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LastCommitInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.votes = []; - if (options.defaults) - object.round = 0; - if (message.round != null && message.hasOwnProperty("round")) - object.round = message.round; - if (message.votes && message.votes.length) { - object.votes = []; - for (var j = 0; j < message.votes.length; ++j) - object.votes[j] = $root.tendermint.abci.types.VoteInfo.toObject(message.votes[j], options); - } - return object; - }; - - /** - * Converts this LastCommitInfo to JSON. - * @function toJSON - * @memberof tendermint.abci.types.LastCommitInfo - * @instance - * @returns {Object.} JSON object - */ - LastCommitInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return LastCommitInfo; @@ -43905,14 +21679,14 @@ $root.tendermint = (function() { * @classdesc Represents an Event. * @implements IEvent * @constructor - * @param {tendermint.abci.types.IEvent=} [properties] Properties to set + * @param {tendermint.abci.types.IEvent=} [p] Properties to set */ - function Event(properties) { + function Event(p) { this.attributes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -43948,32 +21722,20 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.Event * @static - * @param {tendermint.abci.types.IEvent} message Event message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IEvent} m Event message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Event.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.attributes != null && message.attributes.length) - for (var i = 0; i < message.attributes.length; ++i) - $root.tendermint.libs.kv.Pair.encode(message.attributes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.Event - * @static - * @param {tendermint.abci.types.IEvent} message Event message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Event.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -43981,140 +21743,33 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.Event * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.Event} Event * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Event.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Event(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.type = reader.string(); + m.type = r.string(); break; case 2: - if (!(message.attributes && message.attributes.length)) - message.attributes = []; - message.attributes.push($root.tendermint.libs.kv.Pair.decode(reader, reader.uint32())); + if (!(m.attributes && m.attributes.length)) + m.attributes = []; + m.attributes.push($root.tendermint.libs.kv.Pair.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an Event message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.Event - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.Event} Event - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Event.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Event message. - * @function verify - * @memberof tendermint.abci.types.Event - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Event.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.attributes != null && message.hasOwnProperty("attributes")) { - if (!Array.isArray(message.attributes)) - return "attributes: array expected"; - for (var i = 0; i < message.attributes.length; ++i) { - var error = $root.tendermint.libs.kv.Pair.verify(message.attributes[i]); - if (error) - return "attributes." + error; - } - } - return null; - }; - - /** - * Creates an Event message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.Event - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.Event} Event - */ - Event.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.Event) - return object; - var message = new $root.tendermint.abci.types.Event(); - if (object.type != null) - message.type = String(object.type); - if (object.attributes) { - if (!Array.isArray(object.attributes)) - throw TypeError(".tendermint.abci.types.Event.attributes: array expected"); - message.attributes = []; - for (var i = 0; i < object.attributes.length; ++i) { - if (typeof object.attributes[i] !== "object") - throw TypeError(".tendermint.abci.types.Event.attributes: object expected"); - message.attributes[i] = $root.tendermint.libs.kv.Pair.fromObject(object.attributes[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Event message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.Event - * @static - * @param {tendermint.abci.types.Event} message Event - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Event.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attributes = []; - if (options.defaults) - object.type = ""; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.attributes && message.attributes.length) { - object.attributes = []; - for (var j = 0; j < message.attributes.length; ++j) - object.attributes[j] = $root.tendermint.libs.kv.Pair.toObject(message.attributes[j], options); - } - return object; - }; - - /** - * Converts this Event to JSON. - * @function toJSON - * @memberof tendermint.abci.types.Event - * @instance - * @returns {Object.} JSON object - */ - Event.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Event; @@ -44148,13 +21803,13 @@ $root.tendermint = (function() { * @classdesc Represents a Header. * @implements IHeader * @constructor - * @param {tendermint.abci.types.IHeader=} [properties] Properties to set + * @param {tendermint.abci.types.IHeader=} [p] Properties to set */ - function Header(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -44286,55 +21941,42 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.Header * @static - * @param {tendermint.abci.types.IHeader} message Header message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IHeader} m Header message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Header.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - $root.tendermint.abci.types.Version.encode(message.version, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.chainId != null && Object.hasOwnProperty.call(message, "chainId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.chainId); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) - $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastBlockId != null && Object.hasOwnProperty.call(message, "lastBlockId")) - $root.tendermint.abci.types.BlockID.encode(message.lastBlockId, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.lastCommitHash != null && Object.hasOwnProperty.call(message, "lastCommitHash")) - writer.uint32(/* id 6, wireType 2 =*/50).bytes(message.lastCommitHash); - if (message.dataHash != null && Object.hasOwnProperty.call(message, "dataHash")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.dataHash); - if (message.validatorsHash != null && Object.hasOwnProperty.call(message, "validatorsHash")) - writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.validatorsHash); - if (message.nextValidatorsHash != null && Object.hasOwnProperty.call(message, "nextValidatorsHash")) - writer.uint32(/* id 9, wireType 2 =*/74).bytes(message.nextValidatorsHash); - if (message.consensusHash != null && Object.hasOwnProperty.call(message, "consensusHash")) - writer.uint32(/* id 10, wireType 2 =*/82).bytes(message.consensusHash); - if (message.appHash != null && Object.hasOwnProperty.call(message, "appHash")) - writer.uint32(/* id 11, wireType 2 =*/90).bytes(message.appHash); - if (message.lastResultsHash != null && Object.hasOwnProperty.call(message, "lastResultsHash")) - writer.uint32(/* id 12, wireType 2 =*/98).bytes(message.lastResultsHash); - if (message.evidenceHash != null && Object.hasOwnProperty.call(message, "evidenceHash")) - writer.uint32(/* id 13, wireType 2 =*/106).bytes(message.evidenceHash); - if (message.proposerAddress != null && Object.hasOwnProperty.call(message, "proposerAddress")) - writer.uint32(/* id 14, wireType 2 =*/114).bytes(message.proposerAddress); - return writer; - }; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.Header - * @static - * @param {tendermint.abci.types.IHeader} message Header message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Header.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -44342,363 +21984,67 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.Header * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.Header} Header * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Header.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Header(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.version = $root.tendermint.abci.types.Version.decode(reader, reader.uint32()); + m.version = $root.tendermint.abci.types.Version.decode(r, r.uint32()); break; case 2: - message.chainId = reader.string(); + m.chainId = r.string(); break; case 3: - message.height = reader.int64(); + m.height = r.int64(); break; case 4: - message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 5: - message.lastBlockId = $root.tendermint.abci.types.BlockID.decode(reader, reader.uint32()); + m.lastBlockId = $root.tendermint.abci.types.BlockID.decode(r, r.uint32()); break; case 6: - message.lastCommitHash = reader.bytes(); + m.lastCommitHash = r.bytes(); break; case 7: - message.dataHash = reader.bytes(); + m.dataHash = r.bytes(); break; case 8: - message.validatorsHash = reader.bytes(); + m.validatorsHash = r.bytes(); break; case 9: - message.nextValidatorsHash = reader.bytes(); + m.nextValidatorsHash = r.bytes(); break; case 10: - message.consensusHash = reader.bytes(); + m.consensusHash = r.bytes(); break; case 11: - message.appHash = reader.bytes(); + m.appHash = r.bytes(); break; case 12: - message.lastResultsHash = reader.bytes(); + m.lastResultsHash = r.bytes(); break; case 13: - message.evidenceHash = reader.bytes(); + m.evidenceHash = r.bytes(); break; case 14: - message.proposerAddress = reader.bytes(); + m.proposerAddress = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.Header - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.Header} Header - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Header.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Header message. - * @function verify - * @memberof tendermint.abci.types.Header - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Header.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) { - var error = $root.tendermint.abci.types.Version.verify(message.version); - if (error) - return "version." + error; - } - if (message.chainId != null && message.hasOwnProperty("chainId")) - if (!$util.isString(message.chainId)) - return "chainId: string expected"; - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) - return "height: integer|Long expected"; - if (message.time != null && message.hasOwnProperty("time")) { - var error = $root.google.protobuf.Timestamp.verify(message.time); - if (error) - return "time." + error; - } - if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) { - var error = $root.tendermint.abci.types.BlockID.verify(message.lastBlockId); - if (error) - return "lastBlockId." + error; - } - if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) - if (!(message.lastCommitHash && typeof message.lastCommitHash.length === "number" || $util.isString(message.lastCommitHash))) - return "lastCommitHash: buffer expected"; - if (message.dataHash != null && message.hasOwnProperty("dataHash")) - if (!(message.dataHash && typeof message.dataHash.length === "number" || $util.isString(message.dataHash))) - return "dataHash: buffer expected"; - if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) - if (!(message.validatorsHash && typeof message.validatorsHash.length === "number" || $util.isString(message.validatorsHash))) - return "validatorsHash: buffer expected"; - if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) - if (!(message.nextValidatorsHash && typeof message.nextValidatorsHash.length === "number" || $util.isString(message.nextValidatorsHash))) - return "nextValidatorsHash: buffer expected"; - if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) - if (!(message.consensusHash && typeof message.consensusHash.length === "number" || $util.isString(message.consensusHash))) - return "consensusHash: buffer expected"; - if (message.appHash != null && message.hasOwnProperty("appHash")) - if (!(message.appHash && typeof message.appHash.length === "number" || $util.isString(message.appHash))) - return "appHash: buffer expected"; - if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) - if (!(message.lastResultsHash && typeof message.lastResultsHash.length === "number" || $util.isString(message.lastResultsHash))) - return "lastResultsHash: buffer expected"; - if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) - if (!(message.evidenceHash && typeof message.evidenceHash.length === "number" || $util.isString(message.evidenceHash))) - return "evidenceHash: buffer expected"; - if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) - if (!(message.proposerAddress && typeof message.proposerAddress.length === "number" || $util.isString(message.proposerAddress))) - return "proposerAddress: buffer expected"; - return null; - }; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.Header - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.Header} Header - */ - Header.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.Header) - return object; - var message = new $root.tendermint.abci.types.Header(); - if (object.version != null) { - if (typeof object.version !== "object") - throw TypeError(".tendermint.abci.types.Header.version: object expected"); - message.version = $root.tendermint.abci.types.Version.fromObject(object.version); - } - if (object.chainId != null) - message.chainId = String(object.chainId); - if (object.height != null) - if ($util.Long) - (message.height = $util.Long.fromValue(object.height)).unsigned = false; - else if (typeof object.height === "string") - message.height = parseInt(object.height, 10); - else if (typeof object.height === "number") - message.height = object.height; - else if (typeof object.height === "object") - message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".tendermint.abci.types.Header.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.lastBlockId != null) { - if (typeof object.lastBlockId !== "object") - throw TypeError(".tendermint.abci.types.Header.lastBlockId: object expected"); - message.lastBlockId = $root.tendermint.abci.types.BlockID.fromObject(object.lastBlockId); - } - if (object.lastCommitHash != null) - if (typeof object.lastCommitHash === "string") - $util.base64.decode(object.lastCommitHash, message.lastCommitHash = $util.newBuffer($util.base64.length(object.lastCommitHash)), 0); - else if (object.lastCommitHash.length) - message.lastCommitHash = object.lastCommitHash; - if (object.dataHash != null) - if (typeof object.dataHash === "string") - $util.base64.decode(object.dataHash, message.dataHash = $util.newBuffer($util.base64.length(object.dataHash)), 0); - else if (object.dataHash.length) - message.dataHash = object.dataHash; - if (object.validatorsHash != null) - if (typeof object.validatorsHash === "string") - $util.base64.decode(object.validatorsHash, message.validatorsHash = $util.newBuffer($util.base64.length(object.validatorsHash)), 0); - else if (object.validatorsHash.length) - message.validatorsHash = object.validatorsHash; - if (object.nextValidatorsHash != null) - if (typeof object.nextValidatorsHash === "string") - $util.base64.decode(object.nextValidatorsHash, message.nextValidatorsHash = $util.newBuffer($util.base64.length(object.nextValidatorsHash)), 0); - else if (object.nextValidatorsHash.length) - message.nextValidatorsHash = object.nextValidatorsHash; - if (object.consensusHash != null) - if (typeof object.consensusHash === "string") - $util.base64.decode(object.consensusHash, message.consensusHash = $util.newBuffer($util.base64.length(object.consensusHash)), 0); - else if (object.consensusHash.length) - message.consensusHash = object.consensusHash; - if (object.appHash != null) - if (typeof object.appHash === "string") - $util.base64.decode(object.appHash, message.appHash = $util.newBuffer($util.base64.length(object.appHash)), 0); - else if (object.appHash.length) - message.appHash = object.appHash; - if (object.lastResultsHash != null) - if (typeof object.lastResultsHash === "string") - $util.base64.decode(object.lastResultsHash, message.lastResultsHash = $util.newBuffer($util.base64.length(object.lastResultsHash)), 0); - else if (object.lastResultsHash.length) - message.lastResultsHash = object.lastResultsHash; - if (object.evidenceHash != null) - if (typeof object.evidenceHash === "string") - $util.base64.decode(object.evidenceHash, message.evidenceHash = $util.newBuffer($util.base64.length(object.evidenceHash)), 0); - else if (object.evidenceHash.length) - message.evidenceHash = object.evidenceHash; - if (object.proposerAddress != null) - if (typeof object.proposerAddress === "string") - $util.base64.decode(object.proposerAddress, message.proposerAddress = $util.newBuffer($util.base64.length(object.proposerAddress)), 0); - else if (object.proposerAddress.length) - message.proposerAddress = object.proposerAddress; - return message; - }; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.Header - * @static - * @param {tendermint.abci.types.Header} message Header - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Header.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = null; - object.chainId = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.time = null; - object.lastBlockId = null; - if (options.bytes === String) - object.lastCommitHash = ""; - else { - object.lastCommitHash = []; - if (options.bytes !== Array) - object.lastCommitHash = $util.newBuffer(object.lastCommitHash); - } - if (options.bytes === String) - object.dataHash = ""; - else { - object.dataHash = []; - if (options.bytes !== Array) - object.dataHash = $util.newBuffer(object.dataHash); - } - if (options.bytes === String) - object.validatorsHash = ""; - else { - object.validatorsHash = []; - if (options.bytes !== Array) - object.validatorsHash = $util.newBuffer(object.validatorsHash); - } - if (options.bytes === String) - object.nextValidatorsHash = ""; - else { - object.nextValidatorsHash = []; - if (options.bytes !== Array) - object.nextValidatorsHash = $util.newBuffer(object.nextValidatorsHash); - } - if (options.bytes === String) - object.consensusHash = ""; - else { - object.consensusHash = []; - if (options.bytes !== Array) - object.consensusHash = $util.newBuffer(object.consensusHash); - } - if (options.bytes === String) - object.appHash = ""; - else { - object.appHash = []; - if (options.bytes !== Array) - object.appHash = $util.newBuffer(object.appHash); - } - if (options.bytes === String) - object.lastResultsHash = ""; - else { - object.lastResultsHash = []; - if (options.bytes !== Array) - object.lastResultsHash = $util.newBuffer(object.lastResultsHash); - } - if (options.bytes === String) - object.evidenceHash = ""; - else { - object.evidenceHash = []; - if (options.bytes !== Array) - object.evidenceHash = $util.newBuffer(object.evidenceHash); - } - if (options.bytes === String) - object.proposerAddress = ""; - else { - object.proposerAddress = []; - if (options.bytes !== Array) - object.proposerAddress = $util.newBuffer(object.proposerAddress); - } - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = $root.tendermint.abci.types.Version.toObject(message.version, options); - if (message.chainId != null && message.hasOwnProperty("chainId")) - object.chainId = message.chainId; - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height === "number") - object.height = options.longs === String ? String(message.height) : message.height; - else - object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; - if (message.time != null && message.hasOwnProperty("time")) - object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); - if (message.lastBlockId != null && message.hasOwnProperty("lastBlockId")) - object.lastBlockId = $root.tendermint.abci.types.BlockID.toObject(message.lastBlockId, options); - if (message.lastCommitHash != null && message.hasOwnProperty("lastCommitHash")) - object.lastCommitHash = options.bytes === String ? $util.base64.encode(message.lastCommitHash, 0, message.lastCommitHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastCommitHash) : message.lastCommitHash; - if (message.dataHash != null && message.hasOwnProperty("dataHash")) - object.dataHash = options.bytes === String ? $util.base64.encode(message.dataHash, 0, message.dataHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.dataHash) : message.dataHash; - if (message.validatorsHash != null && message.hasOwnProperty("validatorsHash")) - object.validatorsHash = options.bytes === String ? $util.base64.encode(message.validatorsHash, 0, message.validatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.validatorsHash) : message.validatorsHash; - if (message.nextValidatorsHash != null && message.hasOwnProperty("nextValidatorsHash")) - object.nextValidatorsHash = options.bytes === String ? $util.base64.encode(message.nextValidatorsHash, 0, message.nextValidatorsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.nextValidatorsHash) : message.nextValidatorsHash; - if (message.consensusHash != null && message.hasOwnProperty("consensusHash")) - object.consensusHash = options.bytes === String ? $util.base64.encode(message.consensusHash, 0, message.consensusHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.consensusHash) : message.consensusHash; - if (message.appHash != null && message.hasOwnProperty("appHash")) - object.appHash = options.bytes === String ? $util.base64.encode(message.appHash, 0, message.appHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.appHash) : message.appHash; - if (message.lastResultsHash != null && message.hasOwnProperty("lastResultsHash")) - object.lastResultsHash = options.bytes === String ? $util.base64.encode(message.lastResultsHash, 0, message.lastResultsHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.lastResultsHash) : message.lastResultsHash; - if (message.evidenceHash != null && message.hasOwnProperty("evidenceHash")) - object.evidenceHash = options.bytes === String ? $util.base64.encode(message.evidenceHash, 0, message.evidenceHash.length) : options.bytes === Array ? Array.prototype.slice.call(message.evidenceHash) : message.evidenceHash; - if (message.proposerAddress != null && message.hasOwnProperty("proposerAddress")) - object.proposerAddress = options.bytes === String ? $util.base64.encode(message.proposerAddress, 0, message.proposerAddress.length) : options.bytes === Array ? Array.prototype.slice.call(message.proposerAddress) : message.proposerAddress; - return object; - }; - - /** - * Converts this Header to JSON. - * @function toJSON - * @memberof tendermint.abci.types.Header - * @instance - * @returns {Object.} JSON object - */ - Header.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Header; @@ -44720,13 +22066,13 @@ $root.tendermint = (function() { * @classdesc Represents a Version. * @implements IVersion * @constructor - * @param {tendermint.abci.types.IVersion=} [properties] Properties to set + * @param {tendermint.abci.types.IVersion=} [p] Properties to set */ - function Version(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -44762,31 +22108,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.Version * @static - * @param {tendermint.abci.types.IVersion} message Version message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IVersion} m Version message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Version.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.Block != null && Object.hasOwnProperty.call(message, "Block")) - writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.Block); - if (message.App != null && Object.hasOwnProperty.call(message, "App")) - writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.App); - return writer; - }; - - /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.Version - * @static - * @param {tendermint.abci.types.IVersion} message Version message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Version.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -44794,149 +22127,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.Version * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.Version} Version * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Version.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Version(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.Block = reader.uint64(); + m.Block = r.uint64(); break; case 2: - message.App = reader.uint64(); + m.App = r.uint64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.Version - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.Version} Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Version.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Version message. - * @function verify - * @memberof tendermint.abci.types.Version - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Version.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.Block != null && message.hasOwnProperty("Block")) - if (!$util.isInteger(message.Block) && !(message.Block && $util.isInteger(message.Block.low) && $util.isInteger(message.Block.high))) - return "Block: integer|Long expected"; - if (message.App != null && message.hasOwnProperty("App")) - if (!$util.isInteger(message.App) && !(message.App && $util.isInteger(message.App.low) && $util.isInteger(message.App.high))) - return "App: integer|Long expected"; - return null; - }; - - /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.Version - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.Version} Version - */ - Version.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.Version) - return object; - var message = new $root.tendermint.abci.types.Version(); - if (object.Block != null) - if ($util.Long) - (message.Block = $util.Long.fromValue(object.Block)).unsigned = true; - else if (typeof object.Block === "string") - message.Block = parseInt(object.Block, 10); - else if (typeof object.Block === "number") - message.Block = object.Block; - else if (typeof object.Block === "object") - message.Block = new $util.LongBits(object.Block.low >>> 0, object.Block.high >>> 0).toNumber(true); - if (object.App != null) - if ($util.Long) - (message.App = $util.Long.fromValue(object.App)).unsigned = true; - else if (typeof object.App === "string") - message.App = parseInt(object.App, 10); - else if (typeof object.App === "number") - message.App = object.App; - else if (typeof object.App === "object") - message.App = new $util.LongBits(object.App.low >>> 0, object.App.high >>> 0).toNumber(true); - return message; - }; - - /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.Version - * @static - * @param {tendermint.abci.types.Version} message Version - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Version.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.Block = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.Block = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.App = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.App = options.longs === String ? "0" : 0; - } - if (message.Block != null && message.hasOwnProperty("Block")) - if (typeof message.Block === "number") - object.Block = options.longs === String ? String(message.Block) : message.Block; - else - object.Block = options.longs === String ? $util.Long.prototype.toString.call(message.Block) : options.longs === Number ? new $util.LongBits(message.Block.low >>> 0, message.Block.high >>> 0).toNumber(true) : message.Block; - if (message.App != null && message.hasOwnProperty("App")) - if (typeof message.App === "number") - object.App = options.longs === String ? String(message.App) : message.App; - else - object.App = options.longs === String ? $util.Long.prototype.toString.call(message.App) : options.longs === Number ? new $util.LongBits(message.App.low >>> 0, message.App.high >>> 0).toNumber(true) : message.App; - return object; - }; - - /** - * Converts this Version to JSON. - * @function toJSON - * @memberof tendermint.abci.types.Version - * @instance - * @returns {Object.} JSON object - */ - Version.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Version; @@ -44958,13 +22173,13 @@ $root.tendermint = (function() { * @classdesc Represents a BlockID. * @implements IBlockID * @constructor - * @param {tendermint.abci.types.IBlockID=} [properties] Properties to set + * @param {tendermint.abci.types.IBlockID=} [p] Properties to set */ - function BlockID(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -45000,31 +22215,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.BlockID * @static - * @param {tendermint.abci.types.IBlockID} message BlockID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IBlockID} m BlockID message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BlockID.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.hash); - if (message.partsHeader != null && Object.hasOwnProperty.call(message, "partsHeader")) - $root.tendermint.abci.types.PartSetHeader.encode(message.partsHeader, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.BlockID - * @static - * @param {tendermint.abci.types.IBlockID} message BlockID message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BlockID.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -45032,135 +22234,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.BlockID * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.BlockID} BlockID * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BlockID.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.BlockID(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.hash = reader.bytes(); + m.hash = r.bytes(); break; case 2: - message.partsHeader = $root.tendermint.abci.types.PartSetHeader.decode(reader, reader.uint32()); + m.partsHeader = $root.tendermint.abci.types.PartSetHeader.decode(r, r.uint32()); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a BlockID message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.BlockID - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.BlockID} BlockID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BlockID.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BlockID message. - * @function verify - * @memberof tendermint.abci.types.BlockID - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BlockID.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) - return "hash: buffer expected"; - if (message.partsHeader != null && message.hasOwnProperty("partsHeader")) { - var error = $root.tendermint.abci.types.PartSetHeader.verify(message.partsHeader); - if (error) - return "partsHeader." + error; - } - return null; - }; - - /** - * Creates a BlockID message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.BlockID - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.BlockID} BlockID - */ - BlockID.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.BlockID) - return object; - var message = new $root.tendermint.abci.types.BlockID(); - if (object.hash != null) - if (typeof object.hash === "string") - $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); - else if (object.hash.length) - message.hash = object.hash; - if (object.partsHeader != null) { - if (typeof object.partsHeader !== "object") - throw TypeError(".tendermint.abci.types.BlockID.partsHeader: object expected"); - message.partsHeader = $root.tendermint.abci.types.PartSetHeader.fromObject(object.partsHeader); - } - return message; - }; - - /** - * Creates a plain object from a BlockID message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.BlockID - * @static - * @param {tendermint.abci.types.BlockID} message BlockID - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BlockID.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.hash = ""; - else { - object.hash = []; - if (options.bytes !== Array) - object.hash = $util.newBuffer(object.hash); - } - object.partsHeader = null; - } - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; - if (message.partsHeader != null && message.hasOwnProperty("partsHeader")) - object.partsHeader = $root.tendermint.abci.types.PartSetHeader.toObject(message.partsHeader, options); - return object; - }; - - /** - * Converts this BlockID to JSON. - * @function toJSON - * @memberof tendermint.abci.types.BlockID - * @instance - * @returns {Object.} JSON object - */ - BlockID.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return BlockID; @@ -45182,13 +22280,13 @@ $root.tendermint = (function() { * @classdesc Represents a PartSetHeader. * @implements IPartSetHeader * @constructor - * @param {tendermint.abci.types.IPartSetHeader=} [properties] Properties to set + * @param {tendermint.abci.types.IPartSetHeader=} [p] Properties to set */ - function PartSetHeader(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -45224,31 +22322,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.PartSetHeader * @static - * @param {tendermint.abci.types.IPartSetHeader} message PartSetHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IPartSetHeader} m PartSetHeader message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartSetHeader.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.total != null && Object.hasOwnProperty.call(message, "total")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.total); - if (message.hash != null && Object.hasOwnProperty.call(message, "hash")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.hash); - return writer; - }; - - /** - * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.PartSetHeader - * @static - * @param {tendermint.abci.types.IPartSetHeader} message PartSetHeader message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PartSetHeader.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -45256,130 +22341,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.PartSetHeader * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.PartSetHeader} PartSetHeader * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartSetHeader.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.PartSetHeader(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.total = reader.int32(); + m.total = r.int32(); break; case 2: - message.hash = reader.bytes(); + m.hash = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a PartSetHeader message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.PartSetHeader - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.PartSetHeader} PartSetHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PartSetHeader.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PartSetHeader message. - * @function verify - * @memberof tendermint.abci.types.PartSetHeader - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PartSetHeader.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.total != null && message.hasOwnProperty("total")) - if (!$util.isInteger(message.total)) - return "total: integer expected"; - if (message.hash != null && message.hasOwnProperty("hash")) - if (!(message.hash && typeof message.hash.length === "number" || $util.isString(message.hash))) - return "hash: buffer expected"; - return null; - }; - - /** - * Creates a PartSetHeader message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.PartSetHeader - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.PartSetHeader} PartSetHeader - */ - PartSetHeader.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.PartSetHeader) - return object; - var message = new $root.tendermint.abci.types.PartSetHeader(); - if (object.total != null) - message.total = object.total | 0; - if (object.hash != null) - if (typeof object.hash === "string") - $util.base64.decode(object.hash, message.hash = $util.newBuffer($util.base64.length(object.hash)), 0); - else if (object.hash.length) - message.hash = object.hash; - return message; - }; - - /** - * Creates a plain object from a PartSetHeader message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.PartSetHeader - * @static - * @param {tendermint.abci.types.PartSetHeader} message PartSetHeader - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PartSetHeader.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.total = 0; - if (options.bytes === String) - object.hash = ""; - else { - object.hash = []; - if (options.bytes !== Array) - object.hash = $util.newBuffer(object.hash); - } - } - if (message.total != null && message.hasOwnProperty("total")) - object.total = message.total; - if (message.hash != null && message.hasOwnProperty("hash")) - object.hash = options.bytes === String ? $util.base64.encode(message.hash, 0, message.hash.length) : options.bytes === Array ? Array.prototype.slice.call(message.hash) : message.hash; - return object; - }; - - /** - * Converts this PartSetHeader to JSON. - * @function toJSON - * @memberof tendermint.abci.types.PartSetHeader - * @instance - * @returns {Object.} JSON object - */ - PartSetHeader.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return PartSetHeader; @@ -45401,13 +22387,13 @@ $root.tendermint = (function() { * @classdesc Represents a Validator. * @implements IValidator * @constructor - * @param {tendermint.abci.types.IValidator=} [properties] Properties to set + * @param {tendermint.abci.types.IValidator=} [p] Properties to set */ - function Validator(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -45443,31 +22429,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.Validator * @static - * @param {tendermint.abci.types.IValidator} message Validator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IValidator} m Validator message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Validator.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.address != null && Object.hasOwnProperty.call(message, "address")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); - if (message.power != null && Object.hasOwnProperty.call(message, "power")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.power); - return writer; - }; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.Validator - * @static - * @param {tendermint.abci.types.IValidator} message Validator message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Validator.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -45475,144 +22448,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.Validator * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.Validator} Validator * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Validator.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Validator(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.address = reader.bytes(); + m.address = r.bytes(); break; case 3: - message.power = reader.int64(); + m.power = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Validator message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.Validator} Validator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Validator.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Validator message. - * @function verify - * @memberof tendermint.abci.types.Validator - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Validator.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.address != null && message.hasOwnProperty("address")) - if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) - return "address: buffer expected"; - if (message.power != null && message.hasOwnProperty("power")) - if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) - return "power: integer|Long expected"; - return null; - }; - - /** - * Creates a Validator message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.Validator - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.Validator} Validator - */ - Validator.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.Validator) - return object; - var message = new $root.tendermint.abci.types.Validator(); - if (object.address != null) - if (typeof object.address === "string") - $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); - else if (object.address.length) - message.address = object.address; - if (object.power != null) - if ($util.Long) - (message.power = $util.Long.fromValue(object.power)).unsigned = false; - else if (typeof object.power === "string") - message.power = parseInt(object.power, 10); - else if (typeof object.power === "number") - message.power = object.power; - else if (typeof object.power === "object") - message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a Validator message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.Validator - * @static - * @param {tendermint.abci.types.Validator} message Validator - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Validator.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.address = ""; - else { - object.address = []; - if (options.bytes !== Array) - object.address = $util.newBuffer(object.address); - } - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.power = options.longs === String ? "0" : 0; - } - if (message.address != null && message.hasOwnProperty("address")) - object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; - if (message.power != null && message.hasOwnProperty("power")) - if (typeof message.power === "number") - object.power = options.longs === String ? String(message.power) : message.power; - else - object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; - return object; - }; - - /** - * Converts this Validator to JSON. - * @function toJSON - * @memberof tendermint.abci.types.Validator - * @instance - * @returns {Object.} JSON object - */ - Validator.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Validator; @@ -45634,13 +22494,13 @@ $root.tendermint = (function() { * @classdesc Represents a ValidatorUpdate. * @implements IValidatorUpdate * @constructor - * @param {tendermint.abci.types.IValidatorUpdate=} [properties] Properties to set + * @param {tendermint.abci.types.IValidatorUpdate=} [p] Properties to set */ - function ValidatorUpdate(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -45676,31 +22536,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.ValidatorUpdate * @static - * @param {tendermint.abci.types.IValidatorUpdate} message ValidatorUpdate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IValidatorUpdate} m ValidatorUpdate message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ValidatorUpdate.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.pubKey != null && Object.hasOwnProperty.call(message, "pubKey")) - $root.tendermint.abci.types.PubKey.encode(message.pubKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.power != null && Object.hasOwnProperty.call(message, "power")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.power); - return writer; - }; - - /** - * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.ValidatorUpdate - * @static - * @param {tendermint.abci.types.IValidatorUpdate} message ValidatorUpdate message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorUpdate.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -45708,140 +22555,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.ValidatorUpdate * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.ValidatorUpdate} ValidatorUpdate * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ValidatorUpdate.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.ValidatorUpdate(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.pubKey = $root.tendermint.abci.types.PubKey.decode(reader, reader.uint32()); + m.pubKey = $root.tendermint.abci.types.PubKey.decode(r, r.uint32()); break; case 2: - message.power = reader.int64(); + m.power = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ValidatorUpdate message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.ValidatorUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.ValidatorUpdate} ValidatorUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorUpdate.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidatorUpdate message. - * @function verify - * @memberof tendermint.abci.types.ValidatorUpdate - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidatorUpdate.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.pubKey != null && message.hasOwnProperty("pubKey")) { - var error = $root.tendermint.abci.types.PubKey.verify(message.pubKey); - if (error) - return "pubKey." + error; - } - if (message.power != null && message.hasOwnProperty("power")) - if (!$util.isInteger(message.power) && !(message.power && $util.isInteger(message.power.low) && $util.isInteger(message.power.high))) - return "power: integer|Long expected"; - return null; - }; - - /** - * Creates a ValidatorUpdate message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.ValidatorUpdate - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.ValidatorUpdate} ValidatorUpdate - */ - ValidatorUpdate.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.ValidatorUpdate) - return object; - var message = new $root.tendermint.abci.types.ValidatorUpdate(); - if (object.pubKey != null) { - if (typeof object.pubKey !== "object") - throw TypeError(".tendermint.abci.types.ValidatorUpdate.pubKey: object expected"); - message.pubKey = $root.tendermint.abci.types.PubKey.fromObject(object.pubKey); - } - if (object.power != null) - if ($util.Long) - (message.power = $util.Long.fromValue(object.power)).unsigned = false; - else if (typeof object.power === "string") - message.power = parseInt(object.power, 10); - else if (typeof object.power === "number") - message.power = object.power; - else if (typeof object.power === "object") - message.power = new $util.LongBits(object.power.low >>> 0, object.power.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a ValidatorUpdate message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.ValidatorUpdate - * @static - * @param {tendermint.abci.types.ValidatorUpdate} message ValidatorUpdate - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidatorUpdate.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.pubKey = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.power = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.power = options.longs === String ? "0" : 0; - } - if (message.pubKey != null && message.hasOwnProperty("pubKey")) - object.pubKey = $root.tendermint.abci.types.PubKey.toObject(message.pubKey, options); - if (message.power != null && message.hasOwnProperty("power")) - if (typeof message.power === "number") - object.power = options.longs === String ? String(message.power) : message.power; - else - object.power = options.longs === String ? $util.Long.prototype.toString.call(message.power) : options.longs === Number ? new $util.LongBits(message.power.low >>> 0, message.power.high >>> 0).toNumber() : message.power; - return object; - }; - - /** - * Converts this ValidatorUpdate to JSON. - * @function toJSON - * @memberof tendermint.abci.types.ValidatorUpdate - * @instance - * @returns {Object.} JSON object - */ - ValidatorUpdate.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ValidatorUpdate; @@ -45863,13 +22601,13 @@ $root.tendermint = (function() { * @classdesc Represents a VoteInfo. * @implements IVoteInfo * @constructor - * @param {tendermint.abci.types.IVoteInfo=} [properties] Properties to set + * @param {tendermint.abci.types.IVoteInfo=} [p] Properties to set */ - function VoteInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -45905,31 +22643,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.VoteInfo * @static - * @param {tendermint.abci.types.IVoteInfo} message VoteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IVoteInfo} m VoteInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VoteInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) - $root.tendermint.abci.types.Validator.encode(message.validator, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.signedLastBlock != null && Object.hasOwnProperty.call(message, "signedLastBlock")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.signedLastBlock); - return writer; - }; - - /** - * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.VoteInfo - * @static - * @param {tendermint.abci.types.IVoteInfo} message VoteInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VoteInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -45937,126 +22662,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.VoteInfo * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.VoteInfo} VoteInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VoteInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.VoteInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.validator = $root.tendermint.abci.types.Validator.decode(reader, reader.uint32()); + m.validator = $root.tendermint.abci.types.Validator.decode(r, r.uint32()); break; case 2: - message.signedLastBlock = reader.bool(); + m.signedLastBlock = r.bool(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a VoteInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.VoteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.VoteInfo} VoteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VoteInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VoteInfo message. - * @function verify - * @memberof tendermint.abci.types.VoteInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VoteInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.validator != null && message.hasOwnProperty("validator")) { - var error = $root.tendermint.abci.types.Validator.verify(message.validator); - if (error) - return "validator." + error; - } - if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) - if (typeof message.signedLastBlock !== "boolean") - return "signedLastBlock: boolean expected"; - return null; - }; - - /** - * Creates a VoteInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.VoteInfo - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.VoteInfo} VoteInfo - */ - VoteInfo.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.VoteInfo) - return object; - var message = new $root.tendermint.abci.types.VoteInfo(); - if (object.validator != null) { - if (typeof object.validator !== "object") - throw TypeError(".tendermint.abci.types.VoteInfo.validator: object expected"); - message.validator = $root.tendermint.abci.types.Validator.fromObject(object.validator); - } - if (object.signedLastBlock != null) - message.signedLastBlock = Boolean(object.signedLastBlock); - return message; - }; - - /** - * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.VoteInfo - * @static - * @param {tendermint.abci.types.VoteInfo} message VoteInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VoteInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.validator = null; - object.signedLastBlock = false; - } - if (message.validator != null && message.hasOwnProperty("validator")) - object.validator = $root.tendermint.abci.types.Validator.toObject(message.validator, options); - if (message.signedLastBlock != null && message.hasOwnProperty("signedLastBlock")) - object.signedLastBlock = message.signedLastBlock; - return object; - }; - - /** - * Converts this VoteInfo to JSON. - * @function toJSON - * @memberof tendermint.abci.types.VoteInfo - * @instance - * @returns {Object.} JSON object - */ - VoteInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return VoteInfo; @@ -46078,13 +22708,13 @@ $root.tendermint = (function() { * @classdesc Represents a PubKey. * @implements IPubKey * @constructor - * @param {tendermint.abci.types.IPubKey=} [properties] Properties to set + * @param {tendermint.abci.types.IPubKey=} [p] Properties to set */ - function PubKey(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -46120,31 +22750,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.PubKey * @static - * @param {tendermint.abci.types.IPubKey} message PubKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IPubKey} m PubKey message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PubKey.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified PubKey message, length delimited. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.PubKey - * @static - * @param {tendermint.abci.types.IPubKey} message PubKey message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -46152,130 +22769,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.PubKey * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.PubKey} PubKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PubKey.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.PubKey(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.type = reader.string(); + m.type = r.string(); break; case 2: - message.data = reader.bytes(); + m.data = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a PubKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.PubKey - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.PubKey} PubKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubKey.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PubKey message. - * @function verify - * @memberof tendermint.abci.types.PubKey - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PubKey.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - return null; - }; - - /** - * Creates a PubKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.PubKey - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.PubKey} PubKey - */ - PubKey.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.PubKey) - return object; - var message = new $root.tendermint.abci.types.PubKey(); - if (object.type != null) - message.type = String(object.type); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - return message; - }; - - /** - * Creates a plain object from a PubKey message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.PubKey - * @static - * @param {tendermint.abci.types.PubKey} message PubKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PubKey.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - return object; - }; - - /** - * Converts this PubKey to JSON. - * @function toJSON - * @memberof tendermint.abci.types.PubKey - * @instance - * @returns {Object.} JSON object - */ - PubKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return PubKey; @@ -46300,13 +22818,13 @@ $root.tendermint = (function() { * @classdesc Represents an Evidence. * @implements IEvidence * @constructor - * @param {tendermint.abci.types.IEvidence=} [properties] Properties to set + * @param {tendermint.abci.types.IEvidence=} [p] Properties to set */ - function Evidence(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -46366,37 +22884,24 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.abci.types.Evidence * @static - * @param {tendermint.abci.types.IEvidence} message Evidence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.abci.types.IEvidence} m Evidence message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Evidence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.validator != null && Object.hasOwnProperty.call(message, "validator")) - $root.tendermint.abci.types.Validator.encode(message.validator, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.height != null && Object.hasOwnProperty.call(message, "height")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.height); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) - $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.totalVotingPower != null && Object.hasOwnProperty.call(message, "totalVotingPower")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.totalVotingPower); - return writer; - }; - - /** - * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.abci.types.Evidence - * @static - * @param {tendermint.abci.types.IEvidence} message Evidence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Evidence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -46404,192 +22909,40 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.abci.types.Evidence * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.abci.types.Evidence} Evidence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Evidence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.abci.types.Evidence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.type = reader.string(); + m.type = r.string(); break; case 2: - message.validator = $root.tendermint.abci.types.Validator.decode(reader, reader.uint32()); + m.validator = $root.tendermint.abci.types.Validator.decode(r, r.uint32()); break; case 3: - message.height = reader.int64(); + m.height = r.int64(); break; case 4: - message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); break; case 5: - message.totalVotingPower = reader.int64(); + m.totalVotingPower = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an Evidence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.abci.types.Evidence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.abci.types.Evidence} Evidence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Evidence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Evidence message. - * @function verify - * @memberof tendermint.abci.types.Evidence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Evidence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.validator != null && message.hasOwnProperty("validator")) { - var error = $root.tendermint.abci.types.Validator.verify(message.validator); - if (error) - return "validator." + error; - } - if (message.height != null && message.hasOwnProperty("height")) - if (!$util.isInteger(message.height) && !(message.height && $util.isInteger(message.height.low) && $util.isInteger(message.height.high))) - return "height: integer|Long expected"; - if (message.time != null && message.hasOwnProperty("time")) { - var error = $root.google.protobuf.Timestamp.verify(message.time); - if (error) - return "time." + error; - } - if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) - if (!$util.isInteger(message.totalVotingPower) && !(message.totalVotingPower && $util.isInteger(message.totalVotingPower.low) && $util.isInteger(message.totalVotingPower.high))) - return "totalVotingPower: integer|Long expected"; - return null; - }; - - /** - * Creates an Evidence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.abci.types.Evidence - * @static - * @param {Object.} object Plain object - * @returns {tendermint.abci.types.Evidence} Evidence - */ - Evidence.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.abci.types.Evidence) - return object; - var message = new $root.tendermint.abci.types.Evidence(); - if (object.type != null) - message.type = String(object.type); - if (object.validator != null) { - if (typeof object.validator !== "object") - throw TypeError(".tendermint.abci.types.Evidence.validator: object expected"); - message.validator = $root.tendermint.abci.types.Validator.fromObject(object.validator); - } - if (object.height != null) - if ($util.Long) - (message.height = $util.Long.fromValue(object.height)).unsigned = false; - else if (typeof object.height === "string") - message.height = parseInt(object.height, 10); - else if (typeof object.height === "number") - message.height = object.height; - else if (typeof object.height === "object") - message.height = new $util.LongBits(object.height.low >>> 0, object.height.high >>> 0).toNumber(); - if (object.time != null) { - if (typeof object.time !== "object") - throw TypeError(".tendermint.abci.types.Evidence.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time); - } - if (object.totalVotingPower != null) - if ($util.Long) - (message.totalVotingPower = $util.Long.fromValue(object.totalVotingPower)).unsigned = false; - else if (typeof object.totalVotingPower === "string") - message.totalVotingPower = parseInt(object.totalVotingPower, 10); - else if (typeof object.totalVotingPower === "number") - message.totalVotingPower = object.totalVotingPower; - else if (typeof object.totalVotingPower === "object") - message.totalVotingPower = new $util.LongBits(object.totalVotingPower.low >>> 0, object.totalVotingPower.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from an Evidence message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.abci.types.Evidence - * @static - * @param {tendermint.abci.types.Evidence} message Evidence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Evidence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.validator = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.height = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.height = options.longs === String ? "0" : 0; - object.time = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.totalVotingPower = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.totalVotingPower = options.longs === String ? "0" : 0; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.validator != null && message.hasOwnProperty("validator")) - object.validator = $root.tendermint.abci.types.Validator.toObject(message.validator, options); - if (message.height != null && message.hasOwnProperty("height")) - if (typeof message.height === "number") - object.height = options.longs === String ? String(message.height) : message.height; - else - object.height = options.longs === String ? $util.Long.prototype.toString.call(message.height) : options.longs === Number ? new $util.LongBits(message.height.low >>> 0, message.height.high >>> 0).toNumber() : message.height; - if (message.time != null && message.hasOwnProperty("time")) - object.time = $root.google.protobuf.Timestamp.toObject(message.time, options); - if (message.totalVotingPower != null && message.hasOwnProperty("totalVotingPower")) - if (typeof message.totalVotingPower === "number") - object.totalVotingPower = options.longs === String ? String(message.totalVotingPower) : message.totalVotingPower; - else - object.totalVotingPower = options.longs === String ? $util.Long.prototype.toString.call(message.totalVotingPower) : options.longs === Number ? new $util.LongBits(message.totalVotingPower.low >>> 0, message.totalVotingPower.high >>> 0).toNumber() : message.totalVotingPower; - return object; - }; - - /** - * Converts this Evidence to JSON. - * @function toJSON - * @memberof tendermint.abci.types.Evidence - * @instance - * @returns {Object.} JSON object - */ - Evidence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Evidence; @@ -47034,13 +23387,13 @@ $root.tendermint = (function() { * @classdesc Represents a ProofOp. * @implements IProofOp * @constructor - * @param {tendermint.crypto.merkle.IProofOp=} [properties] Properties to set + * @param {tendermint.crypto.merkle.IProofOp=} [p] Properties to set */ - function ProofOp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -47084,33 +23437,20 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.crypto.merkle.ProofOp * @static - * @param {tendermint.crypto.merkle.IProofOp} message ProofOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.crypto.merkle.IProofOp} m ProofOp message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ProofOp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.key); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.data); - return writer; - }; - - /** - * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.merkle.ProofOp - * @static - * @param {tendermint.crypto.merkle.IProofOp} message ProofOp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ProofOp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -47118,150 +23458,34 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.crypto.merkle.ProofOp * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.crypto.merkle.ProofOp} ProofOp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ProofOp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.merkle.ProofOp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.type = reader.string(); + m.type = r.string(); break; case 2: - message.key = reader.bytes(); + m.key = r.bytes(); break; case 3: - message.data = reader.bytes(); + m.data = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a ProofOp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.merkle.ProofOp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.merkle.ProofOp} ProofOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ProofOp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ProofOp message. - * @function verify - * @memberof tendermint.crypto.merkle.ProofOp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ProofOp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.data != null && message.hasOwnProperty("data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - return null; - }; - - /** - * Creates a ProofOp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.merkle.ProofOp - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.merkle.ProofOp} ProofOp - */ - ProofOp.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.merkle.ProofOp) - return object; - var message = new $root.tendermint.crypto.merkle.ProofOp(); - if (object.type != null) - message.type = String(object.type); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length) - message.data = object.data; - return message; - }; - - /** - * Creates a plain object from a ProofOp message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.merkle.ProofOp - * @static - * @param {tendermint.crypto.merkle.ProofOp} message ProofOp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ProofOp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.data != null && message.hasOwnProperty("data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - return object; - }; - - /** - * Converts this ProofOp to JSON. - * @function toJSON - * @memberof tendermint.crypto.merkle.ProofOp - * @instance - * @returns {Object.} JSON object - */ - ProofOp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return ProofOp; @@ -47282,14 +23506,14 @@ $root.tendermint = (function() { * @classdesc Represents a Proof. * @implements IProof * @constructor - * @param {tendermint.crypto.merkle.IProof=} [properties] Properties to set + * @param {tendermint.crypto.merkle.IProof=} [p] Properties to set */ - function Proof(properties) { + function Proof(p) { this.ops = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -47317,30 +23541,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.crypto.merkle.Proof * @static - * @param {tendermint.crypto.merkle.IProof} message Proof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.crypto.merkle.IProof} m Proof message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Proof.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ops != null && message.ops.length) - for (var i = 0; i < message.ops.length; ++i) - $root.tendermint.crypto.merkle.ProofOp.encode(message.ops[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.crypto.merkle.Proof - * @static - * @param {tendermint.crypto.merkle.IProof} message Proof message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Proof.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -47348,128 +23560,30 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.crypto.merkle.Proof * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.crypto.merkle.Proof} Proof * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Proof.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.crypto.merkle.Proof(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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 (!(message.ops && message.ops.length)) - message.ops = []; - message.ops.push($root.tendermint.crypto.merkle.ProofOp.decode(reader, reader.uint32())); + if (!(m.ops && m.ops.length)) + m.ops = []; + m.ops.push($root.tendermint.crypto.merkle.ProofOp.decode(r, r.uint32())); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Proof message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.crypto.merkle.Proof - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.crypto.merkle.Proof} Proof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Proof.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Proof message. - * @function verify - * @memberof tendermint.crypto.merkle.Proof - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Proof.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ops != null && message.hasOwnProperty("ops")) { - if (!Array.isArray(message.ops)) - return "ops: array expected"; - for (var i = 0; i < message.ops.length; ++i) { - var error = $root.tendermint.crypto.merkle.ProofOp.verify(message.ops[i]); - if (error) - return "ops." + error; - } - } - return null; - }; - - /** - * Creates a Proof message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.crypto.merkle.Proof - * @static - * @param {Object.} object Plain object - * @returns {tendermint.crypto.merkle.Proof} Proof - */ - Proof.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.crypto.merkle.Proof) - return object; - var message = new $root.tendermint.crypto.merkle.Proof(); - if (object.ops) { - if (!Array.isArray(object.ops)) - throw TypeError(".tendermint.crypto.merkle.Proof.ops: array expected"); - message.ops = []; - for (var i = 0; i < object.ops.length; ++i) { - if (typeof object.ops[i] !== "object") - throw TypeError(".tendermint.crypto.merkle.Proof.ops: object expected"); - message.ops[i] = $root.tendermint.crypto.merkle.ProofOp.fromObject(object.ops[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Proof message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.crypto.merkle.Proof - * @static - * @param {tendermint.crypto.merkle.Proof} message Proof - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Proof.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.ops = []; - if (message.ops && message.ops.length) { - object.ops = []; - for (var j = 0; j < message.ops.length; ++j) - object.ops[j] = $root.tendermint.crypto.merkle.ProofOp.toObject(message.ops[j], options); - } - return object; - }; - - /** - * Converts this Proof to JSON. - * @function toJSON - * @memberof tendermint.crypto.merkle.Proof - * @instance - * @returns {Object.} JSON object - */ - Proof.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Proof; @@ -47515,13 +23629,13 @@ $root.tendermint = (function() { * @classdesc Represents a Pair. * @implements IPair * @constructor - * @param {tendermint.libs.kv.IPair=} [properties] Properties to set + * @param {tendermint.libs.kv.IPair=} [p] Properties to set */ - function Pair(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -47557,31 +23671,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.libs.kv.Pair * @static - * @param {tendermint.libs.kv.IPair} message Pair message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.libs.kv.IPair} m Pair message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Pair.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.libs.kv.Pair - * @static - * @param {tendermint.libs.kv.IPair} message Pair message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Pair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -47589,139 +23690,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.libs.kv.Pair * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.libs.kv.Pair} Pair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Pair.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.libs.kv.Pair(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.key = reader.bytes(); + m.key = r.bytes(); break; case 2: - message.value = reader.bytes(); + m.value = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Pair message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.libs.kv.Pair - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.libs.kv.Pair} Pair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pair.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Pair message. - * @function verify - * @memberof tendermint.libs.kv.Pair - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Pair.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates a Pair message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.libs.kv.Pair - * @static - * @param {Object.} object Plain object - * @returns {tendermint.libs.kv.Pair} Pair - */ - Pair.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.libs.kv.Pair) - return object; - var message = new $root.tendermint.libs.kv.Pair(); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from a Pair message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.libs.kv.Pair - * @static - * @param {tendermint.libs.kv.Pair} message Pair - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Pair.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Pair to JSON. - * @function toJSON - * @memberof tendermint.libs.kv.Pair - * @instance - * @returns {Object.} JSON object - */ - Pair.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Pair; @@ -47743,13 +23736,13 @@ $root.tendermint = (function() { * @classdesc Represents a KI64Pair. * @implements IKI64Pair * @constructor - * @param {tendermint.libs.kv.IKI64Pair=} [properties] Properties to set + * @param {tendermint.libs.kv.IKI64Pair=} [p] Properties to set */ - function KI64Pair(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -47785,31 +23778,18 @@ $root.tendermint = (function() { * @function encode * @memberof tendermint.libs.kv.KI64Pair * @static - * @param {tendermint.libs.kv.IKI64Pair} message KI64Pair message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {tendermint.libs.kv.IKI64Pair} m KI64Pair message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KI64Pair.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.value); - return writer; - }; - - /** - * Encodes the specified KI64Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. - * @function encodeDelimited - * @memberof tendermint.libs.kv.KI64Pair - * @static - * @param {tendermint.libs.kv.IKI64Pair} message KI64Pair message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KI64Pair.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -47817,144 +23797,31 @@ $root.tendermint = (function() { * @function decode * @memberof tendermint.libs.kv.KI64Pair * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {tendermint.libs.kv.KI64Pair} KI64Pair * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KI64Pair.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.tendermint.libs.kv.KI64Pair(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.key = reader.bytes(); + m.key = r.bytes(); break; case 2: - message.value = reader.int64(); + m.value = r.int64(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a KI64Pair message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof tendermint.libs.kv.KI64Pair - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {tendermint.libs.kv.KI64Pair} KI64Pair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KI64Pair.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a KI64Pair message. - * @function verify - * @memberof tendermint.libs.kv.KI64Pair - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KI64Pair.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) - return "key: buffer expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high))) - return "value: integer|Long expected"; - return null; - }; - - /** - * Creates a KI64Pair message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof tendermint.libs.kv.KI64Pair - * @static - * @param {Object.} object Plain object - * @returns {tendermint.libs.kv.KI64Pair} KI64Pair - */ - KI64Pair.fromObject = function fromObject(object) { - if (object instanceof $root.tendermint.libs.kv.KI64Pair) - return object; - var message = new $root.tendermint.libs.kv.KI64Pair(); - if (object.key != null) - if (typeof object.key === "string") - $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); - else if (object.key.length) - message.key = object.key; - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a KI64Pair message. Also converts values to other types if specified. - * @function toObject - * @memberof tendermint.libs.kv.KI64Pair - * @static - * @param {tendermint.libs.kv.KI64Pair} message KI64Pair - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KI64Pair.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.key = ""; - else { - object.key = []; - if (options.bytes !== Array) - object.key = $util.newBuffer(object.key); - } - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; - - /** - * Converts this KI64Pair to JSON. - * @function toJSON - * @memberof tendermint.libs.kv.KI64Pair - * @instance - * @returns {Object.} JSON object - */ - KI64Pair.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return KI64Pair; @@ -48003,13 +23870,13 @@ $root.google = (function() { * @classdesc Represents an Any. * @implements IAny * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IAny=} [p] Properties to set */ - function Any(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -48045,31 +23912,18 @@ $root.google = (function() { * @function encode * @memberof google.protobuf.Any * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {google.protobuf.IAny} m Any message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -48077,3793 +23931,42 @@ $root.google = (function() { * @function decode * @memberof google.protobuf.Any * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {google.protobuf.Any} Any * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Any.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.type_url = reader.string(); + m.type_url = r.string(); break; case 2: - message.value = reader.bytes(); + m.value = r.bytes(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Any; })(); - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FileDescriptorSet; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message["package"] = reader.string(); - break; - case 3: - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - case 10: - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - case 11: - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - case 4: - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 8: - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - case 9: - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - case 12: - message.syntax = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 6: - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - case 4: - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - case 5: - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - case 8: - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - case 7: - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - case 9: - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - case 10: - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.start = reader.int32(); - break; - case 2: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 3: - message.number = reader.int32(); - break; - case 4: - message.label = reader.int32(); - break; - case 5: - message.type = reader.int32(); - break; - case 6: - message.typeName = reader.string(); - break; - case 2: - message.extendee = reader.string(); - break; - case 7: - message.defaultValue = reader.string(); - break; - case 9: - message.oneofIndex = reader.int32(); - break; - case 10: - message.jsonName = reader.string(); - break; - case 8: - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.value = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.number = reader.int32(); - break; - case 3: - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - case 3: - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.inputType = reader.string(); - break; - case 3: - message.outputType = reader.string(); - break; - case 4: - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - case 5: - message.clientStreaming = reader.bool(); - break; - case 6: - message.serverStreaming = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MethodDescriptorProto; - })(); - protobuf.FileOptions = (function() { /** * Properties of a FileOptions. * @memberof google.protobuf * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {boolean|null} [".gogoproto.goprotoGettersAll"] FileOptions .gogoproto.goprotoGettersAll - * @property {boolean|null} [".gogoproto.goprotoEnumPrefixAll"] FileOptions .gogoproto.goprotoEnumPrefixAll - * @property {boolean|null} [".gogoproto.goprotoStringerAll"] FileOptions .gogoproto.goprotoStringerAll - * @property {boolean|null} [".gogoproto.verboseEqualAll"] FileOptions .gogoproto.verboseEqualAll - * @property {boolean|null} [".gogoproto.faceAll"] FileOptions .gogoproto.faceAll - * @property {boolean|null} [".gogoproto.gostringAll"] FileOptions .gogoproto.gostringAll - * @property {boolean|null} [".gogoproto.populateAll"] FileOptions .gogoproto.populateAll - * @property {boolean|null} [".gogoproto.stringerAll"] FileOptions .gogoproto.stringerAll - * @property {boolean|null} [".gogoproto.onlyoneAll"] FileOptions .gogoproto.onlyoneAll - * @property {boolean|null} [".gogoproto.equalAll"] FileOptions .gogoproto.equalAll - * @property {boolean|null} [".gogoproto.descriptionAll"] FileOptions .gogoproto.descriptionAll - * @property {boolean|null} [".gogoproto.testgenAll"] FileOptions .gogoproto.testgenAll - * @property {boolean|null} [".gogoproto.benchgenAll"] FileOptions .gogoproto.benchgenAll - * @property {boolean|null} [".gogoproto.marshalerAll"] FileOptions .gogoproto.marshalerAll - * @property {boolean|null} [".gogoproto.unmarshalerAll"] FileOptions .gogoproto.unmarshalerAll - * @property {boolean|null} [".gogoproto.stableMarshalerAll"] FileOptions .gogoproto.stableMarshalerAll - * @property {boolean|null} [".gogoproto.sizerAll"] FileOptions .gogoproto.sizerAll - * @property {boolean|null} [".gogoproto.goprotoEnumStringerAll"] FileOptions .gogoproto.goprotoEnumStringerAll - * @property {boolean|null} [".gogoproto.enumStringerAll"] FileOptions .gogoproto.enumStringerAll - * @property {boolean|null} [".gogoproto.unsafeMarshalerAll"] FileOptions .gogoproto.unsafeMarshalerAll - * @property {boolean|null} [".gogoproto.unsafeUnmarshalerAll"] FileOptions .gogoproto.unsafeUnmarshalerAll - * @property {boolean|null} [".gogoproto.goprotoExtensionsMapAll"] FileOptions .gogoproto.goprotoExtensionsMapAll - * @property {boolean|null} [".gogoproto.goprotoUnrecognizedAll"] FileOptions .gogoproto.goprotoUnrecognizedAll - * @property {boolean|null} [".gogoproto.gogoprotoImport"] FileOptions .gogoproto.gogoprotoImport - * @property {boolean|null} [".gogoproto.protosizerAll"] FileOptions .gogoproto.protosizerAll - * @property {boolean|null} [".gogoproto.compareAll"] FileOptions .gogoproto.compareAll - * @property {boolean|null} [".gogoproto.typedeclAll"] FileOptions .gogoproto.typedeclAll - * @property {boolean|null} [".gogoproto.enumdeclAll"] FileOptions .gogoproto.enumdeclAll - * @property {boolean|null} [".gogoproto.goprotoRegistration"] FileOptions .gogoproto.goprotoRegistration - * @property {boolean|null} [".gogoproto.messagenameAll"] FileOptions .gogoproto.messagenameAll - * @property {boolean|null} [".gogoproto.goprotoSizecacheAll"] FileOptions .gogoproto.goprotoSizecacheAll - * @property {boolean|null} [".gogoproto.goprotoUnkeyedAll"] FileOptions .gogoproto.goprotoUnkeyedAll */ /** @@ -51872,392 +23975,15 @@ $root.google = (function() { * @classdesc Represents a FileOptions. * @implements IFileOptions * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.IFileOptions=} [p] Properties to set */ - function FileOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function FileOptions(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]]; } - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = false; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .gogoproto.goprotoGettersAll. - * @member {boolean} .gogoproto.goprotoGettersAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goprotoGettersAll"] = false; - - /** - * FileOptions .gogoproto.goprotoEnumPrefixAll. - * @member {boolean} .gogoproto.goprotoEnumPrefixAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goprotoEnumPrefixAll"] = false; - - /** - * FileOptions .gogoproto.goprotoStringerAll. - * @member {boolean} .gogoproto.goprotoStringerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goprotoStringerAll"] = false; - - /** - * FileOptions .gogoproto.verboseEqualAll. - * @member {boolean} .gogoproto.verboseEqualAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.verboseEqualAll"] = false; - - /** - * FileOptions .gogoproto.faceAll. - * @member {boolean} .gogoproto.faceAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.faceAll"] = false; - - /** - * FileOptions .gogoproto.gostringAll. - * @member {boolean} .gogoproto.gostringAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gostringAll"] = false; - - /** - * FileOptions .gogoproto.populateAll. - * @member {boolean} .gogoproto.populateAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.populateAll"] = false; - - /** - * FileOptions .gogoproto.stringerAll. - * @member {boolean} .gogoproto.stringerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stringerAll"] = false; - - /** - * FileOptions .gogoproto.onlyoneAll. - * @member {boolean} .gogoproto.onlyoneAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.onlyoneAll"] = false; - - /** - * FileOptions .gogoproto.equalAll. - * @member {boolean} .gogoproto.equalAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.equalAll"] = false; - - /** - * FileOptions .gogoproto.descriptionAll. - * @member {boolean} .gogoproto.descriptionAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.descriptionAll"] = false; - - /** - * FileOptions .gogoproto.testgenAll. - * @member {boolean} .gogoproto.testgenAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.testgenAll"] = false; - - /** - * FileOptions .gogoproto.benchgenAll. - * @member {boolean} .gogoproto.benchgenAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.benchgenAll"] = false; - - /** - * FileOptions .gogoproto.marshalerAll. - * @member {boolean} .gogoproto.marshalerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.marshalerAll"] = false; - - /** - * FileOptions .gogoproto.unmarshalerAll. - * @member {boolean} .gogoproto.unmarshalerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unmarshalerAll"] = false; - - /** - * FileOptions .gogoproto.stableMarshalerAll. - * @member {boolean} .gogoproto.stableMarshalerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.stableMarshalerAll"] = false; - - /** - * FileOptions .gogoproto.sizerAll. - * @member {boolean} .gogoproto.sizerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.sizerAll"] = false; - - /** - * FileOptions .gogoproto.goprotoEnumStringerAll. - * @member {boolean} .gogoproto.goprotoEnumStringerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goprotoEnumStringerAll"] = false; - - /** - * FileOptions .gogoproto.enumStringerAll. - * @member {boolean} .gogoproto.enumStringerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enumStringerAll"] = false; - - /** - * FileOptions .gogoproto.unsafeMarshalerAll. - * @member {boolean} .gogoproto.unsafeMarshalerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafeMarshalerAll"] = false; - - /** - * FileOptions .gogoproto.unsafeUnmarshalerAll. - * @member {boolean} .gogoproto.unsafeUnmarshalerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.unsafeUnmarshalerAll"] = false; - - /** - * FileOptions .gogoproto.goprotoExtensionsMapAll. - * @member {boolean} .gogoproto.goprotoExtensionsMapAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goprotoExtensionsMapAll"] = false; - - /** - * FileOptions .gogoproto.goprotoUnrecognizedAll. - * @member {boolean} .gogoproto.goprotoUnrecognizedAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goprotoUnrecognizedAll"] = false; - - /** - * FileOptions .gogoproto.gogoprotoImport. - * @member {boolean} .gogoproto.gogoprotoImport - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.gogoprotoImport"] = false; - - /** - * FileOptions .gogoproto.protosizerAll. - * @member {boolean} .gogoproto.protosizerAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.protosizerAll"] = false; - - /** - * FileOptions .gogoproto.compareAll. - * @member {boolean} .gogoproto.compareAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.compareAll"] = false; - - /** - * FileOptions .gogoproto.typedeclAll. - * @member {boolean} .gogoproto.typedeclAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.typedeclAll"] = false; - - /** - * FileOptions .gogoproto.enumdeclAll. - * @member {boolean} .gogoproto.enumdeclAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.enumdeclAll"] = false; - - /** - * FileOptions .gogoproto.goprotoRegistration. - * @member {boolean} .gogoproto.goprotoRegistration - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goprotoRegistration"] = false; - - /** - * FileOptions .gogoproto.messagenameAll. - * @member {boolean} .gogoproto.messagenameAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.messagenameAll"] = false; - - /** - * FileOptions .gogoproto.goprotoSizecacheAll. - * @member {boolean} .gogoproto.goprotoSizecacheAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goprotoSizecacheAll"] = false; - - /** - * FileOptions .gogoproto.goprotoUnkeyedAll. - * @member {boolean} .gogoproto.goprotoUnkeyedAll - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".gogoproto.goprotoUnkeyedAll"] = false; - /** * Creates a new FileOptions instance using the specified properties. * @function create @@ -52275,122 +24001,14 @@ $root.google = (function() { * @function encode * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {google.protobuf.IFileOptions} m FileOptions message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goprotoGettersAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoGettersAll")) - writer.uint32(/* id 63001, wireType 0 =*/504008).bool(message[".gogoproto.goprotoGettersAll"]); - if (message[".gogoproto.goprotoEnumPrefixAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoEnumPrefixAll")) - writer.uint32(/* id 63002, wireType 0 =*/504016).bool(message[".gogoproto.goprotoEnumPrefixAll"]); - if (message[".gogoproto.goprotoStringerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoStringerAll")) - writer.uint32(/* id 63003, wireType 0 =*/504024).bool(message[".gogoproto.goprotoStringerAll"]); - if (message[".gogoproto.verboseEqualAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verboseEqualAll")) - writer.uint32(/* id 63004, wireType 0 =*/504032).bool(message[".gogoproto.verboseEqualAll"]); - if (message[".gogoproto.faceAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.faceAll")) - writer.uint32(/* id 63005, wireType 0 =*/504040).bool(message[".gogoproto.faceAll"]); - if (message[".gogoproto.gostringAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostringAll")) - writer.uint32(/* id 63006, wireType 0 =*/504048).bool(message[".gogoproto.gostringAll"]); - if (message[".gogoproto.populateAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populateAll")) - writer.uint32(/* id 63007, wireType 0 =*/504056).bool(message[".gogoproto.populateAll"]); - if (message[".gogoproto.stringerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringerAll")) - writer.uint32(/* id 63008, wireType 0 =*/504064).bool(message[".gogoproto.stringerAll"]); - if (message[".gogoproto.onlyoneAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyoneAll")) - writer.uint32(/* id 63009, wireType 0 =*/504072).bool(message[".gogoproto.onlyoneAll"]); - if (message[".gogoproto.equalAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equalAll")) - writer.uint32(/* id 63013, wireType 0 =*/504104).bool(message[".gogoproto.equalAll"]); - if (message[".gogoproto.descriptionAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.descriptionAll")) - writer.uint32(/* id 63014, wireType 0 =*/504112).bool(message[".gogoproto.descriptionAll"]); - if (message[".gogoproto.testgenAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgenAll")) - writer.uint32(/* id 63015, wireType 0 =*/504120).bool(message[".gogoproto.testgenAll"]); - if (message[".gogoproto.benchgenAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgenAll")) - writer.uint32(/* id 63016, wireType 0 =*/504128).bool(message[".gogoproto.benchgenAll"]); - if (message[".gogoproto.marshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshalerAll")) - writer.uint32(/* id 63017, wireType 0 =*/504136).bool(message[".gogoproto.marshalerAll"]); - if (message[".gogoproto.unmarshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshalerAll")) - writer.uint32(/* id 63018, wireType 0 =*/504144).bool(message[".gogoproto.unmarshalerAll"]); - if (message[".gogoproto.stableMarshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stableMarshalerAll")) - writer.uint32(/* id 63019, wireType 0 =*/504152).bool(message[".gogoproto.stableMarshalerAll"]); - if (message[".gogoproto.sizerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizerAll")) - writer.uint32(/* id 63020, wireType 0 =*/504160).bool(message[".gogoproto.sizerAll"]); - if (message[".gogoproto.goprotoEnumStringerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoEnumStringerAll")) - writer.uint32(/* id 63021, wireType 0 =*/504168).bool(message[".gogoproto.goprotoEnumStringerAll"]); - if (message[".gogoproto.enumStringerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumStringerAll")) - writer.uint32(/* id 63022, wireType 0 =*/504176).bool(message[".gogoproto.enumStringerAll"]); - if (message[".gogoproto.unsafeMarshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafeMarshalerAll")) - writer.uint32(/* id 63023, wireType 0 =*/504184).bool(message[".gogoproto.unsafeMarshalerAll"]); - if (message[".gogoproto.unsafeUnmarshalerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafeUnmarshalerAll")) - writer.uint32(/* id 63024, wireType 0 =*/504192).bool(message[".gogoproto.unsafeUnmarshalerAll"]); - if (message[".gogoproto.goprotoExtensionsMapAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoExtensionsMapAll")) - writer.uint32(/* id 63025, wireType 0 =*/504200).bool(message[".gogoproto.goprotoExtensionsMapAll"]); - if (message[".gogoproto.goprotoUnrecognizedAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoUnrecognizedAll")) - writer.uint32(/* id 63026, wireType 0 =*/504208).bool(message[".gogoproto.goprotoUnrecognizedAll"]); - if (message[".gogoproto.gogoprotoImport"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gogoprotoImport")) - writer.uint32(/* id 63027, wireType 0 =*/504216).bool(message[".gogoproto.gogoprotoImport"]); - if (message[".gogoproto.protosizerAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizerAll")) - writer.uint32(/* id 63028, wireType 0 =*/504224).bool(message[".gogoproto.protosizerAll"]); - if (message[".gogoproto.compareAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compareAll")) - writer.uint32(/* id 63029, wireType 0 =*/504232).bool(message[".gogoproto.compareAll"]); - if (message[".gogoproto.typedeclAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedeclAll")) - writer.uint32(/* id 63030, wireType 0 =*/504240).bool(message[".gogoproto.typedeclAll"]); - if (message[".gogoproto.enumdeclAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdeclAll")) - writer.uint32(/* id 63031, wireType 0 =*/504248).bool(message[".gogoproto.enumdeclAll"]); - if (message[".gogoproto.goprotoRegistration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoRegistration")) - writer.uint32(/* id 63032, wireType 0 =*/504256).bool(message[".gogoproto.goprotoRegistration"]); - if (message[".gogoproto.messagenameAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagenameAll")) - writer.uint32(/* id 63033, wireType 0 =*/504264).bool(message[".gogoproto.messagenameAll"]); - if (message[".gogoproto.goprotoSizecacheAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoSizecacheAll")) - writer.uint32(/* id 63034, wireType 0 =*/504272).bool(message[".gogoproto.goprotoSizecacheAll"]); - if (message[".gogoproto.goprotoUnkeyedAll"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoUnkeyedAll")) - writer.uint32(/* id 63035, wireType 0 =*/504280).bool(message[".gogoproto.goprotoUnkeyedAll"]); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FileOptions.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + return w; }; /** @@ -52398,672 +24016,27 @@ $root.google = (function() { * @function decode * @memberof google.protobuf.FileOptions * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {google.protobuf.FileOptions} FileOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.javaPackage = reader.string(); - break; - case 8: - message.javaOuterClassname = reader.string(); - break; - case 10: - message.javaMultipleFiles = reader.bool(); - break; - case 20: - message.javaGenerateEqualsAndHash = reader.bool(); - break; - case 27: - message.javaStringCheckUtf8 = reader.bool(); - break; - case 9: - message.optimizeFor = reader.int32(); - break; - case 11: - message.goPackage = reader.string(); - break; - case 16: - message.ccGenericServices = reader.bool(); - break; - case 17: - message.javaGenericServices = reader.bool(); - break; - case 18: - message.pyGenericServices = reader.bool(); - break; - case 23: - message.deprecated = reader.bool(); - break; - case 31: - message.ccEnableArenas = reader.bool(); - break; - case 36: - message.objcClassPrefix = reader.string(); - break; - case 37: - message.csharpNamespace = reader.string(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 63001: - message[".gogoproto.goprotoGettersAll"] = reader.bool(); - break; - case 63002: - message[".gogoproto.goprotoEnumPrefixAll"] = reader.bool(); - break; - case 63003: - message[".gogoproto.goprotoStringerAll"] = reader.bool(); - break; - case 63004: - message[".gogoproto.verboseEqualAll"] = reader.bool(); - break; - case 63005: - message[".gogoproto.faceAll"] = reader.bool(); - break; - case 63006: - message[".gogoproto.gostringAll"] = reader.bool(); - break; - case 63007: - message[".gogoproto.populateAll"] = reader.bool(); - break; - case 63008: - message[".gogoproto.stringerAll"] = reader.bool(); - break; - case 63009: - message[".gogoproto.onlyoneAll"] = reader.bool(); - break; - case 63013: - message[".gogoproto.equalAll"] = reader.bool(); - break; - case 63014: - message[".gogoproto.descriptionAll"] = reader.bool(); - break; - case 63015: - message[".gogoproto.testgenAll"] = reader.bool(); - break; - case 63016: - message[".gogoproto.benchgenAll"] = reader.bool(); - break; - case 63017: - message[".gogoproto.marshalerAll"] = reader.bool(); - break; - case 63018: - message[".gogoproto.unmarshalerAll"] = reader.bool(); - break; - case 63019: - message[".gogoproto.stableMarshalerAll"] = reader.bool(); - break; - case 63020: - message[".gogoproto.sizerAll"] = reader.bool(); - break; - case 63021: - message[".gogoproto.goprotoEnumStringerAll"] = reader.bool(); - break; - case 63022: - message[".gogoproto.enumStringerAll"] = reader.bool(); - break; - case 63023: - message[".gogoproto.unsafeMarshalerAll"] = reader.bool(); - break; - case 63024: - message[".gogoproto.unsafeUnmarshalerAll"] = reader.bool(); - break; - case 63025: - message[".gogoproto.goprotoExtensionsMapAll"] = reader.bool(); - break; - case 63026: - message[".gogoproto.goprotoUnrecognizedAll"] = reader.bool(); - break; - case 63027: - message[".gogoproto.gogoprotoImport"] = reader.bool(); - break; - case 63028: - message[".gogoproto.protosizerAll"] = reader.bool(); - break; - case 63029: - message[".gogoproto.compareAll"] = reader.bool(); - break; - case 63030: - message[".gogoproto.typedeclAll"] = reader.bool(); - break; - case 63031: - message[".gogoproto.enumdeclAll"] = reader.bool(); - break; - case 63032: - message[".gogoproto.goprotoRegistration"] = reader.bool(); - break; - case 63033: - message[".gogoproto.messagenameAll"] = reader.bool(); - break; - case 63034: - message[".gogoproto.goprotoSizecacheAll"] = reader.bool(); - break; - case 63035: - message[".gogoproto.goprotoUnkeyedAll"] = reader.bool(); - break; + FileOptions.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.FileOptions(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; + return m; }; - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".gogoproto.goprotoGettersAll"] != null && message.hasOwnProperty(".gogoproto.goprotoGettersAll")) - if (typeof message[".gogoproto.goprotoGettersAll"] !== "boolean") - return ".gogoproto.goprotoGettersAll: boolean expected"; - if (message[".gogoproto.goprotoEnumPrefixAll"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumPrefixAll")) - if (typeof message[".gogoproto.goprotoEnumPrefixAll"] !== "boolean") - return ".gogoproto.goprotoEnumPrefixAll: boolean expected"; - if (message[".gogoproto.goprotoStringerAll"] != null && message.hasOwnProperty(".gogoproto.goprotoStringerAll")) - if (typeof message[".gogoproto.goprotoStringerAll"] !== "boolean") - return ".gogoproto.goprotoStringerAll: boolean expected"; - if (message[".gogoproto.verboseEqualAll"] != null && message.hasOwnProperty(".gogoproto.verboseEqualAll")) - if (typeof message[".gogoproto.verboseEqualAll"] !== "boolean") - return ".gogoproto.verboseEqualAll: boolean expected"; - if (message[".gogoproto.faceAll"] != null && message.hasOwnProperty(".gogoproto.faceAll")) - if (typeof message[".gogoproto.faceAll"] !== "boolean") - return ".gogoproto.faceAll: boolean expected"; - if (message[".gogoproto.gostringAll"] != null && message.hasOwnProperty(".gogoproto.gostringAll")) - if (typeof message[".gogoproto.gostringAll"] !== "boolean") - return ".gogoproto.gostringAll: boolean expected"; - if (message[".gogoproto.populateAll"] != null && message.hasOwnProperty(".gogoproto.populateAll")) - if (typeof message[".gogoproto.populateAll"] !== "boolean") - return ".gogoproto.populateAll: boolean expected"; - if (message[".gogoproto.stringerAll"] != null && message.hasOwnProperty(".gogoproto.stringerAll")) - if (typeof message[".gogoproto.stringerAll"] !== "boolean") - return ".gogoproto.stringerAll: boolean expected"; - if (message[".gogoproto.onlyoneAll"] != null && message.hasOwnProperty(".gogoproto.onlyoneAll")) - if (typeof message[".gogoproto.onlyoneAll"] !== "boolean") - return ".gogoproto.onlyoneAll: boolean expected"; - if (message[".gogoproto.equalAll"] != null && message.hasOwnProperty(".gogoproto.equalAll")) - if (typeof message[".gogoproto.equalAll"] !== "boolean") - return ".gogoproto.equalAll: boolean expected"; - if (message[".gogoproto.descriptionAll"] != null && message.hasOwnProperty(".gogoproto.descriptionAll")) - if (typeof message[".gogoproto.descriptionAll"] !== "boolean") - return ".gogoproto.descriptionAll: boolean expected"; - if (message[".gogoproto.testgenAll"] != null && message.hasOwnProperty(".gogoproto.testgenAll")) - if (typeof message[".gogoproto.testgenAll"] !== "boolean") - return ".gogoproto.testgenAll: boolean expected"; - if (message[".gogoproto.benchgenAll"] != null && message.hasOwnProperty(".gogoproto.benchgenAll")) - if (typeof message[".gogoproto.benchgenAll"] !== "boolean") - return ".gogoproto.benchgenAll: boolean expected"; - if (message[".gogoproto.marshalerAll"] != null && message.hasOwnProperty(".gogoproto.marshalerAll")) - if (typeof message[".gogoproto.marshalerAll"] !== "boolean") - return ".gogoproto.marshalerAll: boolean expected"; - if (message[".gogoproto.unmarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unmarshalerAll")) - if (typeof message[".gogoproto.unmarshalerAll"] !== "boolean") - return ".gogoproto.unmarshalerAll: boolean expected"; - if (message[".gogoproto.stableMarshalerAll"] != null && message.hasOwnProperty(".gogoproto.stableMarshalerAll")) - if (typeof message[".gogoproto.stableMarshalerAll"] !== "boolean") - return ".gogoproto.stableMarshalerAll: boolean expected"; - if (message[".gogoproto.sizerAll"] != null && message.hasOwnProperty(".gogoproto.sizerAll")) - if (typeof message[".gogoproto.sizerAll"] !== "boolean") - return ".gogoproto.sizerAll: boolean expected"; - if (message[".gogoproto.goprotoEnumStringerAll"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumStringerAll")) - if (typeof message[".gogoproto.goprotoEnumStringerAll"] !== "boolean") - return ".gogoproto.goprotoEnumStringerAll: boolean expected"; - if (message[".gogoproto.enumStringerAll"] != null && message.hasOwnProperty(".gogoproto.enumStringerAll")) - if (typeof message[".gogoproto.enumStringerAll"] !== "boolean") - return ".gogoproto.enumStringerAll: boolean expected"; - if (message[".gogoproto.unsafeMarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unsafeMarshalerAll")) - if (typeof message[".gogoproto.unsafeMarshalerAll"] !== "boolean") - return ".gogoproto.unsafeMarshalerAll: boolean expected"; - if (message[".gogoproto.unsafeUnmarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unsafeUnmarshalerAll")) - if (typeof message[".gogoproto.unsafeUnmarshalerAll"] !== "boolean") - return ".gogoproto.unsafeUnmarshalerAll: boolean expected"; - if (message[".gogoproto.goprotoExtensionsMapAll"] != null && message.hasOwnProperty(".gogoproto.goprotoExtensionsMapAll")) - if (typeof message[".gogoproto.goprotoExtensionsMapAll"] !== "boolean") - return ".gogoproto.goprotoExtensionsMapAll: boolean expected"; - if (message[".gogoproto.goprotoUnrecognizedAll"] != null && message.hasOwnProperty(".gogoproto.goprotoUnrecognizedAll")) - if (typeof message[".gogoproto.goprotoUnrecognizedAll"] !== "boolean") - return ".gogoproto.goprotoUnrecognizedAll: boolean expected"; - if (message[".gogoproto.gogoprotoImport"] != null && message.hasOwnProperty(".gogoproto.gogoprotoImport")) - if (typeof message[".gogoproto.gogoprotoImport"] !== "boolean") - return ".gogoproto.gogoprotoImport: boolean expected"; - if (message[".gogoproto.protosizerAll"] != null && message.hasOwnProperty(".gogoproto.protosizerAll")) - if (typeof message[".gogoproto.protosizerAll"] !== "boolean") - return ".gogoproto.protosizerAll: boolean expected"; - if (message[".gogoproto.compareAll"] != null && message.hasOwnProperty(".gogoproto.compareAll")) - if (typeof message[".gogoproto.compareAll"] !== "boolean") - return ".gogoproto.compareAll: boolean expected"; - if (message[".gogoproto.typedeclAll"] != null && message.hasOwnProperty(".gogoproto.typedeclAll")) - if (typeof message[".gogoproto.typedeclAll"] !== "boolean") - return ".gogoproto.typedeclAll: boolean expected"; - if (message[".gogoproto.enumdeclAll"] != null && message.hasOwnProperty(".gogoproto.enumdeclAll")) - if (typeof message[".gogoproto.enumdeclAll"] !== "boolean") - return ".gogoproto.enumdeclAll: boolean expected"; - if (message[".gogoproto.goprotoRegistration"] != null && message.hasOwnProperty(".gogoproto.goprotoRegistration")) - if (typeof message[".gogoproto.goprotoRegistration"] !== "boolean") - return ".gogoproto.goprotoRegistration: boolean expected"; - if (message[".gogoproto.messagenameAll"] != null && message.hasOwnProperty(".gogoproto.messagenameAll")) - if (typeof message[".gogoproto.messagenameAll"] !== "boolean") - return ".gogoproto.messagenameAll: boolean expected"; - if (message[".gogoproto.goprotoSizecacheAll"] != null && message.hasOwnProperty(".gogoproto.goprotoSizecacheAll")) - if (typeof message[".gogoproto.goprotoSizecacheAll"] !== "boolean") - return ".gogoproto.goprotoSizecacheAll: boolean expected"; - if (message[".gogoproto.goprotoUnkeyedAll"] != null && message.hasOwnProperty(".gogoproto.goprotoUnkeyedAll")) - if (typeof message[".gogoproto.goprotoUnkeyedAll"] !== "boolean") - return ".gogoproto.goprotoUnkeyedAll: boolean expected"; - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".gogoproto.goprotoGettersAll"] != null) - message[".gogoproto.goprotoGettersAll"] = Boolean(object[".gogoproto.goprotoGettersAll"]); - if (object[".gogoproto.goprotoEnumPrefixAll"] != null) - message[".gogoproto.goprotoEnumPrefixAll"] = Boolean(object[".gogoproto.goprotoEnumPrefixAll"]); - if (object[".gogoproto.goprotoStringerAll"] != null) - message[".gogoproto.goprotoStringerAll"] = Boolean(object[".gogoproto.goprotoStringerAll"]); - if (object[".gogoproto.verboseEqualAll"] != null) - message[".gogoproto.verboseEqualAll"] = Boolean(object[".gogoproto.verboseEqualAll"]); - if (object[".gogoproto.faceAll"] != null) - message[".gogoproto.faceAll"] = Boolean(object[".gogoproto.faceAll"]); - if (object[".gogoproto.gostringAll"] != null) - message[".gogoproto.gostringAll"] = Boolean(object[".gogoproto.gostringAll"]); - if (object[".gogoproto.populateAll"] != null) - message[".gogoproto.populateAll"] = Boolean(object[".gogoproto.populateAll"]); - if (object[".gogoproto.stringerAll"] != null) - message[".gogoproto.stringerAll"] = Boolean(object[".gogoproto.stringerAll"]); - if (object[".gogoproto.onlyoneAll"] != null) - message[".gogoproto.onlyoneAll"] = Boolean(object[".gogoproto.onlyoneAll"]); - if (object[".gogoproto.equalAll"] != null) - message[".gogoproto.equalAll"] = Boolean(object[".gogoproto.equalAll"]); - if (object[".gogoproto.descriptionAll"] != null) - message[".gogoproto.descriptionAll"] = Boolean(object[".gogoproto.descriptionAll"]); - if (object[".gogoproto.testgenAll"] != null) - message[".gogoproto.testgenAll"] = Boolean(object[".gogoproto.testgenAll"]); - if (object[".gogoproto.benchgenAll"] != null) - message[".gogoproto.benchgenAll"] = Boolean(object[".gogoproto.benchgenAll"]); - if (object[".gogoproto.marshalerAll"] != null) - message[".gogoproto.marshalerAll"] = Boolean(object[".gogoproto.marshalerAll"]); - if (object[".gogoproto.unmarshalerAll"] != null) - message[".gogoproto.unmarshalerAll"] = Boolean(object[".gogoproto.unmarshalerAll"]); - if (object[".gogoproto.stableMarshalerAll"] != null) - message[".gogoproto.stableMarshalerAll"] = Boolean(object[".gogoproto.stableMarshalerAll"]); - if (object[".gogoproto.sizerAll"] != null) - message[".gogoproto.sizerAll"] = Boolean(object[".gogoproto.sizerAll"]); - if (object[".gogoproto.goprotoEnumStringerAll"] != null) - message[".gogoproto.goprotoEnumStringerAll"] = Boolean(object[".gogoproto.goprotoEnumStringerAll"]); - if (object[".gogoproto.enumStringerAll"] != null) - message[".gogoproto.enumStringerAll"] = Boolean(object[".gogoproto.enumStringerAll"]); - if (object[".gogoproto.unsafeMarshalerAll"] != null) - message[".gogoproto.unsafeMarshalerAll"] = Boolean(object[".gogoproto.unsafeMarshalerAll"]); - if (object[".gogoproto.unsafeUnmarshalerAll"] != null) - message[".gogoproto.unsafeUnmarshalerAll"] = Boolean(object[".gogoproto.unsafeUnmarshalerAll"]); - if (object[".gogoproto.goprotoExtensionsMapAll"] != null) - message[".gogoproto.goprotoExtensionsMapAll"] = Boolean(object[".gogoproto.goprotoExtensionsMapAll"]); - if (object[".gogoproto.goprotoUnrecognizedAll"] != null) - message[".gogoproto.goprotoUnrecognizedAll"] = Boolean(object[".gogoproto.goprotoUnrecognizedAll"]); - if (object[".gogoproto.gogoprotoImport"] != null) - message[".gogoproto.gogoprotoImport"] = Boolean(object[".gogoproto.gogoprotoImport"]); - if (object[".gogoproto.protosizerAll"] != null) - message[".gogoproto.protosizerAll"] = Boolean(object[".gogoproto.protosizerAll"]); - if (object[".gogoproto.compareAll"] != null) - message[".gogoproto.compareAll"] = Boolean(object[".gogoproto.compareAll"]); - if (object[".gogoproto.typedeclAll"] != null) - message[".gogoproto.typedeclAll"] = Boolean(object[".gogoproto.typedeclAll"]); - if (object[".gogoproto.enumdeclAll"] != null) - message[".gogoproto.enumdeclAll"] = Boolean(object[".gogoproto.enumdeclAll"]); - if (object[".gogoproto.goprotoRegistration"] != null) - message[".gogoproto.goprotoRegistration"] = Boolean(object[".gogoproto.goprotoRegistration"]); - if (object[".gogoproto.messagenameAll"] != null) - message[".gogoproto.messagenameAll"] = Boolean(object[".gogoproto.messagenameAll"]); - if (object[".gogoproto.goprotoSizecacheAll"] != null) - message[".gogoproto.goprotoSizecacheAll"] = Boolean(object[".gogoproto.goprotoSizecacheAll"]); - if (object[".gogoproto.goprotoUnkeyedAll"] != null) - message[".gogoproto.goprotoUnkeyedAll"] = Boolean(object[".gogoproto.goprotoUnkeyedAll"]); - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object[".gogoproto.goprotoGettersAll"] = false; - object[".gogoproto.goprotoEnumPrefixAll"] = false; - object[".gogoproto.goprotoStringerAll"] = false; - object[".gogoproto.verboseEqualAll"] = false; - object[".gogoproto.faceAll"] = false; - object[".gogoproto.gostringAll"] = false; - object[".gogoproto.populateAll"] = false; - object[".gogoproto.stringerAll"] = false; - object[".gogoproto.onlyoneAll"] = false; - object[".gogoproto.equalAll"] = false; - object[".gogoproto.descriptionAll"] = false; - object[".gogoproto.testgenAll"] = false; - object[".gogoproto.benchgenAll"] = false; - object[".gogoproto.marshalerAll"] = false; - object[".gogoproto.unmarshalerAll"] = false; - object[".gogoproto.stableMarshalerAll"] = false; - object[".gogoproto.sizerAll"] = false; - object[".gogoproto.goprotoEnumStringerAll"] = false; - object[".gogoproto.enumStringerAll"] = false; - object[".gogoproto.unsafeMarshalerAll"] = false; - object[".gogoproto.unsafeUnmarshalerAll"] = false; - object[".gogoproto.goprotoExtensionsMapAll"] = false; - object[".gogoproto.goprotoUnrecognizedAll"] = false; - object[".gogoproto.gogoprotoImport"] = false; - object[".gogoproto.protosizerAll"] = false; - object[".gogoproto.compareAll"] = false; - object[".gogoproto.typedeclAll"] = false; - object[".gogoproto.enumdeclAll"] = false; - object[".gogoproto.goprotoRegistration"] = false; - object[".gogoproto.messagenameAll"] = false; - object[".gogoproto.goprotoSizecacheAll"] = false; - object[".gogoproto.goprotoUnkeyedAll"] = false; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".gogoproto.goprotoGettersAll"] != null && message.hasOwnProperty(".gogoproto.goprotoGettersAll")) - object[".gogoproto.goprotoGettersAll"] = message[".gogoproto.goprotoGettersAll"]; - if (message[".gogoproto.goprotoEnumPrefixAll"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumPrefixAll")) - object[".gogoproto.goprotoEnumPrefixAll"] = message[".gogoproto.goprotoEnumPrefixAll"]; - if (message[".gogoproto.goprotoStringerAll"] != null && message.hasOwnProperty(".gogoproto.goprotoStringerAll")) - object[".gogoproto.goprotoStringerAll"] = message[".gogoproto.goprotoStringerAll"]; - if (message[".gogoproto.verboseEqualAll"] != null && message.hasOwnProperty(".gogoproto.verboseEqualAll")) - object[".gogoproto.verboseEqualAll"] = message[".gogoproto.verboseEqualAll"]; - if (message[".gogoproto.faceAll"] != null && message.hasOwnProperty(".gogoproto.faceAll")) - object[".gogoproto.faceAll"] = message[".gogoproto.faceAll"]; - if (message[".gogoproto.gostringAll"] != null && message.hasOwnProperty(".gogoproto.gostringAll")) - object[".gogoproto.gostringAll"] = message[".gogoproto.gostringAll"]; - if (message[".gogoproto.populateAll"] != null && message.hasOwnProperty(".gogoproto.populateAll")) - object[".gogoproto.populateAll"] = message[".gogoproto.populateAll"]; - if (message[".gogoproto.stringerAll"] != null && message.hasOwnProperty(".gogoproto.stringerAll")) - object[".gogoproto.stringerAll"] = message[".gogoproto.stringerAll"]; - if (message[".gogoproto.onlyoneAll"] != null && message.hasOwnProperty(".gogoproto.onlyoneAll")) - object[".gogoproto.onlyoneAll"] = message[".gogoproto.onlyoneAll"]; - if (message[".gogoproto.equalAll"] != null && message.hasOwnProperty(".gogoproto.equalAll")) - object[".gogoproto.equalAll"] = message[".gogoproto.equalAll"]; - if (message[".gogoproto.descriptionAll"] != null && message.hasOwnProperty(".gogoproto.descriptionAll")) - object[".gogoproto.descriptionAll"] = message[".gogoproto.descriptionAll"]; - if (message[".gogoproto.testgenAll"] != null && message.hasOwnProperty(".gogoproto.testgenAll")) - object[".gogoproto.testgenAll"] = message[".gogoproto.testgenAll"]; - if (message[".gogoproto.benchgenAll"] != null && message.hasOwnProperty(".gogoproto.benchgenAll")) - object[".gogoproto.benchgenAll"] = message[".gogoproto.benchgenAll"]; - if (message[".gogoproto.marshalerAll"] != null && message.hasOwnProperty(".gogoproto.marshalerAll")) - object[".gogoproto.marshalerAll"] = message[".gogoproto.marshalerAll"]; - if (message[".gogoproto.unmarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unmarshalerAll")) - object[".gogoproto.unmarshalerAll"] = message[".gogoproto.unmarshalerAll"]; - if (message[".gogoproto.stableMarshalerAll"] != null && message.hasOwnProperty(".gogoproto.stableMarshalerAll")) - object[".gogoproto.stableMarshalerAll"] = message[".gogoproto.stableMarshalerAll"]; - if (message[".gogoproto.sizerAll"] != null && message.hasOwnProperty(".gogoproto.sizerAll")) - object[".gogoproto.sizerAll"] = message[".gogoproto.sizerAll"]; - if (message[".gogoproto.goprotoEnumStringerAll"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumStringerAll")) - object[".gogoproto.goprotoEnumStringerAll"] = message[".gogoproto.goprotoEnumStringerAll"]; - if (message[".gogoproto.enumStringerAll"] != null && message.hasOwnProperty(".gogoproto.enumStringerAll")) - object[".gogoproto.enumStringerAll"] = message[".gogoproto.enumStringerAll"]; - if (message[".gogoproto.unsafeMarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unsafeMarshalerAll")) - object[".gogoproto.unsafeMarshalerAll"] = message[".gogoproto.unsafeMarshalerAll"]; - if (message[".gogoproto.unsafeUnmarshalerAll"] != null && message.hasOwnProperty(".gogoproto.unsafeUnmarshalerAll")) - object[".gogoproto.unsafeUnmarshalerAll"] = message[".gogoproto.unsafeUnmarshalerAll"]; - if (message[".gogoproto.goprotoExtensionsMapAll"] != null && message.hasOwnProperty(".gogoproto.goprotoExtensionsMapAll")) - object[".gogoproto.goprotoExtensionsMapAll"] = message[".gogoproto.goprotoExtensionsMapAll"]; - if (message[".gogoproto.goprotoUnrecognizedAll"] != null && message.hasOwnProperty(".gogoproto.goprotoUnrecognizedAll")) - object[".gogoproto.goprotoUnrecognizedAll"] = message[".gogoproto.goprotoUnrecognizedAll"]; - if (message[".gogoproto.gogoprotoImport"] != null && message.hasOwnProperty(".gogoproto.gogoprotoImport")) - object[".gogoproto.gogoprotoImport"] = message[".gogoproto.gogoprotoImport"]; - if (message[".gogoproto.protosizerAll"] != null && message.hasOwnProperty(".gogoproto.protosizerAll")) - object[".gogoproto.protosizerAll"] = message[".gogoproto.protosizerAll"]; - if (message[".gogoproto.compareAll"] != null && message.hasOwnProperty(".gogoproto.compareAll")) - object[".gogoproto.compareAll"] = message[".gogoproto.compareAll"]; - if (message[".gogoproto.typedeclAll"] != null && message.hasOwnProperty(".gogoproto.typedeclAll")) - object[".gogoproto.typedeclAll"] = message[".gogoproto.typedeclAll"]; - if (message[".gogoproto.enumdeclAll"] != null && message.hasOwnProperty(".gogoproto.enumdeclAll")) - object[".gogoproto.enumdeclAll"] = message[".gogoproto.enumdeclAll"]; - if (message[".gogoproto.goprotoRegistration"] != null && message.hasOwnProperty(".gogoproto.goprotoRegistration")) - object[".gogoproto.goprotoRegistration"] = message[".gogoproto.goprotoRegistration"]; - if (message[".gogoproto.messagenameAll"] != null && message.hasOwnProperty(".gogoproto.messagenameAll")) - object[".gogoproto.messagenameAll"] = message[".gogoproto.messagenameAll"]; - if (message[".gogoproto.goprotoSizecacheAll"] != null && message.hasOwnProperty(".gogoproto.goprotoSizecacheAll")) - object[".gogoproto.goprotoSizecacheAll"] = message[".gogoproto.goprotoSizecacheAll"]; - if (message[".gogoproto.goprotoUnkeyedAll"] != null && message.hasOwnProperty(".gogoproto.goprotoUnkeyedAll")) - object[".gogoproto.goprotoUnkeyedAll"] = message[".gogoproto.goprotoUnkeyedAll"]; - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - return FileOptions; })(); @@ -53073,39 +24046,6 @@ $root.google = (function() { * Properties of a MessageOptions. * @memberof google.protobuf * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {string|null} [".cosmos_proto.interfaceType"] MessageOptions .cosmos_proto.interfaceType - * @property {string|null} [".cosmos_proto.implementsInterface"] MessageOptions .cosmos_proto.implementsInterface - * @property {boolean|null} [".gogoproto.goprotoGetters"] MessageOptions .gogoproto.goprotoGetters - * @property {boolean|null} [".gogoproto.goprotoStringer"] MessageOptions .gogoproto.goprotoStringer - * @property {boolean|null} [".gogoproto.verboseEqual"] MessageOptions .gogoproto.verboseEqual - * @property {boolean|null} [".gogoproto.face"] MessageOptions .gogoproto.face - * @property {boolean|null} [".gogoproto.gostring"] MessageOptions .gogoproto.gostring - * @property {boolean|null} [".gogoproto.populate"] MessageOptions .gogoproto.populate - * @property {boolean|null} [".gogoproto.stringer"] MessageOptions .gogoproto.stringer - * @property {boolean|null} [".gogoproto.onlyone"] MessageOptions .gogoproto.onlyone - * @property {boolean|null} [".gogoproto.equal"] MessageOptions .gogoproto.equal - * @property {boolean|null} [".gogoproto.description"] MessageOptions .gogoproto.description - * @property {boolean|null} [".gogoproto.testgen"] MessageOptions .gogoproto.testgen - * @property {boolean|null} [".gogoproto.benchgen"] MessageOptions .gogoproto.benchgen - * @property {boolean|null} [".gogoproto.marshaler"] MessageOptions .gogoproto.marshaler - * @property {boolean|null} [".gogoproto.unmarshaler"] MessageOptions .gogoproto.unmarshaler - * @property {boolean|null} [".gogoproto.stableMarshaler"] MessageOptions .gogoproto.stableMarshaler - * @property {boolean|null} [".gogoproto.sizer"] MessageOptions .gogoproto.sizer - * @property {boolean|null} [".gogoproto.unsafeMarshaler"] MessageOptions .gogoproto.unsafeMarshaler - * @property {boolean|null} [".gogoproto.unsafeUnmarshaler"] MessageOptions .gogoproto.unsafeUnmarshaler - * @property {boolean|null} [".gogoproto.goprotoExtensionsMap"] MessageOptions .gogoproto.goprotoExtensionsMap - * @property {boolean|null} [".gogoproto.goprotoUnrecognized"] MessageOptions .gogoproto.goprotoUnrecognized - * @property {boolean|null} [".gogoproto.protosizer"] MessageOptions .gogoproto.protosizer - * @property {boolean|null} [".gogoproto.compare"] MessageOptions .gogoproto.compare - * @property {boolean|null} [".gogoproto.typedecl"] MessageOptions .gogoproto.typedecl - * @property {boolean|null} [".gogoproto.messagename"] MessageOptions .gogoproto.messagename - * @property {boolean|null} [".gogoproto.goprotoSizecache"] MessageOptions .gogoproto.goprotoSizecache - * @property {boolean|null} [".gogoproto.goprotoUnkeyed"] MessageOptions .gogoproto.goprotoUnkeyed */ /** @@ -53114,280 +24054,15 @@ $root.google = (function() { * @classdesc Represents a MessageOptions. * @implements IMessageOptions * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.IMessageOptions=} [p] Properties to set */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function MessageOptions(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]]; } - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .cosmos_proto.interfaceType. - * @member {string} .cosmos_proto.interfaceType - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".cosmos_proto.interfaceType"] = ""; - - /** - * MessageOptions .cosmos_proto.implementsInterface. - * @member {string} .cosmos_proto.implementsInterface - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".cosmos_proto.implementsInterface"] = ""; - - /** - * MessageOptions .gogoproto.goprotoGetters. - * @member {boolean} .gogoproto.goprotoGetters - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goprotoGetters"] = false; - - /** - * MessageOptions .gogoproto.goprotoStringer. - * @member {boolean} .gogoproto.goprotoStringer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goprotoStringer"] = false; - - /** - * MessageOptions .gogoproto.verboseEqual. - * @member {boolean} .gogoproto.verboseEqual - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.verboseEqual"] = false; - - /** - * MessageOptions .gogoproto.face. - * @member {boolean} .gogoproto.face - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.face"] = false; - - /** - * MessageOptions .gogoproto.gostring. - * @member {boolean} .gogoproto.gostring - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.gostring"] = false; - - /** - * MessageOptions .gogoproto.populate. - * @member {boolean} .gogoproto.populate - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.populate"] = false; - - /** - * MessageOptions .gogoproto.stringer. - * @member {boolean} .gogoproto.stringer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.stringer"] = false; - - /** - * MessageOptions .gogoproto.onlyone. - * @member {boolean} .gogoproto.onlyone - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.onlyone"] = false; - - /** - * MessageOptions .gogoproto.equal. - * @member {boolean} .gogoproto.equal - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.equal"] = false; - - /** - * MessageOptions .gogoproto.description. - * @member {boolean} .gogoproto.description - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.description"] = false; - - /** - * MessageOptions .gogoproto.testgen. - * @member {boolean} .gogoproto.testgen - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.testgen"] = false; - - /** - * MessageOptions .gogoproto.benchgen. - * @member {boolean} .gogoproto.benchgen - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.benchgen"] = false; - - /** - * MessageOptions .gogoproto.marshaler. - * @member {boolean} .gogoproto.marshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.marshaler"] = false; - - /** - * MessageOptions .gogoproto.unmarshaler. - * @member {boolean} .gogoproto.unmarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unmarshaler"] = false; - - /** - * MessageOptions .gogoproto.stableMarshaler. - * @member {boolean} .gogoproto.stableMarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.stableMarshaler"] = false; - - /** - * MessageOptions .gogoproto.sizer. - * @member {boolean} .gogoproto.sizer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.sizer"] = false; - - /** - * MessageOptions .gogoproto.unsafeMarshaler. - * @member {boolean} .gogoproto.unsafeMarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafeMarshaler"] = false; - - /** - * MessageOptions .gogoproto.unsafeUnmarshaler. - * @member {boolean} .gogoproto.unsafeUnmarshaler - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.unsafeUnmarshaler"] = false; - - /** - * MessageOptions .gogoproto.goprotoExtensionsMap. - * @member {boolean} .gogoproto.goprotoExtensionsMap - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goprotoExtensionsMap"] = false; - - /** - * MessageOptions .gogoproto.goprotoUnrecognized. - * @member {boolean} .gogoproto.goprotoUnrecognized - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goprotoUnrecognized"] = false; - - /** - * MessageOptions .gogoproto.protosizer. - * @member {boolean} .gogoproto.protosizer - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.protosizer"] = false; - - /** - * MessageOptions .gogoproto.compare. - * @member {boolean} .gogoproto.compare - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.compare"] = false; - - /** - * MessageOptions .gogoproto.typedecl. - * @member {boolean} .gogoproto.typedecl - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.typedecl"] = false; - - /** - * MessageOptions .gogoproto.messagename. - * @member {boolean} .gogoproto.messagename - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.messagename"] = false; - - /** - * MessageOptions .gogoproto.goprotoSizecache. - * @member {boolean} .gogoproto.goprotoSizecache - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goprotoSizecache"] = false; - - /** - * MessageOptions .gogoproto.goprotoUnkeyed. - * @member {boolean} .gogoproto.goprotoUnkeyed - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".gogoproto.goprotoUnkeyed"] = false; - /** * Creates a new MessageOptions instance using the specified properties. * @function create @@ -53405,94 +24080,14 @@ $root.google = (function() { * @function encode * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {google.protobuf.IMessageOptions} m MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goprotoGetters"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoGetters")) - writer.uint32(/* id 64001, wireType 0 =*/512008).bool(message[".gogoproto.goprotoGetters"]); - if (message[".gogoproto.goprotoStringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoStringer")) - writer.uint32(/* id 64003, wireType 0 =*/512024).bool(message[".gogoproto.goprotoStringer"]); - if (message[".gogoproto.verboseEqual"] != null && Object.hasOwnProperty.call(message, ".gogoproto.verboseEqual")) - writer.uint32(/* id 64004, wireType 0 =*/512032).bool(message[".gogoproto.verboseEqual"]); - if (message[".gogoproto.face"] != null && Object.hasOwnProperty.call(message, ".gogoproto.face")) - writer.uint32(/* id 64005, wireType 0 =*/512040).bool(message[".gogoproto.face"]); - if (message[".gogoproto.gostring"] != null && Object.hasOwnProperty.call(message, ".gogoproto.gostring")) - writer.uint32(/* id 64006, wireType 0 =*/512048).bool(message[".gogoproto.gostring"]); - if (message[".gogoproto.populate"] != null && Object.hasOwnProperty.call(message, ".gogoproto.populate")) - writer.uint32(/* id 64007, wireType 0 =*/512056).bool(message[".gogoproto.populate"]); - if (message[".gogoproto.onlyone"] != null && Object.hasOwnProperty.call(message, ".gogoproto.onlyone")) - writer.uint32(/* id 64009, wireType 0 =*/512072).bool(message[".gogoproto.onlyone"]); - if (message[".gogoproto.equal"] != null && Object.hasOwnProperty.call(message, ".gogoproto.equal")) - writer.uint32(/* id 64013, wireType 0 =*/512104).bool(message[".gogoproto.equal"]); - if (message[".gogoproto.description"] != null && Object.hasOwnProperty.call(message, ".gogoproto.description")) - writer.uint32(/* id 64014, wireType 0 =*/512112).bool(message[".gogoproto.description"]); - if (message[".gogoproto.testgen"] != null && Object.hasOwnProperty.call(message, ".gogoproto.testgen")) - writer.uint32(/* id 64015, wireType 0 =*/512120).bool(message[".gogoproto.testgen"]); - if (message[".gogoproto.benchgen"] != null && Object.hasOwnProperty.call(message, ".gogoproto.benchgen")) - writer.uint32(/* id 64016, wireType 0 =*/512128).bool(message[".gogoproto.benchgen"]); - if (message[".gogoproto.marshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.marshaler")) - writer.uint32(/* id 64017, wireType 0 =*/512136).bool(message[".gogoproto.marshaler"]); - if (message[".gogoproto.unmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unmarshaler")) - writer.uint32(/* id 64018, wireType 0 =*/512144).bool(message[".gogoproto.unmarshaler"]); - if (message[".gogoproto.stableMarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stableMarshaler")) - writer.uint32(/* id 64019, wireType 0 =*/512152).bool(message[".gogoproto.stableMarshaler"]); - if (message[".gogoproto.sizer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.sizer")) - writer.uint32(/* id 64020, wireType 0 =*/512160).bool(message[".gogoproto.sizer"]); - if (message[".gogoproto.unsafeMarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafeMarshaler")) - writer.uint32(/* id 64023, wireType 0 =*/512184).bool(message[".gogoproto.unsafeMarshaler"]); - if (message[".gogoproto.unsafeUnmarshaler"] != null && Object.hasOwnProperty.call(message, ".gogoproto.unsafeUnmarshaler")) - writer.uint32(/* id 64024, wireType 0 =*/512192).bool(message[".gogoproto.unsafeUnmarshaler"]); - if (message[".gogoproto.goprotoExtensionsMap"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoExtensionsMap")) - writer.uint32(/* id 64025, wireType 0 =*/512200).bool(message[".gogoproto.goprotoExtensionsMap"]); - if (message[".gogoproto.goprotoUnrecognized"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoUnrecognized")) - writer.uint32(/* id 64026, wireType 0 =*/512208).bool(message[".gogoproto.goprotoUnrecognized"]); - if (message[".gogoproto.protosizer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.protosizer")) - writer.uint32(/* id 64028, wireType 0 =*/512224).bool(message[".gogoproto.protosizer"]); - if (message[".gogoproto.compare"] != null && Object.hasOwnProperty.call(message, ".gogoproto.compare")) - writer.uint32(/* id 64029, wireType 0 =*/512232).bool(message[".gogoproto.compare"]); - if (message[".gogoproto.typedecl"] != null && Object.hasOwnProperty.call(message, ".gogoproto.typedecl")) - writer.uint32(/* id 64030, wireType 0 =*/512240).bool(message[".gogoproto.typedecl"]); - if (message[".gogoproto.messagename"] != null && Object.hasOwnProperty.call(message, ".gogoproto.messagename")) - writer.uint32(/* id 64033, wireType 0 =*/512264).bool(message[".gogoproto.messagename"]); - if (message[".gogoproto.goprotoSizecache"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoSizecache")) - writer.uint32(/* id 64034, wireType 0 =*/512272).bool(message[".gogoproto.goprotoSizecache"]); - if (message[".gogoproto.goprotoUnkeyed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoUnkeyed")) - writer.uint32(/* id 64035, wireType 0 =*/512280).bool(message[".gogoproto.goprotoUnkeyed"]); - if (message[".gogoproto.stringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stringer")) - writer.uint32(/* id 67008, wireType 0 =*/536064).bool(message[".gogoproto.stringer"]); - if (message[".cosmos_proto.interfaceType"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.interfaceType")) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.interfaceType"]); - if (message[".cosmos_proto.implementsInterface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.implementsInterface")) - writer.uint32(/* id 93002, wireType 2 =*/744018).string(message[".cosmos_proto.implementsInterface"]); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + MessageOptions.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + return w; }; /** @@ -53500,482 +24095,25 @@ $root.google = (function() { * @function decode * @memberof google.protobuf.MessageOptions * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {google.protobuf.MessageOptions} MessageOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MessageOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.messageSetWireFormat = reader.bool(); - break; - case 2: - message.noStandardDescriptorAccessor = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 7: - message.mapEntry = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 93001: - message[".cosmos_proto.interfaceType"] = reader.string(); - break; - case 93002: - message[".cosmos_proto.implementsInterface"] = reader.string(); - break; - case 64001: - message[".gogoproto.goprotoGetters"] = reader.bool(); - break; - case 64003: - message[".gogoproto.goprotoStringer"] = reader.bool(); - break; - case 64004: - message[".gogoproto.verboseEqual"] = reader.bool(); - break; - case 64005: - message[".gogoproto.face"] = reader.bool(); - break; - case 64006: - message[".gogoproto.gostring"] = reader.bool(); - break; - case 64007: - message[".gogoproto.populate"] = reader.bool(); - break; - case 67008: - message[".gogoproto.stringer"] = reader.bool(); - break; - case 64009: - message[".gogoproto.onlyone"] = reader.bool(); - break; - case 64013: - message[".gogoproto.equal"] = reader.bool(); - break; - case 64014: - message[".gogoproto.description"] = reader.bool(); - break; - case 64015: - message[".gogoproto.testgen"] = reader.bool(); - break; - case 64016: - message[".gogoproto.benchgen"] = reader.bool(); - break; - case 64017: - message[".gogoproto.marshaler"] = reader.bool(); - break; - case 64018: - message[".gogoproto.unmarshaler"] = reader.bool(); - break; - case 64019: - message[".gogoproto.stableMarshaler"] = reader.bool(); - break; - case 64020: - message[".gogoproto.sizer"] = reader.bool(); - break; - case 64023: - message[".gogoproto.unsafeMarshaler"] = reader.bool(); - break; - case 64024: - message[".gogoproto.unsafeUnmarshaler"] = reader.bool(); - break; - case 64025: - message[".gogoproto.goprotoExtensionsMap"] = reader.bool(); - break; - case 64026: - message[".gogoproto.goprotoUnrecognized"] = reader.bool(); - break; - case 64028: - message[".gogoproto.protosizer"] = reader.bool(); - break; - case 64029: - message[".gogoproto.compare"] = reader.bool(); - break; - case 64030: - message[".gogoproto.typedecl"] = reader.bool(); - break; - case 64033: - message[".gogoproto.messagename"] = reader.bool(); - break; - case 64034: - message[".gogoproto.goprotoSizecache"] = reader.bool(); - break; - case 64035: - message[".gogoproto.goprotoUnkeyed"] = reader.bool(); - break; + MessageOptions.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.MessageOptions(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".cosmos_proto.interfaceType"] != null && message.hasOwnProperty(".cosmos_proto.interfaceType")) - if (!$util.isString(message[".cosmos_proto.interfaceType"])) - return ".cosmos_proto.interfaceType: string expected"; - if (message[".cosmos_proto.implementsInterface"] != null && message.hasOwnProperty(".cosmos_proto.implementsInterface")) - if (!$util.isString(message[".cosmos_proto.implementsInterface"])) - return ".cosmos_proto.implementsInterface: string expected"; - if (message[".gogoproto.goprotoGetters"] != null && message.hasOwnProperty(".gogoproto.goprotoGetters")) - if (typeof message[".gogoproto.goprotoGetters"] !== "boolean") - return ".gogoproto.goprotoGetters: boolean expected"; - if (message[".gogoproto.goprotoStringer"] != null && message.hasOwnProperty(".gogoproto.goprotoStringer")) - if (typeof message[".gogoproto.goprotoStringer"] !== "boolean") - return ".gogoproto.goprotoStringer: boolean expected"; - if (message[".gogoproto.verboseEqual"] != null && message.hasOwnProperty(".gogoproto.verboseEqual")) - if (typeof message[".gogoproto.verboseEqual"] !== "boolean") - return ".gogoproto.verboseEqual: boolean expected"; - if (message[".gogoproto.face"] != null && message.hasOwnProperty(".gogoproto.face")) - if (typeof message[".gogoproto.face"] !== "boolean") - return ".gogoproto.face: boolean expected"; - if (message[".gogoproto.gostring"] != null && message.hasOwnProperty(".gogoproto.gostring")) - if (typeof message[".gogoproto.gostring"] !== "boolean") - return ".gogoproto.gostring: boolean expected"; - if (message[".gogoproto.populate"] != null && message.hasOwnProperty(".gogoproto.populate")) - if (typeof message[".gogoproto.populate"] !== "boolean") - return ".gogoproto.populate: boolean expected"; - if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) - if (typeof message[".gogoproto.stringer"] !== "boolean") - return ".gogoproto.stringer: boolean expected"; - if (message[".gogoproto.onlyone"] != null && message.hasOwnProperty(".gogoproto.onlyone")) - if (typeof message[".gogoproto.onlyone"] !== "boolean") - return ".gogoproto.onlyone: boolean expected"; - if (message[".gogoproto.equal"] != null && message.hasOwnProperty(".gogoproto.equal")) - if (typeof message[".gogoproto.equal"] !== "boolean") - return ".gogoproto.equal: boolean expected"; - if (message[".gogoproto.description"] != null && message.hasOwnProperty(".gogoproto.description")) - if (typeof message[".gogoproto.description"] !== "boolean") - return ".gogoproto.description: boolean expected"; - if (message[".gogoproto.testgen"] != null && message.hasOwnProperty(".gogoproto.testgen")) - if (typeof message[".gogoproto.testgen"] !== "boolean") - return ".gogoproto.testgen: boolean expected"; - if (message[".gogoproto.benchgen"] != null && message.hasOwnProperty(".gogoproto.benchgen")) - if (typeof message[".gogoproto.benchgen"] !== "boolean") - return ".gogoproto.benchgen: boolean expected"; - if (message[".gogoproto.marshaler"] != null && message.hasOwnProperty(".gogoproto.marshaler")) - if (typeof message[".gogoproto.marshaler"] !== "boolean") - return ".gogoproto.marshaler: boolean expected"; - if (message[".gogoproto.unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unmarshaler")) - if (typeof message[".gogoproto.unmarshaler"] !== "boolean") - return ".gogoproto.unmarshaler: boolean expected"; - if (message[".gogoproto.stableMarshaler"] != null && message.hasOwnProperty(".gogoproto.stableMarshaler")) - if (typeof message[".gogoproto.stableMarshaler"] !== "boolean") - return ".gogoproto.stableMarshaler: boolean expected"; - if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) - if (typeof message[".gogoproto.sizer"] !== "boolean") - return ".gogoproto.sizer: boolean expected"; - if (message[".gogoproto.unsafeMarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafeMarshaler")) - if (typeof message[".gogoproto.unsafeMarshaler"] !== "boolean") - return ".gogoproto.unsafeMarshaler: boolean expected"; - if (message[".gogoproto.unsafeUnmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafeUnmarshaler")) - if (typeof message[".gogoproto.unsafeUnmarshaler"] !== "boolean") - return ".gogoproto.unsafeUnmarshaler: boolean expected"; - if (message[".gogoproto.goprotoExtensionsMap"] != null && message.hasOwnProperty(".gogoproto.goprotoExtensionsMap")) - if (typeof message[".gogoproto.goprotoExtensionsMap"] !== "boolean") - return ".gogoproto.goprotoExtensionsMap: boolean expected"; - if (message[".gogoproto.goprotoUnrecognized"] != null && message.hasOwnProperty(".gogoproto.goprotoUnrecognized")) - if (typeof message[".gogoproto.goprotoUnrecognized"] !== "boolean") - return ".gogoproto.goprotoUnrecognized: boolean expected"; - if (message[".gogoproto.protosizer"] != null && message.hasOwnProperty(".gogoproto.protosizer")) - if (typeof message[".gogoproto.protosizer"] !== "boolean") - return ".gogoproto.protosizer: boolean expected"; - if (message[".gogoproto.compare"] != null && message.hasOwnProperty(".gogoproto.compare")) - if (typeof message[".gogoproto.compare"] !== "boolean") - return ".gogoproto.compare: boolean expected"; - if (message[".gogoproto.typedecl"] != null && message.hasOwnProperty(".gogoproto.typedecl")) - if (typeof message[".gogoproto.typedecl"] !== "boolean") - return ".gogoproto.typedecl: boolean expected"; - if (message[".gogoproto.messagename"] != null && message.hasOwnProperty(".gogoproto.messagename")) - if (typeof message[".gogoproto.messagename"] !== "boolean") - return ".gogoproto.messagename: boolean expected"; - if (message[".gogoproto.goprotoSizecache"] != null && message.hasOwnProperty(".gogoproto.goprotoSizecache")) - if (typeof message[".gogoproto.goprotoSizecache"] !== "boolean") - return ".gogoproto.goprotoSizecache: boolean expected"; - if (message[".gogoproto.goprotoUnkeyed"] != null && message.hasOwnProperty(".gogoproto.goprotoUnkeyed")) - if (typeof message[".gogoproto.goprotoUnkeyed"] !== "boolean") - return ".gogoproto.goprotoUnkeyed: boolean expected"; - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".cosmos_proto.interfaceType"] != null) - message[".cosmos_proto.interfaceType"] = String(object[".cosmos_proto.interfaceType"]); - if (object[".cosmos_proto.implementsInterface"] != null) - message[".cosmos_proto.implementsInterface"] = String(object[".cosmos_proto.implementsInterface"]); - if (object[".gogoproto.goprotoGetters"] != null) - message[".gogoproto.goprotoGetters"] = Boolean(object[".gogoproto.goprotoGetters"]); - if (object[".gogoproto.goprotoStringer"] != null) - message[".gogoproto.goprotoStringer"] = Boolean(object[".gogoproto.goprotoStringer"]); - if (object[".gogoproto.verboseEqual"] != null) - message[".gogoproto.verboseEqual"] = Boolean(object[".gogoproto.verboseEqual"]); - if (object[".gogoproto.face"] != null) - message[".gogoproto.face"] = Boolean(object[".gogoproto.face"]); - if (object[".gogoproto.gostring"] != null) - message[".gogoproto.gostring"] = Boolean(object[".gogoproto.gostring"]); - if (object[".gogoproto.populate"] != null) - message[".gogoproto.populate"] = Boolean(object[".gogoproto.populate"]); - if (object[".gogoproto.stringer"] != null) - message[".gogoproto.stringer"] = Boolean(object[".gogoproto.stringer"]); - if (object[".gogoproto.onlyone"] != null) - message[".gogoproto.onlyone"] = Boolean(object[".gogoproto.onlyone"]); - if (object[".gogoproto.equal"] != null) - message[".gogoproto.equal"] = Boolean(object[".gogoproto.equal"]); - if (object[".gogoproto.description"] != null) - message[".gogoproto.description"] = Boolean(object[".gogoproto.description"]); - if (object[".gogoproto.testgen"] != null) - message[".gogoproto.testgen"] = Boolean(object[".gogoproto.testgen"]); - if (object[".gogoproto.benchgen"] != null) - message[".gogoproto.benchgen"] = Boolean(object[".gogoproto.benchgen"]); - if (object[".gogoproto.marshaler"] != null) - message[".gogoproto.marshaler"] = Boolean(object[".gogoproto.marshaler"]); - if (object[".gogoproto.unmarshaler"] != null) - message[".gogoproto.unmarshaler"] = Boolean(object[".gogoproto.unmarshaler"]); - if (object[".gogoproto.stableMarshaler"] != null) - message[".gogoproto.stableMarshaler"] = Boolean(object[".gogoproto.stableMarshaler"]); - if (object[".gogoproto.sizer"] != null) - message[".gogoproto.sizer"] = Boolean(object[".gogoproto.sizer"]); - if (object[".gogoproto.unsafeMarshaler"] != null) - message[".gogoproto.unsafeMarshaler"] = Boolean(object[".gogoproto.unsafeMarshaler"]); - if (object[".gogoproto.unsafeUnmarshaler"] != null) - message[".gogoproto.unsafeUnmarshaler"] = Boolean(object[".gogoproto.unsafeUnmarshaler"]); - if (object[".gogoproto.goprotoExtensionsMap"] != null) - message[".gogoproto.goprotoExtensionsMap"] = Boolean(object[".gogoproto.goprotoExtensionsMap"]); - if (object[".gogoproto.goprotoUnrecognized"] != null) - message[".gogoproto.goprotoUnrecognized"] = Boolean(object[".gogoproto.goprotoUnrecognized"]); - if (object[".gogoproto.protosizer"] != null) - message[".gogoproto.protosizer"] = Boolean(object[".gogoproto.protosizer"]); - if (object[".gogoproto.compare"] != null) - message[".gogoproto.compare"] = Boolean(object[".gogoproto.compare"]); - if (object[".gogoproto.typedecl"] != null) - message[".gogoproto.typedecl"] = Boolean(object[".gogoproto.typedecl"]); - if (object[".gogoproto.messagename"] != null) - message[".gogoproto.messagename"] = Boolean(object[".gogoproto.messagename"]); - if (object[".gogoproto.goprotoSizecache"] != null) - message[".gogoproto.goprotoSizecache"] = Boolean(object[".gogoproto.goprotoSizecache"]); - if (object[".gogoproto.goprotoUnkeyed"] != null) - message[".gogoproto.goprotoUnkeyed"] = Boolean(object[".gogoproto.goprotoUnkeyed"]); - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object[".gogoproto.goprotoGetters"] = false; - object[".gogoproto.goprotoStringer"] = false; - object[".gogoproto.verboseEqual"] = false; - object[".gogoproto.face"] = false; - object[".gogoproto.gostring"] = false; - object[".gogoproto.populate"] = false; - object[".gogoproto.onlyone"] = false; - object[".gogoproto.equal"] = false; - object[".gogoproto.description"] = false; - object[".gogoproto.testgen"] = false; - object[".gogoproto.benchgen"] = false; - object[".gogoproto.marshaler"] = false; - object[".gogoproto.unmarshaler"] = false; - object[".gogoproto.stableMarshaler"] = false; - object[".gogoproto.sizer"] = false; - object[".gogoproto.unsafeMarshaler"] = false; - object[".gogoproto.unsafeUnmarshaler"] = false; - object[".gogoproto.goprotoExtensionsMap"] = false; - object[".gogoproto.goprotoUnrecognized"] = false; - object[".gogoproto.protosizer"] = false; - object[".gogoproto.compare"] = false; - object[".gogoproto.typedecl"] = false; - object[".gogoproto.messagename"] = false; - object[".gogoproto.goprotoSizecache"] = false; - object[".gogoproto.goprotoUnkeyed"] = false; - object[".gogoproto.stringer"] = false; - object[".cosmos_proto.interfaceType"] = ""; - object[".cosmos_proto.implementsInterface"] = ""; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".gogoproto.goprotoGetters"] != null && message.hasOwnProperty(".gogoproto.goprotoGetters")) - object[".gogoproto.goprotoGetters"] = message[".gogoproto.goprotoGetters"]; - if (message[".gogoproto.goprotoStringer"] != null && message.hasOwnProperty(".gogoproto.goprotoStringer")) - object[".gogoproto.goprotoStringer"] = message[".gogoproto.goprotoStringer"]; - if (message[".gogoproto.verboseEqual"] != null && message.hasOwnProperty(".gogoproto.verboseEqual")) - object[".gogoproto.verboseEqual"] = message[".gogoproto.verboseEqual"]; - if (message[".gogoproto.face"] != null && message.hasOwnProperty(".gogoproto.face")) - object[".gogoproto.face"] = message[".gogoproto.face"]; - if (message[".gogoproto.gostring"] != null && message.hasOwnProperty(".gogoproto.gostring")) - object[".gogoproto.gostring"] = message[".gogoproto.gostring"]; - if (message[".gogoproto.populate"] != null && message.hasOwnProperty(".gogoproto.populate")) - object[".gogoproto.populate"] = message[".gogoproto.populate"]; - if (message[".gogoproto.onlyone"] != null && message.hasOwnProperty(".gogoproto.onlyone")) - object[".gogoproto.onlyone"] = message[".gogoproto.onlyone"]; - if (message[".gogoproto.equal"] != null && message.hasOwnProperty(".gogoproto.equal")) - object[".gogoproto.equal"] = message[".gogoproto.equal"]; - if (message[".gogoproto.description"] != null && message.hasOwnProperty(".gogoproto.description")) - object[".gogoproto.description"] = message[".gogoproto.description"]; - if (message[".gogoproto.testgen"] != null && message.hasOwnProperty(".gogoproto.testgen")) - object[".gogoproto.testgen"] = message[".gogoproto.testgen"]; - if (message[".gogoproto.benchgen"] != null && message.hasOwnProperty(".gogoproto.benchgen")) - object[".gogoproto.benchgen"] = message[".gogoproto.benchgen"]; - if (message[".gogoproto.marshaler"] != null && message.hasOwnProperty(".gogoproto.marshaler")) - object[".gogoproto.marshaler"] = message[".gogoproto.marshaler"]; - if (message[".gogoproto.unmarshaler"] != null && message.hasOwnProperty(".gogoproto.unmarshaler")) - object[".gogoproto.unmarshaler"] = message[".gogoproto.unmarshaler"]; - if (message[".gogoproto.stableMarshaler"] != null && message.hasOwnProperty(".gogoproto.stableMarshaler")) - object[".gogoproto.stableMarshaler"] = message[".gogoproto.stableMarshaler"]; - if (message[".gogoproto.sizer"] != null && message.hasOwnProperty(".gogoproto.sizer")) - object[".gogoproto.sizer"] = message[".gogoproto.sizer"]; - if (message[".gogoproto.unsafeMarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafeMarshaler")) - object[".gogoproto.unsafeMarshaler"] = message[".gogoproto.unsafeMarshaler"]; - if (message[".gogoproto.unsafeUnmarshaler"] != null && message.hasOwnProperty(".gogoproto.unsafeUnmarshaler")) - object[".gogoproto.unsafeUnmarshaler"] = message[".gogoproto.unsafeUnmarshaler"]; - if (message[".gogoproto.goprotoExtensionsMap"] != null && message.hasOwnProperty(".gogoproto.goprotoExtensionsMap")) - object[".gogoproto.goprotoExtensionsMap"] = message[".gogoproto.goprotoExtensionsMap"]; - if (message[".gogoproto.goprotoUnrecognized"] != null && message.hasOwnProperty(".gogoproto.goprotoUnrecognized")) - object[".gogoproto.goprotoUnrecognized"] = message[".gogoproto.goprotoUnrecognized"]; - if (message[".gogoproto.protosizer"] != null && message.hasOwnProperty(".gogoproto.protosizer")) - object[".gogoproto.protosizer"] = message[".gogoproto.protosizer"]; - if (message[".gogoproto.compare"] != null && message.hasOwnProperty(".gogoproto.compare")) - object[".gogoproto.compare"] = message[".gogoproto.compare"]; - if (message[".gogoproto.typedecl"] != null && message.hasOwnProperty(".gogoproto.typedecl")) - object[".gogoproto.typedecl"] = message[".gogoproto.typedecl"]; - if (message[".gogoproto.messagename"] != null && message.hasOwnProperty(".gogoproto.messagename")) - object[".gogoproto.messagename"] = message[".gogoproto.messagename"]; - if (message[".gogoproto.goprotoSizecache"] != null && message.hasOwnProperty(".gogoproto.goprotoSizecache")) - object[".gogoproto.goprotoSizecache"] = message[".gogoproto.goprotoSizecache"]; - if (message[".gogoproto.goprotoUnkeyed"] != null && message.hasOwnProperty(".gogoproto.goprotoUnkeyed")) - object[".gogoproto.goprotoUnkeyed"] = message[".gogoproto.goprotoUnkeyed"]; - if (message[".gogoproto.stringer"] != null && message.hasOwnProperty(".gogoproto.stringer")) - object[".gogoproto.stringer"] = message[".gogoproto.stringer"]; - if (message[".cosmos_proto.interfaceType"] != null && message.hasOwnProperty(".cosmos_proto.interfaceType")) - object[".cosmos_proto.interfaceType"] = message[".cosmos_proto.interfaceType"]; - if (message[".cosmos_proto.implementsInterface"] != null && message.hasOwnProperty(".cosmos_proto.implementsInterface")) - object[".cosmos_proto.implementsInterface"] = message[".cosmos_proto.implementsInterface"]; - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return MessageOptions; @@ -53987,27 +24125,6 @@ $root.google = (function() { * Properties of a FieldOptions. * @memberof google.protobuf * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {string|null} [".cosmos_proto.acceptsInterface"] FieldOptions .cosmos_proto.acceptsInterface - * @property {boolean|null} [".gogoproto.nullable"] FieldOptions .gogoproto.nullable - * @property {boolean|null} [".gogoproto.embed"] FieldOptions .gogoproto.embed - * @property {string|null} [".gogoproto.customtype"] FieldOptions .gogoproto.customtype - * @property {string|null} [".gogoproto.customname"] FieldOptions .gogoproto.customname - * @property {string|null} [".gogoproto.jsontag"] FieldOptions .gogoproto.jsontag - * @property {string|null} [".gogoproto.moretags"] FieldOptions .gogoproto.moretags - * @property {string|null} [".gogoproto.casttype"] FieldOptions .gogoproto.casttype - * @property {string|null} [".gogoproto.castkey"] FieldOptions .gogoproto.castkey - * @property {string|null} [".gogoproto.castvalue"] FieldOptions .gogoproto.castvalue - * @property {boolean|null} [".gogoproto.stdtime"] FieldOptions .gogoproto.stdtime - * @property {boolean|null} [".gogoproto.stdduration"] FieldOptions .gogoproto.stdduration - * @property {boolean|null} [".gogoproto.wktpointer"] FieldOptions .gogoproto.wktpointer - * @property {string|null} [".gogoproto.castrepeated"] FieldOptions .gogoproto.castrepeated */ /** @@ -54016,184 +24133,15 @@ $root.google = (function() { * @classdesc Represents a FieldOptions. * @implements IFieldOptions * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [p] Properties to set */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function FieldOptions(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]]; } - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .cosmos_proto.acceptsInterface. - * @member {string} .cosmos_proto.acceptsInterface - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".cosmos_proto.acceptsInterface"] = ""; - - /** - * FieldOptions .gogoproto.nullable. - * @member {boolean} .gogoproto.nullable - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.nullable"] = false; - - /** - * FieldOptions .gogoproto.embed. - * @member {boolean} .gogoproto.embed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.embed"] = false; - - /** - * FieldOptions .gogoproto.customtype. - * @member {string} .gogoproto.customtype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.customtype"] = ""; - - /** - * FieldOptions .gogoproto.customname. - * @member {string} .gogoproto.customname - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.customname"] = ""; - - /** - * FieldOptions .gogoproto.jsontag. - * @member {string} .gogoproto.jsontag - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.jsontag"] = ""; - - /** - * FieldOptions .gogoproto.moretags. - * @member {string} .gogoproto.moretags - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.moretags"] = ""; - - /** - * FieldOptions .gogoproto.casttype. - * @member {string} .gogoproto.casttype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.casttype"] = ""; - - /** - * FieldOptions .gogoproto.castkey. - * @member {string} .gogoproto.castkey - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.castkey"] = ""; - - /** - * FieldOptions .gogoproto.castvalue. - * @member {string} .gogoproto.castvalue - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.castvalue"] = ""; - - /** - * FieldOptions .gogoproto.stdtime. - * @member {boolean} .gogoproto.stdtime - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.stdtime"] = false; - - /** - * FieldOptions .gogoproto.stdduration. - * @member {boolean} .gogoproto.stdduration - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.stdduration"] = false; - - /** - * FieldOptions .gogoproto.wktpointer. - * @member {boolean} .gogoproto.wktpointer - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.wktpointer"] = false; - - /** - * FieldOptions .gogoproto.castrepeated. - * @member {string} .gogoproto.castrepeated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".gogoproto.castrepeated"] = ""; - /** * Creates a new FieldOptions instance using the specified properties. * @function create @@ -54211,70 +24159,14 @@ $root.google = (function() { * @function encode * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {google.protobuf.IFieldOptions} m FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.nullable"] != null && Object.hasOwnProperty.call(message, ".gogoproto.nullable")) - writer.uint32(/* id 65001, wireType 0 =*/520008).bool(message[".gogoproto.nullable"]); - if (message[".gogoproto.embed"] != null && Object.hasOwnProperty.call(message, ".gogoproto.embed")) - writer.uint32(/* id 65002, wireType 0 =*/520016).bool(message[".gogoproto.embed"]); - if (message[".gogoproto.customtype"] != null && Object.hasOwnProperty.call(message, ".gogoproto.customtype")) - writer.uint32(/* id 65003, wireType 2 =*/520026).string(message[".gogoproto.customtype"]); - if (message[".gogoproto.customname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.customname")) - writer.uint32(/* id 65004, wireType 2 =*/520034).string(message[".gogoproto.customname"]); - if (message[".gogoproto.jsontag"] != null && Object.hasOwnProperty.call(message, ".gogoproto.jsontag")) - writer.uint32(/* id 65005, wireType 2 =*/520042).string(message[".gogoproto.jsontag"]); - if (message[".gogoproto.moretags"] != null && Object.hasOwnProperty.call(message, ".gogoproto.moretags")) - writer.uint32(/* id 65006, wireType 2 =*/520050).string(message[".gogoproto.moretags"]); - if (message[".gogoproto.casttype"] != null && Object.hasOwnProperty.call(message, ".gogoproto.casttype")) - writer.uint32(/* id 65007, wireType 2 =*/520058).string(message[".gogoproto.casttype"]); - if (message[".gogoproto.castkey"] != null && Object.hasOwnProperty.call(message, ".gogoproto.castkey")) - writer.uint32(/* id 65008, wireType 2 =*/520066).string(message[".gogoproto.castkey"]); - if (message[".gogoproto.castvalue"] != null && Object.hasOwnProperty.call(message, ".gogoproto.castvalue")) - writer.uint32(/* id 65009, wireType 2 =*/520074).string(message[".gogoproto.castvalue"]); - if (message[".gogoproto.stdtime"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stdtime")) - writer.uint32(/* id 65010, wireType 0 =*/520080).bool(message[".gogoproto.stdtime"]); - if (message[".gogoproto.stdduration"] != null && Object.hasOwnProperty.call(message, ".gogoproto.stdduration")) - writer.uint32(/* id 65011, wireType 0 =*/520088).bool(message[".gogoproto.stdduration"]); - if (message[".gogoproto.wktpointer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.wktpointer")) - writer.uint32(/* id 65012, wireType 0 =*/520096).bool(message[".gogoproto.wktpointer"]); - if (message[".gogoproto.castrepeated"] != null && Object.hasOwnProperty.call(message, ".gogoproto.castrepeated")) - writer.uint32(/* id 65013, wireType 2 =*/520106).string(message[".gogoproto.castrepeated"]); - if (message[".cosmos_proto.acceptsInterface"] != null && Object.hasOwnProperty.call(message, ".cosmos_proto.acceptsInterface")) - writer.uint32(/* id 93001, wireType 2 =*/744010).string(message[".cosmos_proto.acceptsInterface"]); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + FieldOptions.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + return w; }; /** @@ -54282,645 +24174,36 @@ $root.google = (function() { * @function decode * @memberof google.protobuf.FieldOptions * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {google.protobuf.FieldOptions} FieldOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FieldOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.ctype = reader.int32(); - break; - case 2: - message.packed = reader.bool(); - break; - case 6: - message.jstype = reader.int32(); - break; - case 5: - message.lazy = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 10: - message.weak = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 93001: - message[".cosmos_proto.acceptsInterface"] = reader.string(); - break; - case 65001: - message[".gogoproto.nullable"] = reader.bool(); - break; - case 65002: - message[".gogoproto.embed"] = reader.bool(); - break; - case 65003: - message[".gogoproto.customtype"] = reader.string(); - break; - case 65004: - message[".gogoproto.customname"] = reader.string(); - break; - case 65005: - message[".gogoproto.jsontag"] = reader.string(); - break; - case 65006: - message[".gogoproto.moretags"] = reader.string(); - break; - case 65007: - message[".gogoproto.casttype"] = reader.string(); - break; - case 65008: - message[".gogoproto.castkey"] = reader.string(); - break; - case 65009: - message[".gogoproto.castvalue"] = reader.string(); - break; - case 65010: - message[".gogoproto.stdtime"] = reader.bool(); - break; - case 65011: - message[".gogoproto.stdduration"] = reader.bool(); - break; - case 65012: - message[".gogoproto.wktpointer"] = reader.bool(); - break; - case 65013: - message[".gogoproto.castrepeated"] = reader.string(); - break; + FieldOptions.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.FieldOptions(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; + return m; }; - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".cosmos_proto.acceptsInterface"] != null && message.hasOwnProperty(".cosmos_proto.acceptsInterface")) - if (!$util.isString(message[".cosmos_proto.acceptsInterface"])) - return ".cosmos_proto.acceptsInterface: string expected"; - if (message[".gogoproto.nullable"] != null && message.hasOwnProperty(".gogoproto.nullable")) - if (typeof message[".gogoproto.nullable"] !== "boolean") - return ".gogoproto.nullable: boolean expected"; - if (message[".gogoproto.embed"] != null && message.hasOwnProperty(".gogoproto.embed")) - if (typeof message[".gogoproto.embed"] !== "boolean") - return ".gogoproto.embed: boolean expected"; - if (message[".gogoproto.customtype"] != null && message.hasOwnProperty(".gogoproto.customtype")) - if (!$util.isString(message[".gogoproto.customtype"])) - return ".gogoproto.customtype: string expected"; - if (message[".gogoproto.customname"] != null && message.hasOwnProperty(".gogoproto.customname")) - if (!$util.isString(message[".gogoproto.customname"])) - return ".gogoproto.customname: string expected"; - if (message[".gogoproto.jsontag"] != null && message.hasOwnProperty(".gogoproto.jsontag")) - if (!$util.isString(message[".gogoproto.jsontag"])) - return ".gogoproto.jsontag: string expected"; - if (message[".gogoproto.moretags"] != null && message.hasOwnProperty(".gogoproto.moretags")) - if (!$util.isString(message[".gogoproto.moretags"])) - return ".gogoproto.moretags: string expected"; - if (message[".gogoproto.casttype"] != null && message.hasOwnProperty(".gogoproto.casttype")) - if (!$util.isString(message[".gogoproto.casttype"])) - return ".gogoproto.casttype: string expected"; - if (message[".gogoproto.castkey"] != null && message.hasOwnProperty(".gogoproto.castkey")) - if (!$util.isString(message[".gogoproto.castkey"])) - return ".gogoproto.castkey: string expected"; - if (message[".gogoproto.castvalue"] != null && message.hasOwnProperty(".gogoproto.castvalue")) - if (!$util.isString(message[".gogoproto.castvalue"])) - return ".gogoproto.castvalue: string expected"; - if (message[".gogoproto.stdtime"] != null && message.hasOwnProperty(".gogoproto.stdtime")) - if (typeof message[".gogoproto.stdtime"] !== "boolean") - return ".gogoproto.stdtime: boolean expected"; - if (message[".gogoproto.stdduration"] != null && message.hasOwnProperty(".gogoproto.stdduration")) - if (typeof message[".gogoproto.stdduration"] !== "boolean") - return ".gogoproto.stdduration: boolean expected"; - if (message[".gogoproto.wktpointer"] != null && message.hasOwnProperty(".gogoproto.wktpointer")) - if (typeof message[".gogoproto.wktpointer"] !== "boolean") - return ".gogoproto.wktpointer: boolean expected"; - if (message[".gogoproto.castrepeated"] != null && message.hasOwnProperty(".gogoproto.castrepeated")) - if (!$util.isString(message[".gogoproto.castrepeated"])) - return ".gogoproto.castrepeated: string expected"; - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".cosmos_proto.acceptsInterface"] != null) - message[".cosmos_proto.acceptsInterface"] = String(object[".cosmos_proto.acceptsInterface"]); - if (object[".gogoproto.nullable"] != null) - message[".gogoproto.nullable"] = Boolean(object[".gogoproto.nullable"]); - if (object[".gogoproto.embed"] != null) - message[".gogoproto.embed"] = Boolean(object[".gogoproto.embed"]); - if (object[".gogoproto.customtype"] != null) - message[".gogoproto.customtype"] = String(object[".gogoproto.customtype"]); - if (object[".gogoproto.customname"] != null) - message[".gogoproto.customname"] = String(object[".gogoproto.customname"]); - if (object[".gogoproto.jsontag"] != null) - message[".gogoproto.jsontag"] = String(object[".gogoproto.jsontag"]); - if (object[".gogoproto.moretags"] != null) - message[".gogoproto.moretags"] = String(object[".gogoproto.moretags"]); - if (object[".gogoproto.casttype"] != null) - message[".gogoproto.casttype"] = String(object[".gogoproto.casttype"]); - if (object[".gogoproto.castkey"] != null) - message[".gogoproto.castkey"] = String(object[".gogoproto.castkey"]); - if (object[".gogoproto.castvalue"] != null) - message[".gogoproto.castvalue"] = String(object[".gogoproto.castvalue"]); - if (object[".gogoproto.stdtime"] != null) - message[".gogoproto.stdtime"] = Boolean(object[".gogoproto.stdtime"]); - if (object[".gogoproto.stdduration"] != null) - message[".gogoproto.stdduration"] = Boolean(object[".gogoproto.stdduration"]); - if (object[".gogoproto.wktpointer"] != null) - message[".gogoproto.wktpointer"] = Boolean(object[".gogoproto.wktpointer"]); - if (object[".gogoproto.castrepeated"] != null) - message[".gogoproto.castrepeated"] = String(object[".gogoproto.castrepeated"]); - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object[".gogoproto.nullable"] = false; - object[".gogoproto.embed"] = false; - object[".gogoproto.customtype"] = ""; - object[".gogoproto.customname"] = ""; - object[".gogoproto.jsontag"] = ""; - object[".gogoproto.moretags"] = ""; - object[".gogoproto.casttype"] = ""; - object[".gogoproto.castkey"] = ""; - object[".gogoproto.castvalue"] = ""; - object[".gogoproto.stdtime"] = false; - object[".gogoproto.stdduration"] = false; - object[".gogoproto.wktpointer"] = false; - object[".gogoproto.castrepeated"] = ""; - object[".cosmos_proto.acceptsInterface"] = ""; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".gogoproto.nullable"] != null && message.hasOwnProperty(".gogoproto.nullable")) - object[".gogoproto.nullable"] = message[".gogoproto.nullable"]; - if (message[".gogoproto.embed"] != null && message.hasOwnProperty(".gogoproto.embed")) - object[".gogoproto.embed"] = message[".gogoproto.embed"]; - if (message[".gogoproto.customtype"] != null && message.hasOwnProperty(".gogoproto.customtype")) - object[".gogoproto.customtype"] = message[".gogoproto.customtype"]; - if (message[".gogoproto.customname"] != null && message.hasOwnProperty(".gogoproto.customname")) - object[".gogoproto.customname"] = message[".gogoproto.customname"]; - if (message[".gogoproto.jsontag"] != null && message.hasOwnProperty(".gogoproto.jsontag")) - object[".gogoproto.jsontag"] = message[".gogoproto.jsontag"]; - if (message[".gogoproto.moretags"] != null && message.hasOwnProperty(".gogoproto.moretags")) - object[".gogoproto.moretags"] = message[".gogoproto.moretags"]; - if (message[".gogoproto.casttype"] != null && message.hasOwnProperty(".gogoproto.casttype")) - object[".gogoproto.casttype"] = message[".gogoproto.casttype"]; - if (message[".gogoproto.castkey"] != null && message.hasOwnProperty(".gogoproto.castkey")) - object[".gogoproto.castkey"] = message[".gogoproto.castkey"]; - if (message[".gogoproto.castvalue"] != null && message.hasOwnProperty(".gogoproto.castvalue")) - object[".gogoproto.castvalue"] = message[".gogoproto.castvalue"]; - if (message[".gogoproto.stdtime"] != null && message.hasOwnProperty(".gogoproto.stdtime")) - object[".gogoproto.stdtime"] = message[".gogoproto.stdtime"]; - if (message[".gogoproto.stdduration"] != null && message.hasOwnProperty(".gogoproto.stdduration")) - object[".gogoproto.stdduration"] = message[".gogoproto.stdduration"]; - if (message[".gogoproto.wktpointer"] != null && message.hasOwnProperty(".gogoproto.wktpointer")) - object[".gogoproto.wktpointer"] = message[".gogoproto.wktpointer"]; - if (message[".gogoproto.castrepeated"] != null && message.hasOwnProperty(".gogoproto.castrepeated")) - object[".gogoproto.castrepeated"] = message[".gogoproto.castrepeated"]; - if (message[".cosmos_proto.acceptsInterface"] != null && message.hasOwnProperty(".cosmos_proto.acceptsInterface")) - object[".cosmos_proto.acceptsInterface"] = message[".cosmos_proto.acceptsInterface"]; - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - return FieldOptions; })(); - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return OneofOptions; - })(); - protobuf.EnumOptions = (function() { /** * Properties of an EnumOptions. * @memberof google.protobuf * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - * @property {boolean|null} [".gogoproto.goprotoEnumPrefix"] EnumOptions .gogoproto.goprotoEnumPrefix - * @property {boolean|null} [".gogoproto.goprotoEnumStringer"] EnumOptions .gogoproto.goprotoEnumStringer - * @property {boolean|null} [".gogoproto.enumStringer"] EnumOptions .gogoproto.enumStringer - * @property {string|null} [".gogoproto.enumCustomname"] EnumOptions .gogoproto.enumCustomname - * @property {boolean|null} [".gogoproto.enumdecl"] EnumOptions .gogoproto.enumdecl */ /** @@ -54929,80 +24212,15 @@ $root.google = (function() { * @classdesc Represents an EnumOptions. * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [p] Properties to set */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function EnumOptions(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]]; } - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * EnumOptions .gogoproto.goprotoEnumPrefix. - * @member {boolean} .gogoproto.goprotoEnumPrefix - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goprotoEnumPrefix"] = false; - - /** - * EnumOptions .gogoproto.goprotoEnumStringer. - * @member {boolean} .gogoproto.goprotoEnumStringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.goprotoEnumStringer"] = false; - - /** - * EnumOptions .gogoproto.enumStringer. - * @member {boolean} .gogoproto.enumStringer - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumStringer"] = false; - - /** - * EnumOptions .gogoproto.enumCustomname. - * @member {string} .gogoproto.enumCustomname - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumCustomname"] = ""; - - /** - * EnumOptions .gogoproto.enumdecl. - * @member {boolean} .gogoproto.enumdecl - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype[".gogoproto.enumdecl"] = false; - /** * Creates a new EnumOptions instance using the specified properties. * @function create @@ -55020,44 +24238,14 @@ $root.google = (function() { * @function encode * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {google.protobuf.IEnumOptions} m EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.goprotoEnumPrefix"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoEnumPrefix")) - writer.uint32(/* id 62001, wireType 0 =*/496008).bool(message[".gogoproto.goprotoEnumPrefix"]); - if (message[".gogoproto.goprotoEnumStringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.goprotoEnumStringer")) - writer.uint32(/* id 62021, wireType 0 =*/496168).bool(message[".gogoproto.goprotoEnumStringer"]); - if (message[".gogoproto.enumStringer"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumStringer")) - writer.uint32(/* id 62022, wireType 0 =*/496176).bool(message[".gogoproto.enumStringer"]); - if (message[".gogoproto.enumCustomname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumCustomname")) - writer.uint32(/* id 62023, wireType 2 =*/496186).string(message[".gogoproto.enumCustomname"]); - if (message[".gogoproto.enumdecl"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumdecl")) - writer.uint32(/* id 62024, wireType 0 =*/496192).bool(message[".gogoproto.enumdecl"]); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumOptions.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + return w; }; /** @@ -55065,207 +24253,25 @@ $root.google = (function() { * @function decode * @memberof google.protobuf.EnumOptions * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {google.protobuf.EnumOptions} EnumOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - message.allowAlias = reader.bool(); - break; - case 3: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 62001: - message[".gogoproto.goprotoEnumPrefix"] = reader.bool(); - break; - case 62021: - message[".gogoproto.goprotoEnumStringer"] = reader.bool(); - break; - case 62022: - message[".gogoproto.enumStringer"] = reader.bool(); - break; - case 62023: - message[".gogoproto.enumCustomname"] = reader.string(); - break; - case 62024: - message[".gogoproto.enumdecl"] = reader.bool(); - break; + EnumOptions.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.EnumOptions(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".gogoproto.goprotoEnumPrefix"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumPrefix")) - if (typeof message[".gogoproto.goprotoEnumPrefix"] !== "boolean") - return ".gogoproto.goprotoEnumPrefix: boolean expected"; - if (message[".gogoproto.goprotoEnumStringer"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumStringer")) - if (typeof message[".gogoproto.goprotoEnumStringer"] !== "boolean") - return ".gogoproto.goprotoEnumStringer: boolean expected"; - if (message[".gogoproto.enumStringer"] != null && message.hasOwnProperty(".gogoproto.enumStringer")) - if (typeof message[".gogoproto.enumStringer"] !== "boolean") - return ".gogoproto.enumStringer: boolean expected"; - if (message[".gogoproto.enumCustomname"] != null && message.hasOwnProperty(".gogoproto.enumCustomname")) - if (!$util.isString(message[".gogoproto.enumCustomname"])) - return ".gogoproto.enumCustomname: string expected"; - if (message[".gogoproto.enumdecl"] != null && message.hasOwnProperty(".gogoproto.enumdecl")) - if (typeof message[".gogoproto.enumdecl"] !== "boolean") - return ".gogoproto.enumdecl: boolean expected"; - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".gogoproto.goprotoEnumPrefix"] != null) - message[".gogoproto.goprotoEnumPrefix"] = Boolean(object[".gogoproto.goprotoEnumPrefix"]); - if (object[".gogoproto.goprotoEnumStringer"] != null) - message[".gogoproto.goprotoEnumStringer"] = Boolean(object[".gogoproto.goprotoEnumStringer"]); - if (object[".gogoproto.enumStringer"] != null) - message[".gogoproto.enumStringer"] = Boolean(object[".gogoproto.enumStringer"]); - if (object[".gogoproto.enumCustomname"] != null) - message[".gogoproto.enumCustomname"] = String(object[".gogoproto.enumCustomname"]); - if (object[".gogoproto.enumdecl"] != null) - message[".gogoproto.enumdecl"] = Boolean(object[".gogoproto.enumdecl"]); - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object[".gogoproto.goprotoEnumPrefix"] = false; - object[".gogoproto.goprotoEnumStringer"] = false; - object[".gogoproto.enumStringer"] = false; - object[".gogoproto.enumCustomname"] = ""; - object[".gogoproto.enumdecl"] = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".gogoproto.goprotoEnumPrefix"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumPrefix")) - object[".gogoproto.goprotoEnumPrefix"] = message[".gogoproto.goprotoEnumPrefix"]; - if (message[".gogoproto.goprotoEnumStringer"] != null && message.hasOwnProperty(".gogoproto.goprotoEnumStringer")) - object[".gogoproto.goprotoEnumStringer"] = message[".gogoproto.goprotoEnumStringer"]; - if (message[".gogoproto.enumStringer"] != null && message.hasOwnProperty(".gogoproto.enumStringer")) - object[".gogoproto.enumStringer"] = message[".gogoproto.enumStringer"]; - if (message[".gogoproto.enumCustomname"] != null && message.hasOwnProperty(".gogoproto.enumCustomname")) - object[".gogoproto.enumCustomname"] = message[".gogoproto.enumCustomname"]; - if (message[".gogoproto.enumdecl"] != null && message.hasOwnProperty(".gogoproto.enumdecl")) - object[".gogoproto.enumdecl"] = message[".gogoproto.enumdecl"]; - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return EnumOptions; @@ -55277,9 +24283,6 @@ $root.google = (function() { * Properties of an EnumValueOptions. * @memberof google.protobuf * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - * @property {string|null} [".gogoproto.enumvalueCustomname"] EnumValueOptions .gogoproto.enumvalueCustomname */ /** @@ -55288,40 +24291,15 @@ $root.google = (function() { * @classdesc Represents an EnumValueOptions. * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [p] Properties to set */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function EnumValueOptions(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]]; } - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * EnumValueOptions .gogoproto.enumvalueCustomname. - * @member {string} .gogoproto.enumvalueCustomname - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype[".gogoproto.enumvalueCustomname"] = ""; - /** * Creates a new EnumValueOptions instance using the specified properties. * @function create @@ -55339,34 +24317,14 @@ $root.google = (function() { * @function encode * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {google.protobuf.IEnumValueOptions} m EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".gogoproto.enumvalueCustomname"] != null && Object.hasOwnProperty.call(message, ".gogoproto.enumvalueCustomname")) - writer.uint32(/* id 66001, wireType 2 =*/528010).string(message[".gogoproto.enumvalueCustomname"]); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + EnumValueOptions.encode = function encode(m, w) { + if (!w) + w = $Writer.create(); + return w; }; /** @@ -55374,2245 +24332,30 @@ $root.google = (function() { * @function decode * @memberof google.protobuf.EnumValueOptions * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {google.protobuf.EnumValueOptions} EnumValueOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - EnumValueOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - case 66001: - message[".gogoproto.enumvalueCustomname"] = reader.string(); - break; + EnumValueOptions.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.EnumValueOptions(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".gogoproto.enumvalueCustomname"] != null && message.hasOwnProperty(".gogoproto.enumvalueCustomname")) - if (!$util.isString(message[".gogoproto.enumvalueCustomname"])) - return ".gogoproto.enumvalueCustomname: string expected"; - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".gogoproto.enumvalueCustomname"] != null) - message[".gogoproto.enumvalueCustomname"] = String(object[".gogoproto.enumvalueCustomname"]); - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object[".gogoproto.enumvalueCustomname"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".gogoproto.enumvalueCustomname"] != null && message.hasOwnProperty(".gogoproto.enumvalueCustomname")) - object[".gogoproto.enumvalueCustomname"] = message[".gogoproto.enumvalueCustomname"]; - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return EnumValueOptions; })(); - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 33: - message.deprecated = reader.bool(); - break; - case 999: - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - case 3: - message.identifierValue = reader.string(); - break; - case 4: - message.positiveIntValue = reader.uint64(); - break; - case 5: - message.negativeIntValue = reader.int64(); - break; - case 6: - message.doubleValue = reader.double(); - break; - case 7: - message.stringValue = reader.bytes(); - break; - case 8: - message.aggregateValue = reader.string(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - message.namePart = reader.string(); - break; - case 2: - message.isExtension = reader.bool(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - case 3: - message.leadingComments = reader.string(); - break; - case 4: - message.trailingComments = reader.string(); - break; - case 6: - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - case 2: - message.sourceFile = reader.string(); - break; - case 3: - message.begin = reader.int32(); - break; - case 4: - message.end = reader.int32(); - break; - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - protobuf.Timestamp = (function() { /** @@ -57629,13 +24372,13 @@ $root.google = (function() { * @classdesc Represents a Timestamp. * @implements ITimestamp * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [p] Properties to set */ - function Timestamp(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -57671,31 +24414,18 @@ $root.google = (function() { * @function encode * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {google.protobuf.ITimestamp} m Timestamp message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -57703,135 +24433,31 @@ $root.google = (function() { * @function decode * @memberof google.protobuf.Timestamp * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {google.protobuf.Timestamp} Timestamp * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.seconds = reader.int64(); + m.seconds = r.int64(); break; case 2: - message.nanos = reader.int32(); + m.nanos = r.int32(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Timestamp; @@ -57853,13 +24479,13 @@ $root.google = (function() { * @classdesc Represents a Duration. * @implements IDuration * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.IDuration=} [p] Properties to set */ - function Duration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + 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]]; } /** @@ -57895,31 +24521,18 @@ $root.google = (function() { * @function encode * @memberof google.protobuf.Duration * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to + * @param {google.protobuf.IDuration} m Duration message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); + 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; }; /** @@ -57927,135 +24540,31 @@ $root.google = (function() { * @function decode * @memberof google.protobuf.Duration * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand * @returns {google.protobuf.Duration} Duration * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Duration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { + 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: - message.seconds = reader.int64(); + m.seconds = r.int64(); break; case 2: - message.nanos = reader.int32(); + m.nanos = r.int32(); break; default: - reader.skipType(tag & 7); + r.skipType(t & 7); break; } } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + return m; }; return Duration; From 50817cbc7d0188bd85d16e517497db11c747b8cf Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 12:39:36 +0100 Subject: [PATCH 22/41] demo-protobuf: Move protobufjs dependency --- packages/demo-protobuf/package.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/demo-protobuf/package.json b/packages/demo-protobuf/package.json index 6b6e29fc..9b251f57 100644 --- a/packages/demo-protobuf/package.json +++ b/packages/demo-protobuf/package.json @@ -37,8 +37,10 @@ "pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.js --sparse --no-beautify --no-delimited --no-verify --no-convert ./proto/**/*.proto", "define-proto": "pbts src/generated/codecimpl.js -o src/generated/codecimpl.d.ts" }, - "devDependencies": { - "@cosmjs/utils": "^0.20.0", + "dependencies": { "protobufjs": "~6.9.0" + }, + "devDependencies": { + "@cosmjs/utils": "^0.20.0" } } From a645ab35738befc5e5cd17e2d540dc57c8aef00f Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 13:24:09 +0100 Subject: [PATCH 23/41] demo-protobuf: Specify necessary proto files in pack script --- packages/demo-protobuf/package.json | 2 +- .../src/generated/codecimpl.d.ts | 8761 +----- .../demo-protobuf/src/generated/codecimpl.js | 19026 ++---------- .../types/generated/codecimpl.d.ts | 23946 ++-------------- 4 files changed, 4632 insertions(+), 47103 deletions(-) diff --git a/packages/demo-protobuf/package.json b/packages/demo-protobuf/package.json index 9b251f57..997dc050 100644 --- a/packages/demo-protobuf/package.json +++ b/packages/demo-protobuf/package.json @@ -34,7 +34,7 @@ "pack-web": "yarn build-or-skip && webpack --mode development --config webpack.web.config.js", "get-proto": "./scripts/get-proto.sh", "prepack-proto": "mkdir -p src/generated", - "pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.js --sparse --no-beautify --no-delimited --no-verify --no-convert ./proto/**/*.proto", + "pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.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.js -o src/generated/codecimpl.d.ts" }, "dependencies": { diff --git a/packages/demo-protobuf/src/generated/codecimpl.d.ts b/packages/demo-protobuf/src/generated/codecimpl.d.ts index 5c531b7c..211113b9 100644 --- a/packages/demo-protobuf/src/generated/codecimpl.d.ts +++ b/packages/demo-protobuf/src/generated/codecimpl.d.ts @@ -2,755 +2,772 @@ import * as $protobuf from "protobufjs"; /** Namespace cosmos_sdk. */ export namespace cosmos_sdk { - /** Namespace codec. */ - namespace codec { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Dog. */ - interface IDog { - - /** Dog size */ - size?: (string|null); - - /** Dog name */ - name?: (string|null); - } - - /** Represents a Dog. */ - class Dog implements IDog { - - /** - * Constructs a new Dog. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.codec.v1.IDog); - - /** Dog size. */ - public size: string; - - /** Dog name. */ - public name: string; - - /** - * Creates a new Dog instance using the specified properties. - * @param [properties] Properties to set - * @returns Dog instance - */ - public static create(properties?: cosmos_sdk.codec.v1.IDog): cosmos_sdk.codec.v1.Dog; - - /** - * Encodes the specified Dog message. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. - * @param m Dog message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.codec.v1.IDog, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Dog message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Dog - * @throws {Error} If the payload is 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.codec.v1.Dog; - } - - /** Properties of a Cat. */ - interface ICat { - - /** Cat moniker */ - moniker?: (string|null); - - /** Cat lives */ - lives?: (number|null); - } - - /** Represents a Cat. */ - class Cat implements ICat { - - /** - * Constructs a new Cat. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.codec.v1.ICat); - - /** Cat moniker. */ - public moniker: string; - - /** Cat lives. */ - public lives: number; - - /** - * Creates a new Cat instance using the specified properties. - * @param [properties] Properties to set - * @returns Cat instance - */ - public static create(properties?: cosmos_sdk.codec.v1.ICat): cosmos_sdk.codec.v1.Cat; - - /** - * Encodes the specified Cat message. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. - * @param m Cat message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.codec.v1.ICat, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Cat message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Cat - * @throws {Error} If the payload is 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.codec.v1.Cat; - } - - /** Properties of a HasAnimal. */ - interface IHasAnimal { - - /** HasAnimal animal */ - animal?: (google.protobuf.IAny|null); - - /** HasAnimal x */ - x?: (number|Long|null); - } - - /** Represents a HasAnimal. */ - class HasAnimal implements IHasAnimal { - - /** - * Constructs a new HasAnimal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.codec.v1.IHasAnimal); - - /** HasAnimal animal. */ - public animal?: (google.protobuf.IAny|null); - - /** HasAnimal x. */ - public x: (number|Long); - - /** - * Creates a new HasAnimal instance using the specified properties. - * @param [properties] Properties to set - * @returns HasAnimal instance - */ - public static create(properties?: cosmos_sdk.codec.v1.IHasAnimal): cosmos_sdk.codec.v1.HasAnimal; - - /** - * Encodes the specified HasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. - * @param m HasAnimal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.codec.v1.IHasAnimal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HasAnimal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns HasAnimal - * @throws {Error} If the payload is 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.codec.v1.HasAnimal; - } - - /** Properties of a HasHasAnimal. */ - interface IHasHasAnimal { - - /** HasHasAnimal hasAnimal */ - hasAnimal?: (google.protobuf.IAny|null); - } - - /** Represents a HasHasAnimal. */ - class HasHasAnimal implements IHasHasAnimal { - - /** - * Constructs a new HasHasAnimal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.codec.v1.IHasHasAnimal); - - /** HasHasAnimal hasAnimal. */ - public hasAnimal?: (google.protobuf.IAny|null); - - /** - * Creates a new HasHasAnimal instance using the specified properties. - * @param [properties] Properties to set - * @returns HasHasAnimal instance - */ - public static create(properties?: cosmos_sdk.codec.v1.IHasHasAnimal): cosmos_sdk.codec.v1.HasHasAnimal; - - /** - * Encodes the specified HasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. - * @param m HasHasAnimal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.codec.v1.IHasHasAnimal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HasHasAnimal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns HasHasAnimal - * @throws {Error} If the payload is 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.codec.v1.HasHasAnimal; - } - - /** Properties of a HasHasHasAnimal. */ - interface IHasHasHasAnimal { - - /** HasHasHasAnimal hasHasAnimal */ - hasHasAnimal?: (google.protobuf.IAny|null); - } - - /** Represents a HasHasHasAnimal. */ - class HasHasHasAnimal implements IHasHasHasAnimal { - - /** - * Constructs a new HasHasHasAnimal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.codec.v1.IHasHasHasAnimal); - - /** HasHasHasAnimal hasHasAnimal. */ - public hasHasAnimal?: (google.protobuf.IAny|null); - - /** - * Creates a new HasHasHasAnimal instance using the specified properties. - * @param [properties] Properties to set - * @returns HasHasHasAnimal instance - */ - public static create(properties?: cosmos_sdk.codec.v1.IHasHasHasAnimal): cosmos_sdk.codec.v1.HasHasHasAnimal; - - /** - * Encodes the specified HasHasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. - * @param m HasHasHasAnimal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.codec.v1.IHasHasHasAnimal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HasHasHasAnimal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns HasHasHasAnimal - * @throws {Error} If the payload is 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.codec.v1.HasHasHasAnimal; - } - - /** Represents a TestService */ - class TestService extends $protobuf.rpc.Service { - - /** - * Constructs a new TestService 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 TestService 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): TestService; - - /** - * Calls Echo. - * @param request EchoRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EchoResponse - */ - public echo(request: cosmos_sdk.codec.v1.IEchoRequest, callback: cosmos_sdk.codec.v1.TestService.EchoCallback): void; - - /** - * Calls Echo. - * @param request EchoRequest message or plain object - * @returns Promise - */ - public echo(request: cosmos_sdk.codec.v1.IEchoRequest): Promise; - - /** - * Calls SayHello. - * @param request SayHelloRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SayHelloResponse - */ - public sayHello(request: cosmos_sdk.codec.v1.ISayHelloRequest, callback: cosmos_sdk.codec.v1.TestService.SayHelloCallback): void; - - /** - * Calls SayHello. - * @param request SayHelloRequest message or plain object - * @returns Promise - */ - public sayHello(request: cosmos_sdk.codec.v1.ISayHelloRequest): Promise; - } - - namespace TestService { - - /** - * Callback as used by {@link cosmos_sdk.codec.v1.TestService#echo}. - * @param error Error, if any - * @param [response] EchoResponse - */ - type EchoCallback = (error: (Error|null), response?: cosmos_sdk.codec.v1.EchoResponse) => void; - - /** - * Callback as used by {@link cosmos_sdk.codec.v1.TestService#sayHello}. - * @param error Error, if any - * @param [response] SayHelloResponse - */ - type SayHelloCallback = (error: (Error|null), response?: cosmos_sdk.codec.v1.SayHelloResponse) => void; - } - - /** Properties of an EchoRequest. */ - interface IEchoRequest { - - /** EchoRequest message */ - message?: (string|null); - } - - /** Represents an EchoRequest. */ - class EchoRequest implements IEchoRequest { - - /** - * Constructs a new EchoRequest. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.codec.v1.IEchoRequest); - - /** EchoRequest message. */ - public message: string; - - /** - * Creates a new EchoRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns EchoRequest instance - */ - public static create(properties?: cosmos_sdk.codec.v1.IEchoRequest): cosmos_sdk.codec.v1.EchoRequest; - - /** - * Encodes the specified EchoRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. - * @param m EchoRequest message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.codec.v1.IEchoRequest, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EchoRequest message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns EchoRequest - * @throws {Error} If the payload is 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.codec.v1.EchoRequest; - } - - /** Properties of an EchoResponse. */ - interface IEchoResponse { - - /** EchoResponse message */ - message?: (string|null); - } - - /** Represents an EchoResponse. */ - class EchoResponse implements IEchoResponse { - - /** - * Constructs a new EchoResponse. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.codec.v1.IEchoResponse); - - /** EchoResponse message. */ - public message: string; - - /** - * Creates a new EchoResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns EchoResponse instance - */ - public static create(properties?: cosmos_sdk.codec.v1.IEchoResponse): cosmos_sdk.codec.v1.EchoResponse; - - /** - * Encodes the specified EchoResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. - * @param m EchoResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.codec.v1.IEchoResponse, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EchoResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns EchoResponse - * @throws {Error} If the payload is 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.codec.v1.EchoResponse; - } - - /** Properties of a SayHelloRequest. */ - interface ISayHelloRequest { - - /** SayHelloRequest name */ - name?: (string|null); - } - - /** Represents a SayHelloRequest. */ - class SayHelloRequest implements ISayHelloRequest { - - /** - * Constructs a new SayHelloRequest. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.codec.v1.ISayHelloRequest); - - /** SayHelloRequest name. */ - public name: string; - - /** - * Creates a new SayHelloRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SayHelloRequest instance - */ - public static create(properties?: cosmos_sdk.codec.v1.ISayHelloRequest): cosmos_sdk.codec.v1.SayHelloRequest; - - /** - * Encodes the specified SayHelloRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. - * @param m SayHelloRequest message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.codec.v1.ISayHelloRequest, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SayHelloRequest message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SayHelloRequest - * @throws {Error} If the payload is 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.codec.v1.SayHelloRequest; - } - - /** Properties of a SayHelloResponse. */ - interface ISayHelloResponse { - - /** SayHelloResponse greeting */ - greeting?: (string|null); - } - - /** Represents a SayHelloResponse. */ - class SayHelloResponse implements ISayHelloResponse { - - /** - * Constructs a new SayHelloResponse. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.codec.v1.ISayHelloResponse); - - /** SayHelloResponse greeting. */ - public greeting: string; - - /** - * Creates a new SayHelloResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SayHelloResponse instance - */ - public static create(properties?: cosmos_sdk.codec.v1.ISayHelloResponse): cosmos_sdk.codec.v1.SayHelloResponse; - - /** - * Encodes the specified SayHelloResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. - * @param m SayHelloResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.codec.v1.ISayHelloResponse, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SayHelloResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SayHelloResponse - * @throws {Error} If the payload is 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.codec.v1.SayHelloResponse; + /** 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 crypto. */ - namespace crypto { + /** Namespace v1. */ + namespace v1 { - /** Namespace v1. */ - namespace v1 { + /** Properties of a Coin. */ + interface ICoin { - /** Properties of a PublicKey. */ - interface IPublicKey { + /** Coin denom */ + denom?: (string|null); - /** PublicKey secp256k1 */ - secp256k1?: (Uint8Array|null); + /** Coin amount */ + amount?: (string|null); + } - /** PublicKey ed25519 */ - ed25519?: (Uint8Array|null); + /** Represents a Coin. */ + class Coin implements ICoin { - /** PublicKey sr25519 */ - sr25519?: (Uint8Array|null); + /** + * Constructs a new Coin. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.v1.ICoin); - /** PublicKey multisig */ - multisig?: (cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null); + /** Coin denom. */ + public denom: string; - /** PublicKey secp256r1 */ - secp256r1?: (Uint8Array|null); + /** Coin amount. */ + public amount: string; - /** PublicKey anyPubkey */ - anyPubkey?: (google.protobuf.IAny|null); - } + /** + * 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; - /** Represents a PublicKey. */ - class PublicKey implements IPublicKey { + /** + * 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; - /** - * Constructs a new PublicKey. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.IPublicKey); + /** + * 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; + } - /** PublicKey secp256k1. */ - public secp256k1: Uint8Array; + /** Properties of a DecCoin. */ + interface IDecCoin { - /** PublicKey ed25519. */ - public ed25519: Uint8Array; + /** DecCoin denom */ + denom?: (string|null); - /** PublicKey sr25519. */ - public sr25519: Uint8Array; + /** DecCoin amount */ + amount?: (string|null); + } - /** PublicKey multisig. */ - public multisig?: (cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null); + /** Represents a DecCoin. */ + class DecCoin implements IDecCoin { - /** PublicKey secp256r1. */ - public secp256r1: Uint8Array; + /** + * Constructs a new DecCoin. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.v1.IDecCoin); - /** PublicKey anyPubkey. */ - public anyPubkey?: (google.protobuf.IAny|null); + /** DecCoin denom. */ + public denom: string; - /** PublicKey sum. */ - public sum?: ("secp256k1"|"ed25519"|"sr25519"|"multisig"|"secp256r1"|"anyPubkey"); + /** DecCoin amount. */ + public amount: string; - /** - * 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; + /** + * 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 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; + /** + * 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 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; - } + /** + * 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 a PubKeyMultisigThreshold. */ - interface IPubKeyMultisigThreshold { + /** Properties of an IntProto. */ + interface IIntProto { - /** PubKeyMultisigThreshold threshold */ - threshold?: (number|null); + /** IntProto int */ + int?: (string|null); + } - /** PubKeyMultisigThreshold publicKeys */ - publicKeys?: (cosmos_sdk.crypto.v1.IPublicKey[]|null); - } + /** Represents an IntProto. */ + class IntProto implements IIntProto { - /** Represents a PubKeyMultisigThreshold. */ - class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** + * Constructs a new IntProto. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.v1.IIntProto); - /** - * Constructs a new PubKeyMultisigThreshold. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + /** IntProto int. */ + public int: string; - /** PubKeyMultisigThreshold threshold. */ - public threshold: number; + /** + * 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; - /** PubKeyMultisigThreshold publicKeys. */ - public publicKeys: cosmos_sdk.crypto.v1.IPublicKey[]; + /** + * 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; - /** - * 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; + /** + * 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; + } - /** - * 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; + /** Properties of a DecProto. */ + interface IDecProto { - /** - * 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; - } + /** DecProto dec */ + dec?: (string|null); + } - /** Properties of a MultiSignature. */ - interface IMultiSignature { + /** Represents a DecProto. */ + class DecProto implements IDecProto { - /** MultiSignature signatures */ - signatures?: (Uint8Array[]|null); - } + /** + * Constructs a new DecProto. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.v1.IDecProto); - /** Represents a MultiSignature. */ - class MultiSignature implements IMultiSignature { + /** DecProto dec. */ + public dec: string; - /** - * Constructs a new MultiSignature. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.IMultiSignature); + /** + * 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; - /** MultiSignature signatures. */ - public signatures: Uint8Array[]; + /** + * 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; - /** - * 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; + /** + * 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; + } - /** - * 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; + /** Properties of a ValAddresses. */ + interface IValAddresses { - /** - * 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; - } + /** ValAddresses addresses */ + addresses?: (Uint8Array[]|null); + } - /** Properties of a CompactBitArray. */ - interface ICompactBitArray { + /** Represents a ValAddresses. */ + class ValAddresses implements IValAddresses { - /** CompactBitArray extraBitsStored */ - extraBitsStored?: (number|null); + /** + * Constructs a new ValAddresses. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.v1.IValAddresses); - /** CompactBitArray elems */ - elems?: (Uint8Array|null); - } + /** ValAddresses addresses. */ + public addresses: Uint8Array[]; - /** Represents a CompactBitArray. */ - class CompactBitArray implements ICompactBitArray { + /** + * 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; - /** - * Constructs a new CompactBitArray. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.ICompactBitArray); + /** + * 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; - /** CompactBitArray extraBitsStored. */ - public extraBitsStored: number; + /** + * 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; + } - /** CompactBitArray elems. */ - public elems: Uint8Array; + /** Properties of a GasInfo. */ + interface IGasInfo { - /** - * 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; + /** GasInfo gasWanted */ + gasWanted?: (number|Long|null); - /** - * 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; + /** GasInfo gasUsed */ + gasUsed?: (number|Long|null); + } - /** - * 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; - } + /** 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 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 v1. */ namespace v1 { @@ -1255,6966 +1272,253 @@ export namespace cosmos_sdk { public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.tx.v1.Fee; } } - } - /** 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 x. */ - namespace x { - - /** Namespace auth. */ - namespace auth { + /** Namespace signing. */ + namespace signing { /** Namespace v1. */ namespace v1 { - /** Properties of a BaseAccount. */ - interface IBaseAccount { - - /** BaseAccount address */ - address?: (Uint8Array|null); - - /** BaseAccount pubKey */ - pubKey?: (Uint8Array|null); - - /** BaseAccount accountNumber */ - accountNumber?: (number|Long|null); - - /** BaseAccount sequence */ - sequence?: (number|Long|null); - } - - /** Represents a BaseAccount. */ - class BaseAccount implements IBaseAccount { - - /** - * Constructs a new BaseAccount. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.auth.v1.IBaseAccount); - - /** BaseAccount address. */ - public address: Uint8Array; - - /** BaseAccount pubKey. */ - public pubKey: Uint8Array; - - /** BaseAccount accountNumber. */ - public accountNumber: (number|Long); - - /** BaseAccount sequence. */ - public sequence: (number|Long); - - /** - * Creates a new BaseAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns BaseAccount instance - */ - public static create(properties?: cosmos_sdk.x.auth.v1.IBaseAccount): cosmos_sdk.x.auth.v1.BaseAccount; - - /** - * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. - * @param m BaseAccount message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.auth.v1.IBaseAccount, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BaseAccount message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns BaseAccount - * @throws {Error} If the payload is 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.auth.v1.BaseAccount; - } - - /** Properties of a ModuleAccount. */ - interface IModuleAccount { - - /** ModuleAccount baseAccount */ - baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); - - /** ModuleAccount name */ - name?: (string|null); - - /** ModuleAccount permissions */ - permissions?: (string[]|null); - } - - /** Represents a ModuleAccount. */ - class ModuleAccount implements IModuleAccount { - - /** - * Constructs a new ModuleAccount. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.auth.v1.IModuleAccount); - - /** ModuleAccount baseAccount. */ - public baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); - - /** ModuleAccount name. */ - public name: string; - - /** ModuleAccount permissions. */ - public permissions: string[]; - - /** - * Creates a new ModuleAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns ModuleAccount instance - */ - public static create(properties?: cosmos_sdk.x.auth.v1.IModuleAccount): cosmos_sdk.x.auth.v1.ModuleAccount; - - /** - * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. - * @param m ModuleAccount message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.auth.v1.IModuleAccount, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ModuleAccount - * @throws {Error} If the payload is 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.auth.v1.ModuleAccount; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params maxMemoCharacters */ - maxMemoCharacters?: (number|Long|null); - - /** Params txSigLimit */ - txSigLimit?: (number|Long|null); - - /** Params txSizeCostPerByte */ - txSizeCostPerByte?: (number|Long|null); - - /** Params sigVerifyCostEd25519 */ - sigVerifyCostEd25519?: (number|Long|null); - - /** Params sigVerifyCostSecp256k1 */ - sigVerifyCostSecp256k1?: (number|Long|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.auth.v1.IParams); - - /** Params maxMemoCharacters. */ - public maxMemoCharacters: (number|Long); - - /** Params txSigLimit. */ - public txSigLimit: (number|Long); - - /** Params txSizeCostPerByte. */ - public txSizeCostPerByte: (number|Long); - - /** Params sigVerifyCostEd25519. */ - public sigVerifyCostEd25519: (number|Long); - - /** Params sigVerifyCostSecp256k1. */ - public sigVerifyCostSecp256k1: (number|Long); - - /** - * Creates a new Params instance using the specified properties. - * @param [properties] Properties to set - * @returns Params instance - */ - public static create(properties?: cosmos_sdk.x.auth.v1.IParams): cosmos_sdk.x.auth.v1.Params; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. - * @param m Params message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.auth.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Params message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.auth.v1.Params; - } - } - - /** Namespace vesting. */ - namespace vesting { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a BaseVestingAccount. */ - interface IBaseVestingAccount { - - /** BaseVestingAccount baseAccount */ - baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); - - /** BaseVestingAccount originalVesting */ - originalVesting?: (cosmos_sdk.v1.ICoin[]|null); - - /** BaseVestingAccount delegatedFree */ - delegatedFree?: (cosmos_sdk.v1.ICoin[]|null); - - /** BaseVestingAccount delegatedVesting */ - delegatedVesting?: (cosmos_sdk.v1.ICoin[]|null); - - /** BaseVestingAccount endTime */ - endTime?: (number|Long|null); - } - - /** Represents a BaseVestingAccount. */ - class BaseVestingAccount implements IBaseVestingAccount { - - /** - * Constructs a new BaseVestingAccount. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount); - - /** BaseVestingAccount baseAccount. */ - public baseAccount?: (cosmos_sdk.x.auth.v1.IBaseAccount|null); - - /** BaseVestingAccount originalVesting. */ - public originalVesting: cosmos_sdk.v1.ICoin[]; - - /** BaseVestingAccount delegatedFree. */ - public delegatedFree: cosmos_sdk.v1.ICoin[]; - - /** BaseVestingAccount delegatedVesting. */ - public delegatedVesting: cosmos_sdk.v1.ICoin[]; - - /** BaseVestingAccount endTime. */ - public endTime: (number|Long); - - /** - * Creates a new BaseVestingAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns BaseVestingAccount instance - */ - public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; - - /** - * Encodes the specified BaseVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. - * @param m BaseVestingAccount message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BaseVestingAccount message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns BaseVestingAccount - * @throws {Error} If the payload is 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.auth.vesting.v1.BaseVestingAccount; - } - - /** Properties of a ContinuousVestingAccount. */ - interface IContinuousVestingAccount { - - /** ContinuousVestingAccount baseVestingAccount */ - baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); - - /** ContinuousVestingAccount startTime */ - startTime?: (number|Long|null); - } - - /** Represents a ContinuousVestingAccount. */ - class ContinuousVestingAccount implements IContinuousVestingAccount { - - /** - * Constructs a new ContinuousVestingAccount. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount); - - /** ContinuousVestingAccount baseVestingAccount. */ - public baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); - - /** ContinuousVestingAccount startTime. */ - public startTime: (number|Long); - - /** - * Creates a new ContinuousVestingAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns ContinuousVestingAccount instance - */ - public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; - - /** - * Encodes the specified ContinuousVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. - * @param m ContinuousVestingAccount message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ContinuousVestingAccount message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ContinuousVestingAccount - * @throws {Error} If the payload is 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.auth.vesting.v1.ContinuousVestingAccount; - } - - /** Properties of a DelayedVestingAccount. */ - interface IDelayedVestingAccount { - - /** DelayedVestingAccount baseVestingAccount */ - baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); - } - - /** Represents a DelayedVestingAccount. */ - class DelayedVestingAccount implements IDelayedVestingAccount { - - /** - * Constructs a new DelayedVestingAccount. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount); - - /** DelayedVestingAccount baseVestingAccount. */ - public baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); - - /** - * Creates a new DelayedVestingAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns DelayedVestingAccount instance - */ - public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; - - /** - * Encodes the specified DelayedVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. - * @param m DelayedVestingAccount message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DelayedVestingAccount message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DelayedVestingAccount - * @throws {Error} If the payload is 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.auth.vesting.v1.DelayedVestingAccount; - } - - /** Properties of a Period. */ - interface IPeriod { - - /** Period length */ - length?: (number|Long|null); - - /** Period amount */ - amount?: (cosmos_sdk.v1.ICoin[]|null); - } - - /** Represents a Period. */ - class Period implements IPeriod { - - /** - * Constructs a new Period. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.auth.vesting.v1.IPeriod); - - /** Period length. */ - public length: (number|Long); - - /** Period amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Period instance using the specified properties. - * @param [properties] Properties to set - * @returns Period instance - */ - public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriod): cosmos_sdk.x.auth.vesting.v1.Period; - - /** - * Encodes the specified Period message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. - * @param m Period message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.auth.vesting.v1.IPeriod, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Period message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Period - * @throws {Error} If the payload is 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.auth.vesting.v1.Period; - } - - /** Properties of a PeriodicVestingAccount. */ - interface IPeriodicVestingAccount { - - /** PeriodicVestingAccount baseVestingAccount */ - baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); - - /** PeriodicVestingAccount startTime */ - startTime?: (number|Long|null); - - /** PeriodicVestingAccount vestingPeriods */ - vestingPeriods?: (cosmos_sdk.x.auth.vesting.v1.IPeriod[]|null); - } - - /** Represents a PeriodicVestingAccount. */ - class PeriodicVestingAccount implements IPeriodicVestingAccount { - - /** - * Constructs a new PeriodicVestingAccount. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount); - - /** PeriodicVestingAccount baseVestingAccount. */ - public baseVestingAccount?: (cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null); - - /** PeriodicVestingAccount startTime. */ - public startTime: (number|Long); - - /** PeriodicVestingAccount vestingPeriods. */ - public vestingPeriods: cosmos_sdk.x.auth.vesting.v1.IPeriod[]; - - /** - * Creates a new PeriodicVestingAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns PeriodicVestingAccount instance - */ - public static create(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; - - /** - * Encodes the specified PeriodicVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. - * @param m PeriodicVestingAccount message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PeriodicVestingAccount message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns PeriodicVestingAccount - * @throws {Error} If the payload is 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.auth.vesting.v1.PeriodicVestingAccount; - } - } - } - } - - /** Namespace bank. */ - namespace bank { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a Query */ - class Query extends $protobuf.rpc.Service { - - /** - * Constructs a new Query 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 Query 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): Query; - - /** - * Calls Balance. - * @param request QueryBalanceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryBalanceResponse - */ - public balance(request: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, callback: cosmos_sdk.x.bank.v1.Query.BalanceCallback): void; - - /** - * Calls Balance. - * @param request QueryBalanceRequest message or plain object - * @returns Promise - */ - public balance(request: cosmos_sdk.x.bank.v1.IQueryBalanceRequest): Promise; - - /** - * Calls AllBalances. - * @param request QueryAllBalancesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryAllBalancesResponse - */ - public allBalances(request: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, callback: cosmos_sdk.x.bank.v1.Query.AllBalancesCallback): void; - - /** - * Calls AllBalances. - * @param request QueryAllBalancesRequest message or plain object - * @returns Promise - */ - public allBalances(request: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest): Promise; - - /** - * Calls TotalSupply. - * @param request QueryTotalSupplyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryTotalSupplyResponse - */ - public totalSupply(request: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, callback: cosmos_sdk.x.bank.v1.Query.TotalSupplyCallback): void; - - /** - * Calls TotalSupply. - * @param request QueryTotalSupplyRequest message or plain object - * @returns Promise - */ - public totalSupply(request: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest): Promise; - - /** - * Calls SupplyOf. - * @param request QuerySupplyOfRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QuerySupplyOfResponse - */ - public supplyOf(request: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, callback: cosmos_sdk.x.bank.v1.Query.SupplyOfCallback): void; - - /** - * Calls SupplyOf. - * @param request QuerySupplyOfRequest message or plain object - * @returns Promise - */ - public supplyOf(request: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest): Promise; - } - - namespace Query { - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#balance}. - * @param error Error, if any - * @param [response] QueryBalanceResponse - */ - type BalanceCallback = (error: (Error|null), response?: cosmos_sdk.x.bank.v1.QueryBalanceResponse) => void; - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#allBalances}. - * @param error Error, if any - * @param [response] QueryAllBalancesResponse - */ - type AllBalancesCallback = (error: (Error|null), response?: cosmos_sdk.x.bank.v1.QueryAllBalancesResponse) => void; - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#totalSupply}. - * @param error Error, if any - * @param [response] QueryTotalSupplyResponse - */ - type TotalSupplyCallback = (error: (Error|null), response?: cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse) => void; - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#supplyOf}. - * @param error Error, if any - * @param [response] QuerySupplyOfResponse - */ - type SupplyOfCallback = (error: (Error|null), response?: cosmos_sdk.x.bank.v1.QuerySupplyOfResponse) => void; - } - - /** Properties of a QueryBalanceRequest. */ - interface IQueryBalanceRequest { - - /** QueryBalanceRequest address */ - address?: (Uint8Array|null); - - /** QueryBalanceRequest denom */ - denom?: (string|null); - } - - /** Represents a QueryBalanceRequest. */ - class QueryBalanceRequest implements IQueryBalanceRequest { - - /** - * Constructs a new QueryBalanceRequest. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest); - - /** QueryBalanceRequest address. */ - public address: Uint8Array; - - /** QueryBalanceRequest denom. */ - public denom: string; - - /** - * Creates a new QueryBalanceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryBalanceRequest instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest): cosmos_sdk.x.bank.v1.QueryBalanceRequest; - - /** - * Encodes the specified QueryBalanceRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. - * @param m QueryBalanceRequest message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryBalanceRequest message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns QueryBalanceRequest - * @throws {Error} If the payload is 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.QueryBalanceRequest; - } - - /** Properties of a QueryBalanceResponse. */ - interface IQueryBalanceResponse { - - /** QueryBalanceResponse balance */ - balance?: (cosmos_sdk.v1.ICoin|null); - } - - /** Represents a QueryBalanceResponse. */ - class QueryBalanceResponse implements IQueryBalanceResponse { - - /** - * Constructs a new QueryBalanceResponse. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse); - - /** QueryBalanceResponse balance. */ - public balance?: (cosmos_sdk.v1.ICoin|null); - - /** - * Creates a new QueryBalanceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryBalanceResponse instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse): cosmos_sdk.x.bank.v1.QueryBalanceResponse; - - /** - * Encodes the specified QueryBalanceResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. - * @param m QueryBalanceResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryBalanceResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns QueryBalanceResponse - * @throws {Error} If the payload is 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.QueryBalanceResponse; - } - - /** Properties of a QueryAllBalancesRequest. */ - interface IQueryAllBalancesRequest { - - /** QueryAllBalancesRequest address */ - address?: (Uint8Array|null); - } - - /** Represents a QueryAllBalancesRequest. */ - class QueryAllBalancesRequest implements IQueryAllBalancesRequest { - - /** - * Constructs a new QueryAllBalancesRequest. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest); - - /** QueryAllBalancesRequest address. */ - public address: Uint8Array; - - /** - * Creates a new QueryAllBalancesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryAllBalancesRequest instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; - - /** - * Encodes the specified QueryAllBalancesRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. - * @param m QueryAllBalancesRequest message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAllBalancesRequest message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns QueryAllBalancesRequest - * @throws {Error} If the payload is 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.QueryAllBalancesRequest; - } - - /** Properties of a QueryAllBalancesResponse. */ - interface IQueryAllBalancesResponse { - - /** QueryAllBalancesResponse balances */ - balances?: (cosmos_sdk.v1.ICoin[]|null); - } - - /** Represents a QueryAllBalancesResponse. */ - class QueryAllBalancesResponse implements IQueryAllBalancesResponse { - - /** - * Constructs a new QueryAllBalancesResponse. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse); - - /** QueryAllBalancesResponse balances. */ - public balances: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new QueryAllBalancesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryAllBalancesResponse instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; - - /** - * Encodes the specified QueryAllBalancesResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. - * @param m QueryAllBalancesResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryAllBalancesResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns QueryAllBalancesResponse - * @throws {Error} If the payload is 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.QueryAllBalancesResponse; - } - - /** Properties of a QueryTotalSupplyRequest. */ - interface IQueryTotalSupplyRequest { - } - - /** Represents a QueryTotalSupplyRequest. */ - class QueryTotalSupplyRequest implements IQueryTotalSupplyRequest { - - /** - * Constructs a new QueryTotalSupplyRequest. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest); - - /** - * Creates a new QueryTotalSupplyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryTotalSupplyRequest instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; - - /** - * Encodes the specified QueryTotalSupplyRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. - * @param m QueryTotalSupplyRequest message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns QueryTotalSupplyRequest - * @throws {Error} If the payload is 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.QueryTotalSupplyRequest; - } - - /** Properties of a QueryTotalSupplyResponse. */ - interface IQueryTotalSupplyResponse { - - /** QueryTotalSupplyResponse supply */ - supply?: (cosmos_sdk.v1.ICoin[]|null); - } - - /** Represents a QueryTotalSupplyResponse. */ - class QueryTotalSupplyResponse implements IQueryTotalSupplyResponse { - - /** - * Constructs a new QueryTotalSupplyResponse. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse); - - /** QueryTotalSupplyResponse supply. */ - public supply: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new QueryTotalSupplyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryTotalSupplyResponse instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; - - /** - * Encodes the specified QueryTotalSupplyResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. - * @param m QueryTotalSupplyResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns QueryTotalSupplyResponse - * @throws {Error} If the payload is 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.QueryTotalSupplyResponse; - } - - /** Properties of a QuerySupplyOfRequest. */ - interface IQuerySupplyOfRequest { - - /** QuerySupplyOfRequest denom */ - denom?: (string|null); - } - - /** Represents a QuerySupplyOfRequest. */ - class QuerySupplyOfRequest implements IQuerySupplyOfRequest { - - /** - * Constructs a new QuerySupplyOfRequest. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest); - - /** QuerySupplyOfRequest denom. */ - public denom: string; - - /** - * Creates a new QuerySupplyOfRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QuerySupplyOfRequest instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; - - /** - * Encodes the specified QuerySupplyOfRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. - * @param m QuerySupplyOfRequest message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuerySupplyOfRequest message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns QuerySupplyOfRequest - * @throws {Error} If the payload is 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.QuerySupplyOfRequest; - } - - /** Properties of a QuerySupplyOfResponse. */ - interface IQuerySupplyOfResponse { - - /** QuerySupplyOfResponse amount */ - amount?: (string|null); - } - - /** Represents a QuerySupplyOfResponse. */ - class QuerySupplyOfResponse implements IQuerySupplyOfResponse { - - /** - * Constructs a new QuerySupplyOfResponse. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse); - - /** QuerySupplyOfResponse amount. */ - public amount: string; - - /** - * Creates a new QuerySupplyOfResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QuerySupplyOfResponse instance - */ - public static create(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; - - /** - * Encodes the specified QuerySupplyOfResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. - * @param m QuerySupplyOfResponse message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuerySupplyOfResponse message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns QuerySupplyOfResponse - * @throws {Error} If the payload is 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.QuerySupplyOfResponse; - } - - /** 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 capability. */ - namespace capability { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Capability. */ - interface ICapability { - - /** Capability index */ - index?: (number|Long|null); - } - - /** Represents a Capability. */ - class Capability implements ICapability { - - /** - * Constructs a new Capability. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.capability.v1.ICapability); - - /** Capability index. */ - public index: (number|Long); - - /** - * Creates a new Capability instance using the specified properties. - * @param [properties] Properties to set - * @returns Capability instance - */ - public static create(properties?: cosmos_sdk.x.capability.v1.ICapability): cosmos_sdk.x.capability.v1.Capability; - - /** - * Encodes the specified Capability message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. - * @param m Capability message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.capability.v1.ICapability, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Capability message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Capability - * @throws {Error} If the payload is 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.capability.v1.Capability; - } - - /** Properties of an Owner. */ - interface IOwner { - - /** Owner module */ - module?: (string|null); - - /** Owner name */ - name?: (string|null); - } - - /** Represents an Owner. */ - class Owner implements IOwner { - - /** - * Constructs a new Owner. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.capability.v1.IOwner); - - /** Owner module. */ - public module: string; - - /** Owner name. */ - public name: string; - - /** - * Creates a new Owner instance using the specified properties. - * @param [properties] Properties to set - * @returns Owner instance - */ - public static create(properties?: cosmos_sdk.x.capability.v1.IOwner): cosmos_sdk.x.capability.v1.Owner; - - /** - * Encodes the specified Owner message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. - * @param m Owner message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.capability.v1.IOwner, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Owner message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Owner - * @throws {Error} If the payload is 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.capability.v1.Owner; - } - - /** Properties of a CapabilityOwners. */ - interface ICapabilityOwners { - - /** CapabilityOwners owners */ - owners?: (cosmos_sdk.x.capability.v1.IOwner[]|null); - } - - /** Represents a CapabilityOwners. */ - class CapabilityOwners implements ICapabilityOwners { - - /** - * Constructs a new CapabilityOwners. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.capability.v1.ICapabilityOwners); - - /** CapabilityOwners owners. */ - public owners: cosmos_sdk.x.capability.v1.IOwner[]; - - /** - * Creates a new CapabilityOwners instance using the specified properties. - * @param [properties] Properties to set - * @returns CapabilityOwners instance - */ - public static create(properties?: cosmos_sdk.x.capability.v1.ICapabilityOwners): cosmos_sdk.x.capability.v1.CapabilityOwners; - - /** - * Encodes the specified CapabilityOwners message. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. - * @param m CapabilityOwners message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.capability.v1.ICapabilityOwners, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CapabilityOwners message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns CapabilityOwners - * @throws {Error} If the payload is 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.capability.v1.CapabilityOwners; - } - } - } - - /** Namespace crisis. */ - namespace crisis { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MsgVerifyInvariant. */ - interface IMsgVerifyInvariant { - - /** MsgVerifyInvariant sender */ - sender?: (Uint8Array|null); - - /** MsgVerifyInvariant invariantModuleName */ - invariantModuleName?: (string|null); - - /** MsgVerifyInvariant invariantRoute */ - invariantRoute?: (string|null); - } - - /** Represents a MsgVerifyInvariant. */ - class MsgVerifyInvariant implements IMsgVerifyInvariant { - - /** - * Constructs a new MsgVerifyInvariant. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant); - - /** MsgVerifyInvariant sender. */ - public sender: Uint8Array; - - /** MsgVerifyInvariant invariantModuleName. */ - public invariantModuleName: string; - - /** MsgVerifyInvariant invariantRoute. */ - public invariantRoute: string; - - /** - * Creates a new MsgVerifyInvariant instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgVerifyInvariant instance - */ - public static create(properties?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; - - /** - * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. - * @param m MsgVerifyInvariant message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgVerifyInvariant message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgVerifyInvariant - * @throws {Error} If the payload is 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.crisis.v1.MsgVerifyInvariant; - } - } - } - - /** Namespace distribution. */ - namespace distribution { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MsgSetWithdrawAddress. */ - interface IMsgSetWithdrawAddress { - - /** MsgSetWithdrawAddress delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** MsgSetWithdrawAddress withdrawAddress */ - withdrawAddress?: (Uint8Array|null); - } - - /** Represents a MsgSetWithdrawAddress. */ - class MsgSetWithdrawAddress implements IMsgSetWithdrawAddress { - - /** - * Constructs a new MsgSetWithdrawAddress. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress); - - /** MsgSetWithdrawAddress delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgSetWithdrawAddress withdrawAddress. */ - public withdrawAddress: Uint8Array; - - /** - * Creates a new MsgSetWithdrawAddress instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSetWithdrawAddress instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; - - /** - * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. - * @param m MsgSetWithdrawAddress message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgSetWithdrawAddress - * @throws {Error} If the payload is 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.distribution.v1.MsgSetWithdrawAddress; - } - - /** Properties of a MsgWithdrawDelegatorReward. */ - interface IMsgWithdrawDelegatorReward { - - /** MsgWithdrawDelegatorReward delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** MsgWithdrawDelegatorReward validatorAddress */ - validatorAddress?: (Uint8Array|null); - } - - /** Represents a MsgWithdrawDelegatorReward. */ - class MsgWithdrawDelegatorReward implements IMsgWithdrawDelegatorReward { - - /** - * Constructs a new MsgWithdrawDelegatorReward. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward); - - /** MsgWithdrawDelegatorReward delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgWithdrawDelegatorReward validatorAddress. */ - public validatorAddress: Uint8Array; - - /** - * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgWithdrawDelegatorReward instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; - - /** - * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. - * @param m MsgWithdrawDelegatorReward message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgWithdrawDelegatorReward - * @throws {Error} If the payload is 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.distribution.v1.MsgWithdrawDelegatorReward; - } - - /** Properties of a MsgWithdrawValidatorCommission. */ - interface IMsgWithdrawValidatorCommission { - - /** MsgWithdrawValidatorCommission validatorAddress */ - validatorAddress?: (Uint8Array|null); - } - - /** Represents a MsgWithdrawValidatorCommission. */ - class MsgWithdrawValidatorCommission implements IMsgWithdrawValidatorCommission { - - /** - * Constructs a new MsgWithdrawValidatorCommission. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission); - - /** MsgWithdrawValidatorCommission validatorAddress. */ - public validatorAddress: Uint8Array; - - /** - * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgWithdrawValidatorCommission instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; - - /** - * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. - * @param m MsgWithdrawValidatorCommission message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgWithdrawValidatorCommission - * @throws {Error} If the payload is 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.distribution.v1.MsgWithdrawValidatorCommission; - } - - /** Properties of a MsgFundCommunityPool. */ - interface IMsgFundCommunityPool { - - /** MsgFundCommunityPool amount */ - amount?: (cosmos_sdk.v1.ICoin[]|null); - - /** MsgFundCommunityPool depositor */ - depositor?: (Uint8Array|null); - } - - /** Represents a MsgFundCommunityPool. */ - class MsgFundCommunityPool implements IMsgFundCommunityPool { - - /** - * Constructs a new MsgFundCommunityPool. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool); - - /** MsgFundCommunityPool amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** MsgFundCommunityPool depositor. */ - public depositor: Uint8Array; - - /** - * Creates a new MsgFundCommunityPool instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgFundCommunityPool instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; - - /** - * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. - * @param m MsgFundCommunityPool message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgFundCommunityPool message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgFundCommunityPool - * @throws {Error} If the payload is 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.distribution.v1.MsgFundCommunityPool; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params communityTax */ - communityTax?: (string|null); - - /** Params baseProposerReward */ - baseProposerReward?: (string|null); - - /** Params bonusProposerReward */ - bonusProposerReward?: (string|null); - - /** Params withdrawAddrEnabled */ - withdrawAddrEnabled?: (boolean|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IParams); - - /** Params communityTax. */ - public communityTax: string; - - /** Params baseProposerReward. */ - public baseProposerReward: string; - - /** Params bonusProposerReward. */ - public bonusProposerReward: string; - - /** Params withdrawAddrEnabled. */ - public withdrawAddrEnabled: boolean; - - /** - * Creates a new Params instance using the specified properties. - * @param [properties] Properties to set - * @returns Params instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IParams): cosmos_sdk.x.distribution.v1.Params; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. - * @param m Params message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Params message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.distribution.v1.Params; - } - - /** Properties of a ValidatorHistoricalRewards. */ - interface IValidatorHistoricalRewards { - - /** ValidatorHistoricalRewards cumulativeRewardRatio */ - cumulativeRewardRatio?: (cosmos_sdk.v1.IDecCoin[]|null); - - /** ValidatorHistoricalRewards referenceCount */ - referenceCount?: (number|null); - } - - /** Represents a ValidatorHistoricalRewards. */ - class ValidatorHistoricalRewards implements IValidatorHistoricalRewards { - - /** - * Constructs a new ValidatorHistoricalRewards. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards); - - /** ValidatorHistoricalRewards cumulativeRewardRatio. */ - public cumulativeRewardRatio: cosmos_sdk.v1.IDecCoin[]; - - /** ValidatorHistoricalRewards referenceCount. */ - public referenceCount: number; - - /** - * Creates a new ValidatorHistoricalRewards instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorHistoricalRewards instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; - - /** - * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. - * @param m ValidatorHistoricalRewards message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ValidatorHistoricalRewards - * @throws {Error} If the payload is 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.distribution.v1.ValidatorHistoricalRewards; - } - - /** Properties of a ValidatorCurrentRewards. */ - interface IValidatorCurrentRewards { - - /** ValidatorCurrentRewards rewards */ - rewards?: (cosmos_sdk.v1.IDecCoin[]|null); - - /** ValidatorCurrentRewards period */ - period?: (number|Long|null); - } - - /** Represents a ValidatorCurrentRewards. */ - class ValidatorCurrentRewards implements IValidatorCurrentRewards { - - /** - * Constructs a new ValidatorCurrentRewards. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards); - - /** ValidatorCurrentRewards rewards. */ - public rewards: cosmos_sdk.v1.IDecCoin[]; - - /** ValidatorCurrentRewards period. */ - public period: (number|Long); - - /** - * Creates a new ValidatorCurrentRewards instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorCurrentRewards instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; - - /** - * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. - * @param m ValidatorCurrentRewards message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ValidatorCurrentRewards - * @throws {Error} If the payload is 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.distribution.v1.ValidatorCurrentRewards; - } - - /** Properties of a ValidatorAccumulatedCommission. */ - interface IValidatorAccumulatedCommission { - - /** ValidatorAccumulatedCommission commission */ - commission?: (cosmos_sdk.v1.IDecCoin[]|null); - } - - /** Represents a ValidatorAccumulatedCommission. */ - class ValidatorAccumulatedCommission implements IValidatorAccumulatedCommission { - - /** - * Constructs a new ValidatorAccumulatedCommission. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission); - - /** ValidatorAccumulatedCommission commission. */ - public commission: cosmos_sdk.v1.IDecCoin[]; - - /** - * Creates a new ValidatorAccumulatedCommission instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorAccumulatedCommission instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; - - /** - * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. - * @param m ValidatorAccumulatedCommission message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ValidatorAccumulatedCommission - * @throws {Error} If the payload is 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.distribution.v1.ValidatorAccumulatedCommission; - } - - /** Properties of a ValidatorOutstandingRewards. */ - interface IValidatorOutstandingRewards { - - /** ValidatorOutstandingRewards rewards */ - rewards?: (cosmos_sdk.v1.IDecCoin[]|null); - } - - /** Represents a ValidatorOutstandingRewards. */ - class ValidatorOutstandingRewards implements IValidatorOutstandingRewards { - - /** - * Constructs a new ValidatorOutstandingRewards. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards); - - /** ValidatorOutstandingRewards rewards. */ - public rewards: cosmos_sdk.v1.IDecCoin[]; - - /** - * Creates a new ValidatorOutstandingRewards instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorOutstandingRewards instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; - - /** - * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. - * @param m ValidatorOutstandingRewards message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ValidatorOutstandingRewards - * @throws {Error} If the payload is 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.distribution.v1.ValidatorOutstandingRewards; - } - - /** Properties of a ValidatorSlashEvent. */ - interface IValidatorSlashEvent { - - /** ValidatorSlashEvent validatorPeriod */ - validatorPeriod?: (number|Long|null); - - /** ValidatorSlashEvent fraction */ - fraction?: (string|null); - } - - /** Represents a ValidatorSlashEvent. */ - class ValidatorSlashEvent implements IValidatorSlashEvent { - - /** - * Constructs a new ValidatorSlashEvent. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent); - - /** ValidatorSlashEvent validatorPeriod. */ - public validatorPeriod: (number|Long); - - /** ValidatorSlashEvent fraction. */ - public fraction: string; - - /** - * Creates a new ValidatorSlashEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorSlashEvent instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; - - /** - * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. - * @param m ValidatorSlashEvent message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidatorSlashEvent message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ValidatorSlashEvent - * @throws {Error} If the payload is 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.distribution.v1.ValidatorSlashEvent; - } - - /** Properties of a ValidatorSlashEvents. */ - interface IValidatorSlashEvents { - - /** ValidatorSlashEvents validatorSlashEvents */ - validatorSlashEvents?: (cosmos_sdk.x.distribution.v1.IValidatorSlashEvent[]|null); - } - - /** Represents a ValidatorSlashEvents. */ - class ValidatorSlashEvents implements IValidatorSlashEvents { - - /** - * Constructs a new ValidatorSlashEvents. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents); - - /** ValidatorSlashEvents validatorSlashEvents. */ - public validatorSlashEvents: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent[]; - - /** - * Creates a new ValidatorSlashEvents instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorSlashEvents instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; - - /** - * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. - * @param m ValidatorSlashEvents message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidatorSlashEvents message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ValidatorSlashEvents - * @throws {Error} If the payload is 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.distribution.v1.ValidatorSlashEvents; - } - - /** Properties of a FeePool. */ - interface IFeePool { - - /** FeePool communityPool */ - communityPool?: (cosmos_sdk.v1.IDecCoin[]|null); - } - - /** Represents a FeePool. */ - class FeePool implements IFeePool { - - /** - * Constructs a new FeePool. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IFeePool); - - /** FeePool communityPool. */ - public communityPool: cosmos_sdk.v1.IDecCoin[]; - - /** - * Creates a new FeePool instance using the specified properties. - * @param [properties] Properties to set - * @returns FeePool instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IFeePool): cosmos_sdk.x.distribution.v1.FeePool; - - /** - * Encodes the specified FeePool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. - * @param m FeePool message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IFeePool, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeePool message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns FeePool - * @throws {Error} If the payload is 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.distribution.v1.FeePool; - } - - /** Properties of a CommunityPoolSpendProposal. */ - interface ICommunityPoolSpendProposal { - - /** CommunityPoolSpendProposal title */ - title?: (string|null); - - /** CommunityPoolSpendProposal description */ - description?: (string|null); - - /** CommunityPoolSpendProposal recipient */ - recipient?: (Uint8Array|null); - - /** CommunityPoolSpendProposal amount */ - amount?: (cosmos_sdk.v1.ICoin[]|null); - } - - /** Represents a CommunityPoolSpendProposal. */ - class CommunityPoolSpendProposal implements ICommunityPoolSpendProposal { - - /** - * Constructs a new CommunityPoolSpendProposal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal); - - /** CommunityPoolSpendProposal title. */ - public title: string; - - /** CommunityPoolSpendProposal description. */ - public description: string; - - /** CommunityPoolSpendProposal recipient. */ - public recipient: Uint8Array; - - /** CommunityPoolSpendProposal amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new CommunityPoolSpendProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns CommunityPoolSpendProposal instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; - - /** - * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. - * @param m CommunityPoolSpendProposal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns CommunityPoolSpendProposal - * @throws {Error} If the payload is 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.distribution.v1.CommunityPoolSpendProposal; - } - - /** Properties of a DelegatorStartingInfo. */ - interface IDelegatorStartingInfo { - - /** DelegatorStartingInfo previousPeriod */ - previousPeriod?: (number|Long|null); - - /** DelegatorStartingInfo stake */ - stake?: (string|null); - - /** DelegatorStartingInfo height */ - height?: (number|Long|null); - } - - /** Represents a DelegatorStartingInfo. */ - class DelegatorStartingInfo implements IDelegatorStartingInfo { - - /** - * Constructs a new DelegatorStartingInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo); - - /** DelegatorStartingInfo previousPeriod. */ - public previousPeriod: (number|Long); - - /** DelegatorStartingInfo stake. */ - public stake: string; - - /** DelegatorStartingInfo height. */ - public height: (number|Long); - - /** - * Creates a new DelegatorStartingInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DelegatorStartingInfo instance - */ - public static create(properties?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; - - /** - * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. - * @param m DelegatorStartingInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DelegatorStartingInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DelegatorStartingInfo - * @throws {Error} If the payload is 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.distribution.v1.DelegatorStartingInfo; - } - } - } - - /** Namespace evidence. */ - namespace evidence { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MsgSubmitEvidence. */ - interface IMsgSubmitEvidence { - - /** MsgSubmitEvidence submitter */ - submitter?: (Uint8Array|null); - - /** MsgSubmitEvidence evidence */ - evidence?: (google.protobuf.IAny|null); - } - - /** Represents a MsgSubmitEvidence. */ - class MsgSubmitEvidence implements IMsgSubmitEvidence { - - /** - * Constructs a new MsgSubmitEvidence. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence); - - /** MsgSubmitEvidence submitter. */ - public submitter: Uint8Array; - - /** MsgSubmitEvidence evidence. */ - public evidence?: (google.protobuf.IAny|null); - - /** - * Creates a new MsgSubmitEvidence instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSubmitEvidence instance - */ - public static create(properties?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; - - /** - * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. - * @param m MsgSubmitEvidence message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitEvidence message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgSubmitEvidence - * @throws {Error} If the payload is 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.evidence.v1.MsgSubmitEvidence; - } - - /** Properties of an Equivocation. */ - interface IEquivocation { - - /** Equivocation height */ - height?: (number|Long|null); - - /** Equivocation time */ - time?: (google.protobuf.ITimestamp|null); - - /** Equivocation power */ - power?: (number|Long|null); - - /** Equivocation consensusAddress */ - consensusAddress?: (Uint8Array|null); - } - - /** Represents an Equivocation. */ - class Equivocation implements IEquivocation { - - /** - * Constructs a new Equivocation. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.evidence.v1.IEquivocation); - - /** Equivocation height. */ - public height: (number|Long); - - /** Equivocation time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** Equivocation power. */ - public power: (number|Long); - - /** Equivocation consensusAddress. */ - public consensusAddress: Uint8Array; - - /** - * Creates a new Equivocation instance using the specified properties. - * @param [properties] Properties to set - * @returns Equivocation instance - */ - public static create(properties?: cosmos_sdk.x.evidence.v1.IEquivocation): cosmos_sdk.x.evidence.v1.Equivocation; - - /** - * Encodes the specified Equivocation message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. - * @param m Equivocation message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.evidence.v1.IEquivocation, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Equivocation message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Equivocation - * @throws {Error} If the payload is 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.evidence.v1.Equivocation; - } - } - } - - /** Namespace gov. */ - namespace gov { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MsgSubmitProposal. */ - interface IMsgSubmitProposal { - - /** MsgSubmitProposal content */ - content?: (google.protobuf.IAny|null); - - /** MsgSubmitProposal initialDeposit */ - initialDeposit?: (cosmos_sdk.v1.ICoin[]|null); - - /** MsgSubmitProposal proposer */ - proposer?: (Uint8Array|null); - } - - /** Represents a MsgSubmitProposal. */ - class MsgSubmitProposal implements IMsgSubmitProposal { - - /** - * Constructs a new MsgSubmitProposal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal); - - /** MsgSubmitProposal content. */ - public content?: (google.protobuf.IAny|null); - - /** MsgSubmitProposal initialDeposit. */ - public initialDeposit: cosmos_sdk.v1.ICoin[]; - - /** MsgSubmitProposal proposer. */ - public proposer: Uint8Array; - - /** - * Creates a new MsgSubmitProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSubmitProposal instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal): cosmos_sdk.x.gov.v1.MsgSubmitProposal; - - /** - * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. - * @param m MsgSubmitProposal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgSubmitProposal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgSubmitProposal - * @throws {Error} If the payload is 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.gov.v1.MsgSubmitProposal; - } - - /** Properties of a MsgVote. */ - interface IMsgVote { - - /** MsgVote proposalId */ - proposalId?: (number|Long|null); - - /** MsgVote voter */ - voter?: (Uint8Array|null); - - /** MsgVote option */ - option?: (cosmos_sdk.x.gov.v1.VoteOption|null); - } - - /** Represents a MsgVote. */ - class MsgVote implements IMsgVote { - - /** - * Constructs a new MsgVote. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.gov.v1.IMsgVote); - - /** MsgVote proposalId. */ - public proposalId: (number|Long); - - /** MsgVote voter. */ - public voter: Uint8Array; - - /** MsgVote option. */ - public option: cosmos_sdk.x.gov.v1.VoteOption; - - /** - * Creates a new MsgVote instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgVote instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IMsgVote): cosmos_sdk.x.gov.v1.MsgVote; - - /** - * Encodes the specified MsgVote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. - * @param m MsgVote message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.gov.v1.IMsgVote, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgVote message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgVote - * @throws {Error} If the payload is 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.gov.v1.MsgVote; - } - - /** Properties of a MsgDeposit. */ - interface IMsgDeposit { - - /** MsgDeposit proposalId */ - proposalId?: (number|Long|null); - - /** MsgDeposit depositor */ - depositor?: (Uint8Array|null); - - /** MsgDeposit amount */ - amount?: (cosmos_sdk.v1.ICoin[]|null); - } - - /** Represents a MsgDeposit. */ - class MsgDeposit implements IMsgDeposit { - - /** - * Constructs a new MsgDeposit. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.gov.v1.IMsgDeposit); - - /** MsgDeposit proposalId. */ - public proposalId: (number|Long); - - /** MsgDeposit depositor. */ - public depositor: Uint8Array; - - /** MsgDeposit amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new MsgDeposit instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgDeposit instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IMsgDeposit): cosmos_sdk.x.gov.v1.MsgDeposit; - - /** - * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. - * @param m MsgDeposit message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.gov.v1.IMsgDeposit, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgDeposit message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgDeposit - * @throws {Error} If the payload is 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.gov.v1.MsgDeposit; - } - - /** VoteOption enum. */ - enum VoteOption { - VOTE_OPTION_UNSPECIFIED = 0, - VOTE_OPTION_YES = 1, - VOTE_OPTION_ABSTAIN = 2, - VOTE_OPTION_NO = 3, - VOTE_OPTION_NO_WITH_VETO = 4 - } - - /** Properties of a TextProposal. */ - interface ITextProposal { - - /** TextProposal title */ - title?: (string|null); - - /** TextProposal description */ - description?: (string|null); - } - - /** Represents a TextProposal. */ - class TextProposal implements ITextProposal { - - /** - * Constructs a new TextProposal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.gov.v1.ITextProposal); - - /** TextProposal title. */ - public title: string; - - /** TextProposal description. */ - public description: string; - - /** - * Creates a new TextProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns TextProposal instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.ITextProposal): cosmos_sdk.x.gov.v1.TextProposal; - - /** - * Encodes the specified TextProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. - * @param m TextProposal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.gov.v1.ITextProposal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TextProposal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns TextProposal - * @throws {Error} If the payload is 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.gov.v1.TextProposal; - } - - /** Properties of a Deposit. */ - interface IDeposit { - - /** Deposit proposalId */ - proposalId?: (number|Long|null); - - /** Deposit depositor */ - depositor?: (Uint8Array|null); - - /** Deposit amount */ - amount?: (cosmos_sdk.v1.ICoin[]|null); - } - - /** Represents a Deposit. */ - class Deposit implements IDeposit { - - /** - * Constructs a new Deposit. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.gov.v1.IDeposit); - - /** Deposit proposalId. */ - public proposalId: (number|Long); - - /** Deposit depositor. */ - public depositor: Uint8Array; - - /** Deposit amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Deposit instance using the specified properties. - * @param [properties] Properties to set - * @returns Deposit instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IDeposit): cosmos_sdk.x.gov.v1.Deposit; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. - * @param m Deposit message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.gov.v1.IDeposit, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Deposit message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Deposit - * @throws {Error} If the payload is 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.gov.v1.Deposit; - } - - /** Properties of a Proposal. */ - interface IProposal { - - /** Proposal proposalId */ - proposalId?: (number|Long|null); - - /** Proposal content */ - content?: (google.protobuf.IAny|null); - - /** Proposal status */ - status?: (cosmos_sdk.x.gov.v1.ProposalStatus|null); - - /** Proposal finalTallyResult */ - finalTallyResult?: (cosmos_sdk.x.gov.v1.ITallyResult|null); - - /** Proposal submitTime */ - submitTime?: (google.protobuf.ITimestamp|null); - - /** Proposal depositEndTime */ - depositEndTime?: (google.protobuf.ITimestamp|null); - - /** Proposal totalDeposit */ - totalDeposit?: (cosmos_sdk.v1.ICoin[]|null); - - /** Proposal votingStartTime */ - votingStartTime?: (google.protobuf.ITimestamp|null); - - /** Proposal votingEndTime */ - votingEndTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Proposal. */ - class Proposal implements IProposal { - - /** - * Constructs a new Proposal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.gov.v1.IProposal); - - /** Proposal proposalId. */ - public proposalId: (number|Long); - - /** Proposal content. */ - public content?: (google.protobuf.IAny|null); - - /** Proposal status. */ - public status: cosmos_sdk.x.gov.v1.ProposalStatus; - - /** Proposal finalTallyResult. */ - public finalTallyResult?: (cosmos_sdk.x.gov.v1.ITallyResult|null); - - /** Proposal submitTime. */ - public submitTime?: (google.protobuf.ITimestamp|null); - - /** Proposal depositEndTime. */ - public depositEndTime?: (google.protobuf.ITimestamp|null); - - /** Proposal totalDeposit. */ - public totalDeposit: cosmos_sdk.v1.ICoin[]; - - /** Proposal votingStartTime. */ - public votingStartTime?: (google.protobuf.ITimestamp|null); - - /** Proposal votingEndTime. */ - public votingEndTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Proposal instance using the specified properties. - * @param [properties] Properties to set - * @returns Proposal instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IProposal): cosmos_sdk.x.gov.v1.Proposal; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. - * @param m Proposal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.gov.v1.IProposal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Proposal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Proposal - * @throws {Error} If the payload is 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.gov.v1.Proposal; - } - - /** ProposalStatus enum. */ - enum ProposalStatus { - PROPOSAL_STATUS_UNSPECIFIED = 0, - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, - PROPOSAL_STATUS_VOTING_PERIOD = 2, - PROPOSAL_STATUS_PASSED = 3, - PROPOSAL_STATUS_REJECTED = 4, - PROPOSAL_STATUS_FAILED = 5 - } - - /** Properties of a TallyResult. */ - interface ITallyResult { - - /** TallyResult yes */ - yes?: (string|null); - - /** TallyResult abstain */ - abstain?: (string|null); - - /** TallyResult no */ - no?: (string|null); - - /** TallyResult noWithVeto */ - noWithVeto?: (string|null); - } - - /** Represents a TallyResult. */ - class TallyResult implements ITallyResult { - - /** - * Constructs a new TallyResult. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.gov.v1.ITallyResult); - - /** TallyResult yes. */ - public yes: string; - - /** TallyResult abstain. */ - public abstain: string; - - /** TallyResult no. */ - public no: string; - - /** TallyResult noWithVeto. */ - public noWithVeto: string; - - /** - * Creates a new TallyResult instance using the specified properties. - * @param [properties] Properties to set - * @returns TallyResult instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.ITallyResult): cosmos_sdk.x.gov.v1.TallyResult; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. - * @param m TallyResult message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.gov.v1.ITallyResult, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TallyResult message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns TallyResult - * @throws {Error} If the payload is 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.gov.v1.TallyResult; - } - - /** Properties of a Vote. */ - interface IVote { - - /** Vote proposalId */ - proposalId?: (number|Long|null); - - /** Vote voter */ - voter?: (Uint8Array|null); - - /** Vote option */ - option?: (cosmos_sdk.x.gov.v1.VoteOption|null); - } - - /** Represents a Vote. */ - class Vote implements IVote { - - /** - * Constructs a new Vote. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.gov.v1.IVote); - - /** Vote proposalId. */ - public proposalId: (number|Long); - - /** Vote voter. */ - public voter: Uint8Array; - - /** Vote option. */ - public option: cosmos_sdk.x.gov.v1.VoteOption; - - /** - * Creates a new Vote instance using the specified properties. - * @param [properties] Properties to set - * @returns Vote instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IVote): cosmos_sdk.x.gov.v1.Vote; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. - * @param m Vote message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.gov.v1.IVote, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Vote message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Vote - * @throws {Error} If the payload is 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.gov.v1.Vote; - } - } - } - - /** Namespace transfer. */ - namespace transfer { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MsgTransfer. */ - interface IMsgTransfer { - - /** MsgTransfer sourcePort */ - sourcePort?: (string|null); - - /** MsgTransfer sourceChannel */ - sourceChannel?: (string|null); - - /** MsgTransfer amount */ - amount?: (cosmos_sdk.v1.ICoin[]|null); - - /** MsgTransfer sender */ - sender?: (Uint8Array|null); - - /** MsgTransfer receiver */ - receiver?: (string|null); - - /** MsgTransfer timeoutHeight */ - timeoutHeight?: (number|Long|null); - - /** MsgTransfer timeoutTimestamp */ - timeoutTimestamp?: (number|Long|null); - } - - /** Represents a MsgTransfer. */ - class MsgTransfer implements IMsgTransfer { - - /** - * Constructs a new MsgTransfer. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.transfer.v1.IMsgTransfer); - - /** MsgTransfer sourcePort. */ - public sourcePort: string; - - /** MsgTransfer sourceChannel. */ - public sourceChannel: string; - - /** MsgTransfer amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** MsgTransfer sender. */ - public sender: Uint8Array; - - /** MsgTransfer receiver. */ - public receiver: string; - - /** MsgTransfer timeoutHeight. */ - public timeoutHeight: (number|Long); - - /** MsgTransfer timeoutTimestamp. */ - public timeoutTimestamp: (number|Long); - - /** - * Creates a new MsgTransfer instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgTransfer instance - */ - public static create(properties?: cosmos_sdk.x.transfer.v1.IMsgTransfer): cosmos_sdk.x.transfer.v1.MsgTransfer; - - /** - * Encodes the specified MsgTransfer message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. - * @param m MsgTransfer message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.transfer.v1.IMsgTransfer, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgTransfer message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgTransfer - * @throws {Error} If the payload is 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.transfer.v1.MsgTransfer; - } - - /** Properties of a FungibleTokenPacketData. */ - interface IFungibleTokenPacketData { - - /** FungibleTokenPacketData amount */ - amount?: (cosmos_sdk.v1.ICoin[]|null); - - /** FungibleTokenPacketData sender */ - sender?: (string|null); - - /** FungibleTokenPacketData receiver */ - receiver?: (string|null); - } - - /** Represents a FungibleTokenPacketData. */ - class FungibleTokenPacketData implements IFungibleTokenPacketData { - - /** - * Constructs a new FungibleTokenPacketData. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData); - - /** FungibleTokenPacketData amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** FungibleTokenPacketData sender. */ - public sender: string; - - /** FungibleTokenPacketData receiver. */ - public receiver: string; - - /** - * Creates a new FungibleTokenPacketData instance using the specified properties. - * @param [properties] Properties to set - * @returns FungibleTokenPacketData instance - */ - public static create(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; - - /** - * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. - * @param m FungibleTokenPacketData message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FungibleTokenPacketData message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns FungibleTokenPacketData - * @throws {Error} If the payload is 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.transfer.v1.FungibleTokenPacketData; - } - - /** Properties of a FungibleTokenPacketAcknowledgement. */ - interface IFungibleTokenPacketAcknowledgement { - - /** FungibleTokenPacketAcknowledgement success */ - success?: (boolean|null); - - /** FungibleTokenPacketAcknowledgement error */ - error?: (string|null); - } - - /** Represents a FungibleTokenPacketAcknowledgement. */ - class FungibleTokenPacketAcknowledgement implements IFungibleTokenPacketAcknowledgement { - - /** - * Constructs a new FungibleTokenPacketAcknowledgement. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement); - - /** FungibleTokenPacketAcknowledgement success. */ - public success: boolean; - - /** FungibleTokenPacketAcknowledgement error. */ - public error: string; - - /** - * Creates a new FungibleTokenPacketAcknowledgement instance using the specified properties. - * @param [properties] Properties to set - * @returns FungibleTokenPacketAcknowledgement instance - */ - public static create(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; - - /** - * Encodes the specified FungibleTokenPacketAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. - * @param m FungibleTokenPacketAcknowledgement message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns FungibleTokenPacketAcknowledgement - * @throws {Error} If the payload is 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.transfer.v1.FungibleTokenPacketAcknowledgement; - } - } - } - - /** Namespace ibc. */ - namespace ibc { - - /** Namespace connection. */ - namespace connection { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MsgConnectionOpenInit. */ - interface IMsgConnectionOpenInit { - - /** MsgConnectionOpenInit clientId */ - clientId?: (string|null); - - /** MsgConnectionOpenInit connectionId */ - connectionId?: (string|null); - - /** MsgConnectionOpenInit counterparty */ - counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); - - /** MsgConnectionOpenInit signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgConnectionOpenInit. */ - class MsgConnectionOpenInit implements IMsgConnectionOpenInit { - - /** - * Constructs a new MsgConnectionOpenInit. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit); - - /** MsgConnectionOpenInit clientId. */ - public clientId: string; - - /** MsgConnectionOpenInit connectionId. */ - public connectionId: string; - - /** MsgConnectionOpenInit counterparty. */ - public counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); - - /** MsgConnectionOpenInit signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgConnectionOpenInit instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgConnectionOpenInit instance - */ - public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; - - /** - * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @param m MsgConnectionOpenInit message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenInit message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgConnectionOpenInit - * @throws {Error} If the payload is 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.ibc.connection.v1.MsgConnectionOpenInit; - } - - /** Properties of a MsgConnectionOpenTry. */ - interface IMsgConnectionOpenTry { - - /** MsgConnectionOpenTry clientId */ - clientId?: (string|null); - - /** MsgConnectionOpenTry connectionId */ - connectionId?: (string|null); - - /** MsgConnectionOpenTry counterparty */ - counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); - - /** MsgConnectionOpenTry counterpartyVersions */ - counterpartyVersions?: (string[]|null); - - /** MsgConnectionOpenTry proofInit */ - proofInit?: (Uint8Array|null); - - /** MsgConnectionOpenTry proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgConnectionOpenTry proofConsensus */ - proofConsensus?: (Uint8Array|null); - - /** MsgConnectionOpenTry consensusHeight */ - consensusHeight?: (number|Long|null); - - /** MsgConnectionOpenTry signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgConnectionOpenTry. */ - class MsgConnectionOpenTry implements IMsgConnectionOpenTry { - - /** - * Constructs a new MsgConnectionOpenTry. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry); - - /** MsgConnectionOpenTry clientId. */ - public clientId: string; - - /** MsgConnectionOpenTry connectionId. */ - public connectionId: string; - - /** MsgConnectionOpenTry counterparty. */ - public counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); - - /** MsgConnectionOpenTry counterpartyVersions. */ - public counterpartyVersions: string[]; - - /** MsgConnectionOpenTry proofInit. */ - public proofInit: Uint8Array; - - /** MsgConnectionOpenTry proofHeight. */ - public proofHeight: (number|Long); - - /** MsgConnectionOpenTry proofConsensus. */ - public proofConsensus: Uint8Array; - - /** MsgConnectionOpenTry consensusHeight. */ - public consensusHeight: (number|Long); - - /** MsgConnectionOpenTry signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgConnectionOpenTry instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgConnectionOpenTry instance - */ - public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; - - /** - * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @param m MsgConnectionOpenTry message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenTry message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgConnectionOpenTry - * @throws {Error} If the payload is 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.ibc.connection.v1.MsgConnectionOpenTry; - } - - /** Properties of a MsgConnectionOpenAck. */ - interface IMsgConnectionOpenAck { - - /** MsgConnectionOpenAck connectionId */ - connectionId?: (string|null); - - /** MsgConnectionOpenAck version */ - version?: (string|null); - - /** MsgConnectionOpenAck proofTry */ - proofTry?: (Uint8Array|null); - - /** MsgConnectionOpenAck proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgConnectionOpenAck proofConsensus */ - proofConsensus?: (Uint8Array|null); - - /** MsgConnectionOpenAck consensusHeight */ - consensusHeight?: (number|Long|null); - - /** MsgConnectionOpenAck signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgConnectionOpenAck. */ - class MsgConnectionOpenAck implements IMsgConnectionOpenAck { - - /** - * Constructs a new MsgConnectionOpenAck. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck); - - /** MsgConnectionOpenAck connectionId. */ - public connectionId: string; - - /** MsgConnectionOpenAck version. */ - public version: string; - - /** MsgConnectionOpenAck proofTry. */ - public proofTry: Uint8Array; - - /** MsgConnectionOpenAck proofHeight. */ - public proofHeight: (number|Long); - - /** MsgConnectionOpenAck proofConsensus. */ - public proofConsensus: Uint8Array; - - /** MsgConnectionOpenAck consensusHeight. */ - public consensusHeight: (number|Long); - - /** MsgConnectionOpenAck signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgConnectionOpenAck instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgConnectionOpenAck instance - */ - public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; - - /** - * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @param m MsgConnectionOpenAck message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenAck message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgConnectionOpenAck - * @throws {Error} If the payload is 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.ibc.connection.v1.MsgConnectionOpenAck; - } - - /** Properties of a MsgConnectionOpenConfirm. */ - interface IMsgConnectionOpenConfirm { - - /** MsgConnectionOpenConfirm connectionId */ - connectionId?: (string|null); - - /** MsgConnectionOpenConfirm proofAck */ - proofAck?: (Uint8Array|null); - - /** MsgConnectionOpenConfirm proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgConnectionOpenConfirm signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgConnectionOpenConfirm. */ - class MsgConnectionOpenConfirm implements IMsgConnectionOpenConfirm { - - /** - * Constructs a new MsgConnectionOpenConfirm. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm); - - /** MsgConnectionOpenConfirm connectionId. */ - public connectionId: string; - - /** MsgConnectionOpenConfirm proofAck. */ - public proofAck: Uint8Array; - - /** MsgConnectionOpenConfirm proofHeight. */ - public proofHeight: (number|Long); - - /** MsgConnectionOpenConfirm signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgConnectionOpenConfirm instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgConnectionOpenConfirm instance - */ - public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; - - /** - * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @param m MsgConnectionOpenConfirm message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgConnectionOpenConfirm - * @throws {Error} If the payload is 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.ibc.connection.v1.MsgConnectionOpenConfirm; - } - - /** Properties of a ConnectionEnd. */ - interface IConnectionEnd { - - /** ConnectionEnd id */ - id?: (string|null); - - /** ConnectionEnd clientId */ - clientId?: (string|null); - - /** ConnectionEnd versions */ - versions?: (string[]|null); - - /** ConnectionEnd state */ - state?: (cosmos_sdk.x.ibc.connection.v1.State|null); - - /** ConnectionEnd counterparty */ - counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); - } - - /** Represents a ConnectionEnd. */ - class ConnectionEnd implements IConnectionEnd { - - /** - * Constructs a new ConnectionEnd. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd); - - /** ConnectionEnd id. */ - public id: string; - - /** ConnectionEnd clientId. */ - public clientId: string; - - /** ConnectionEnd versions. */ - public versions: string[]; - - /** ConnectionEnd state. */ - public state: cosmos_sdk.x.ibc.connection.v1.State; - - /** ConnectionEnd counterparty. */ - public counterparty?: (cosmos_sdk.x.ibc.connection.v1.ICounterparty|null); - - /** - * Creates a new ConnectionEnd instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectionEnd instance - */ - public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; - - /** - * Encodes the specified ConnectionEnd message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. - * @param m ConnectionEnd message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConnectionEnd message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ConnectionEnd - * @throws {Error} If the payload is 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.ibc.connection.v1.ConnectionEnd; - } - - /** State enum. */ - enum State { - STATE_UNINITIALIZED_UNSPECIFIED = 0, - STATE_INIT = 1, - STATE_TRYOPEN = 2, - STATE_OPEN = 3 - } - - /** Properties of a Counterparty. */ - interface ICounterparty { - - /** Counterparty clientId */ - clientId?: (string|null); - - /** Counterparty connectionId */ - connectionId?: (string|null); - - /** Counterparty prefix */ - prefix?: (cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix|null); - } - - /** Represents a Counterparty. */ - class Counterparty implements ICounterparty { - - /** - * Constructs a new Counterparty. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.connection.v1.ICounterparty); - - /** Counterparty clientId. */ - public clientId: string; - - /** Counterparty connectionId. */ - public connectionId: string; - - /** Counterparty prefix. */ - public prefix?: (cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix|null); - - /** - * Creates a new Counterparty instance using the specified properties. - * @param [properties] Properties to set - * @returns Counterparty instance - */ - public static create(properties?: cosmos_sdk.x.ibc.connection.v1.ICounterparty): cosmos_sdk.x.ibc.connection.v1.Counterparty; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. - * @param m Counterparty message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.connection.v1.ICounterparty, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Counterparty message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Counterparty - * @throws {Error} If the payload is 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.ibc.connection.v1.Counterparty; - } - - /** Properties of a ClientPaths. */ - interface IClientPaths { - - /** ClientPaths paths */ - paths?: (string[]|null); - } - - /** Represents a ClientPaths. */ - class ClientPaths implements IClientPaths { - - /** - * Constructs a new ClientPaths. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.connection.v1.IClientPaths); - - /** ClientPaths paths. */ - public paths: string[]; - - /** - * Creates a new ClientPaths instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientPaths instance - */ - public static create(properties?: cosmos_sdk.x.ibc.connection.v1.IClientPaths): cosmos_sdk.x.ibc.connection.v1.ClientPaths; - - /** - * Encodes the specified ClientPaths message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. - * @param m ClientPaths message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.connection.v1.IClientPaths, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientPaths message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ClientPaths - * @throws {Error} If the payload is 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.ibc.connection.v1.ClientPaths; - } - } - } - - /** Namespace channel. */ - namespace channel { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MsgChannelOpenInit. */ - interface IMsgChannelOpenInit { - - /** MsgChannelOpenInit portId */ - portId?: (string|null); - - /** MsgChannelOpenInit channelId */ - channelId?: (string|null); - - /** MsgChannelOpenInit channel */ - channel?: (cosmos_sdk.x.ibc.channel.v1.IChannel|null); - - /** MsgChannelOpenInit signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgChannelOpenInit. */ - class MsgChannelOpenInit implements IMsgChannelOpenInit { - - /** - * Constructs a new MsgChannelOpenInit. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit); - - /** MsgChannelOpenInit portId. */ - public portId: string; - - /** MsgChannelOpenInit channelId. */ - public channelId: string; - - /** MsgChannelOpenInit channel. */ - public channel?: (cosmos_sdk.x.ibc.channel.v1.IChannel|null); - - /** MsgChannelOpenInit signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelOpenInit instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelOpenInit instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; - - /** - * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @param m MsgChannelOpenInit message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenInit message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgChannelOpenInit - * @throws {Error} If the payload is 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.ibc.channel.v1.MsgChannelOpenInit; - } - - /** Properties of a MsgChannelOpenTry. */ - interface IMsgChannelOpenTry { - - /** MsgChannelOpenTry portId */ - portId?: (string|null); - - /** MsgChannelOpenTry channelId */ - channelId?: (string|null); - - /** MsgChannelOpenTry channel */ - channel?: (cosmos_sdk.x.ibc.channel.v1.IChannel|null); - - /** MsgChannelOpenTry counterpartyVersion */ - counterpartyVersion?: (string|null); - - /** MsgChannelOpenTry proofInit */ - proofInit?: (Uint8Array|null); - - /** MsgChannelOpenTry proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgChannelOpenTry signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgChannelOpenTry. */ - class MsgChannelOpenTry implements IMsgChannelOpenTry { - - /** - * Constructs a new MsgChannelOpenTry. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry); - - /** MsgChannelOpenTry portId. */ - public portId: string; - - /** MsgChannelOpenTry channelId. */ - public channelId: string; - - /** MsgChannelOpenTry channel. */ - public channel?: (cosmos_sdk.x.ibc.channel.v1.IChannel|null); - - /** MsgChannelOpenTry counterpartyVersion. */ - public counterpartyVersion: string; - - /** MsgChannelOpenTry proofInit. */ - public proofInit: Uint8Array; - - /** MsgChannelOpenTry proofHeight. */ - public proofHeight: (number|Long); - - /** MsgChannelOpenTry signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelOpenTry instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelOpenTry instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; - - /** - * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @param m MsgChannelOpenTry message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenTry message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgChannelOpenTry - * @throws {Error} If the payload is 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.ibc.channel.v1.MsgChannelOpenTry; - } - - /** Properties of a MsgChannelOpenAck. */ - interface IMsgChannelOpenAck { - - /** MsgChannelOpenAck portId */ - portId?: (string|null); - - /** MsgChannelOpenAck channelId */ - channelId?: (string|null); - - /** MsgChannelOpenAck counterpartyVersion */ - counterpartyVersion?: (string|null); - - /** MsgChannelOpenAck proofTry */ - proofTry?: (Uint8Array|null); - - /** MsgChannelOpenAck proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgChannelOpenAck signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgChannelOpenAck. */ - class MsgChannelOpenAck implements IMsgChannelOpenAck { - - /** - * Constructs a new MsgChannelOpenAck. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck); - - /** MsgChannelOpenAck portId. */ - public portId: string; - - /** MsgChannelOpenAck channelId. */ - public channelId: string; - - /** MsgChannelOpenAck counterpartyVersion. */ - public counterpartyVersion: string; - - /** MsgChannelOpenAck proofTry. */ - public proofTry: Uint8Array; - - /** MsgChannelOpenAck proofHeight. */ - public proofHeight: (number|Long); - - /** MsgChannelOpenAck signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelOpenAck instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelOpenAck instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; - - /** - * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @param m MsgChannelOpenAck message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenAck message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgChannelOpenAck - * @throws {Error} If the payload is 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.ibc.channel.v1.MsgChannelOpenAck; - } - - /** Properties of a MsgChannelOpenConfirm. */ - interface IMsgChannelOpenConfirm { - - /** MsgChannelOpenConfirm portId */ - portId?: (string|null); - - /** MsgChannelOpenConfirm channelId */ - channelId?: (string|null); - - /** MsgChannelOpenConfirm proofAck */ - proofAck?: (Uint8Array|null); - - /** MsgChannelOpenConfirm proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgChannelOpenConfirm signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgChannelOpenConfirm. */ - class MsgChannelOpenConfirm implements IMsgChannelOpenConfirm { - - /** - * Constructs a new MsgChannelOpenConfirm. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm); - - /** MsgChannelOpenConfirm portId. */ - public portId: string; - - /** MsgChannelOpenConfirm channelId. */ - public channelId: string; - - /** MsgChannelOpenConfirm proofAck. */ - public proofAck: Uint8Array; - - /** MsgChannelOpenConfirm proofHeight. */ - public proofHeight: (number|Long); - - /** MsgChannelOpenConfirm signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelOpenConfirm instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelOpenConfirm instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; - - /** - * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @param m MsgChannelOpenConfirm message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgChannelOpenConfirm - * @throws {Error} If the payload is 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.ibc.channel.v1.MsgChannelOpenConfirm; - } - - /** Properties of a MsgChannelCloseInit. */ - interface IMsgChannelCloseInit { - - /** MsgChannelCloseInit portId */ - portId?: (string|null); - - /** MsgChannelCloseInit channelId */ - channelId?: (string|null); - - /** MsgChannelCloseInit signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgChannelCloseInit. */ - class MsgChannelCloseInit implements IMsgChannelCloseInit { - - /** - * Constructs a new MsgChannelCloseInit. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit); - - /** MsgChannelCloseInit portId. */ - public portId: string; - - /** MsgChannelCloseInit channelId. */ - public channelId: string; - - /** MsgChannelCloseInit signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelCloseInit instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelCloseInit instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; - - /** - * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @param m MsgChannelCloseInit message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelCloseInit message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgChannelCloseInit - * @throws {Error} If the payload is 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.ibc.channel.v1.MsgChannelCloseInit; - } - - /** Properties of a MsgChannelCloseConfirm. */ - interface IMsgChannelCloseConfirm { - - /** MsgChannelCloseConfirm portId */ - portId?: (string|null); - - /** MsgChannelCloseConfirm channelId */ - channelId?: (string|null); - - /** MsgChannelCloseConfirm proofInit */ - proofInit?: (Uint8Array|null); - - /** MsgChannelCloseConfirm proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgChannelCloseConfirm signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgChannelCloseConfirm. */ - class MsgChannelCloseConfirm implements IMsgChannelCloseConfirm { - - /** - * Constructs a new MsgChannelCloseConfirm. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm); - - /** MsgChannelCloseConfirm portId. */ - public portId: string; - - /** MsgChannelCloseConfirm channelId. */ - public channelId: string; - - /** MsgChannelCloseConfirm proofInit. */ - public proofInit: Uint8Array; - - /** MsgChannelCloseConfirm proofHeight. */ - public proofHeight: (number|Long); - - /** MsgChannelCloseConfirm signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelCloseConfirm instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelCloseConfirm instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; - - /** - * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @param m MsgChannelCloseConfirm message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgChannelCloseConfirm - * @throws {Error} If the payload is 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.ibc.channel.v1.MsgChannelCloseConfirm; - } - - /** Properties of a MsgPacket. */ - interface IMsgPacket { - - /** MsgPacket packet */ - packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); - - /** MsgPacket proof */ - proof?: (Uint8Array|null); - - /** MsgPacket proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgPacket signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgPacket. */ - class MsgPacket implements IMsgPacket { - - /** - * Constructs a new MsgPacket. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket); - - /** MsgPacket packet. */ - public packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); - - /** MsgPacket proof. */ - public proof: Uint8Array; - - /** MsgPacket proofHeight. */ - public proofHeight: (number|Long); - - /** MsgPacket signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgPacket instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgPacket instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket): cosmos_sdk.x.ibc.channel.v1.MsgPacket; - - /** - * Encodes the specified MsgPacket message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. - * @param m MsgPacket message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgPacket message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgPacket - * @throws {Error} If the payload is 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.ibc.channel.v1.MsgPacket; - } - - /** Properties of a MsgTimeout. */ - interface IMsgTimeout { - - /** MsgTimeout packet */ - packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); - - /** MsgTimeout proof */ - proof?: (Uint8Array|null); - - /** MsgTimeout proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgTimeout nextSequenceRecv */ - nextSequenceRecv?: (number|Long|null); - - /** MsgTimeout signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgTimeout. */ - class MsgTimeout implements IMsgTimeout { - - /** - * Constructs a new MsgTimeout. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout); - - /** MsgTimeout packet. */ - public packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); - - /** MsgTimeout proof. */ - public proof: Uint8Array; - - /** MsgTimeout proofHeight. */ - public proofHeight: (number|Long); - - /** MsgTimeout nextSequenceRecv. */ - public nextSequenceRecv: (number|Long); - - /** MsgTimeout signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgTimeout instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgTimeout instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; - - /** - * Encodes the specified MsgTimeout message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. - * @param m MsgTimeout message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgTimeout message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgTimeout - * @throws {Error} If the payload is 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.ibc.channel.v1.MsgTimeout; - } - - /** Properties of a MsgAcknowledgement. */ - interface IMsgAcknowledgement { - - /** MsgAcknowledgement packet */ - packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); - - /** MsgAcknowledgement acknowledgement */ - acknowledgement?: (Uint8Array|null); - - /** MsgAcknowledgement proof */ - proof?: (Uint8Array|null); - - /** MsgAcknowledgement proofHeight */ - proofHeight?: (number|Long|null); - - /** MsgAcknowledgement signer */ - signer?: (Uint8Array|null); - } - - /** Represents a MsgAcknowledgement. */ - class MsgAcknowledgement implements IMsgAcknowledgement { - - /** - * Constructs a new MsgAcknowledgement. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement); - - /** MsgAcknowledgement packet. */ - public packet?: (cosmos_sdk.x.ibc.channel.v1.IPacket|null); - - /** MsgAcknowledgement acknowledgement. */ - public acknowledgement: Uint8Array; - - /** MsgAcknowledgement proof. */ - public proof: Uint8Array; - - /** MsgAcknowledgement proofHeight. */ - public proofHeight: (number|Long); - - /** MsgAcknowledgement signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgAcknowledgement instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgAcknowledgement instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; - - /** - * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @param m MsgAcknowledgement message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgAcknowledgement message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgAcknowledgement - * @throws {Error} If the payload is 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.ibc.channel.v1.MsgAcknowledgement; - } - - /** Properties of a Channel. */ - interface IChannel { - - /** Channel state */ - state?: (cosmos_sdk.x.ibc.channel.v1.State|null); - - /** Channel ordering */ - ordering?: (cosmos_sdk.x.ibc.channel.v1.Order|null); - - /** Channel counterparty */ - counterparty?: (cosmos_sdk.x.ibc.channel.v1.ICounterparty|null); - - /** Channel connectionHops */ - connectionHops?: (string[]|null); - - /** Channel version */ - version?: (string|null); - } - - /** Represents a Channel. */ - class Channel implements IChannel { - - /** - * Constructs a new Channel. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IChannel); - - /** Channel state. */ - public state: cosmos_sdk.x.ibc.channel.v1.State; - - /** Channel ordering. */ - public ordering: cosmos_sdk.x.ibc.channel.v1.Order; - - /** Channel counterparty. */ - public counterparty?: (cosmos_sdk.x.ibc.channel.v1.ICounterparty|null); - - /** Channel connectionHops. */ - public connectionHops: string[]; - - /** Channel version. */ - public version: string; - - /** - * Creates a new Channel instance using the specified properties. - * @param [properties] Properties to set - * @returns Channel instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IChannel): cosmos_sdk.x.ibc.channel.v1.Channel; - - /** - * Encodes the specified Channel message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. - * @param m Channel message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IChannel, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Channel message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Channel - * @throws {Error} If the payload is 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.ibc.channel.v1.Channel; - } - - /** State enum. */ - enum State { - STATE_UNINITIALIZED_UNSPECIFIED = 0, - STATE_INIT = 1, - STATE_TRYOPEN = 2, - STATE_OPEN = 3, - STATE_CLOSED = 4 - } - - /** Order enum. */ - enum Order { - ORDER_NONE_UNSPECIFIED = 0, - ORDER_UNORDERED = 1, - ORDER_ORDERED = 2 - } - - /** Properties of a Counterparty. */ - interface ICounterparty { - - /** Counterparty portId */ - portId?: (string|null); - - /** Counterparty channelId */ - channelId?: (string|null); - } - - /** Represents a Counterparty. */ - class Counterparty implements ICounterparty { - - /** - * Constructs a new Counterparty. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.ICounterparty); - - /** Counterparty portId. */ - public portId: string; - - /** Counterparty channelId. */ - public channelId: string; - - /** - * Creates a new Counterparty instance using the specified properties. - * @param [properties] Properties to set - * @returns Counterparty instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.ICounterparty): cosmos_sdk.x.ibc.channel.v1.Counterparty; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. - * @param m Counterparty message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.ICounterparty, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Counterparty message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Counterparty - * @throws {Error} If the payload is 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.ibc.channel.v1.Counterparty; - } - - /** Properties of a Packet. */ - interface IPacket { - - /** Packet sequence */ - sequence?: (number|Long|null); - - /** Packet sourcePort */ - sourcePort?: (string|null); - - /** Packet sourceChannel */ - sourceChannel?: (string|null); - - /** Packet destinationPort */ - destinationPort?: (string|null); - - /** Packet destinationChannel */ - destinationChannel?: (string|null); - - /** Packet data */ - data?: (Uint8Array|null); - - /** Packet timeoutHeight */ - timeoutHeight?: (number|Long|null); - - /** Packet timeoutTimestamp */ - timeoutTimestamp?: (number|Long|null); - } - - /** Represents a Packet. */ - class Packet implements IPacket { - - /** - * Constructs a new Packet. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.channel.v1.IPacket); - - /** Packet sequence. */ - public sequence: (number|Long); - - /** Packet sourcePort. */ - public sourcePort: string; - - /** Packet sourceChannel. */ - public sourceChannel: string; - - /** Packet destinationPort. */ - public destinationPort: string; - - /** Packet destinationChannel. */ - public destinationChannel: string; - - /** Packet data. */ - public data: Uint8Array; - - /** Packet timeoutHeight. */ - public timeoutHeight: (number|Long); - - /** Packet timeoutTimestamp. */ - public timeoutTimestamp: (number|Long); - - /** - * Creates a new Packet instance using the specified properties. - * @param [properties] Properties to set - * @returns Packet instance - */ - public static create(properties?: cosmos_sdk.x.ibc.channel.v1.IPacket): cosmos_sdk.x.ibc.channel.v1.Packet; - - /** - * Encodes the specified Packet message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. - * @param m Packet message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.channel.v1.IPacket, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Packet message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Packet - * @throws {Error} If the payload is 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.ibc.channel.v1.Packet; - } - } - } - - /** Namespace commitment. */ - namespace commitment { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MerkleRoot. */ - interface IMerkleRoot { - - /** MerkleRoot hash */ - hash?: (Uint8Array|null); - } - - /** Represents a MerkleRoot. */ - class MerkleRoot implements IMerkleRoot { - - /** - * Constructs a new MerkleRoot. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot); - - /** MerkleRoot hash. */ - public hash: Uint8Array; - - /** - * Creates a new MerkleRoot instance using the specified properties. - * @param [properties] Properties to set - * @returns MerkleRoot instance - */ - public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; - - /** - * Encodes the specified MerkleRoot message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. - * @param m MerkleRoot message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MerkleRoot message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MerkleRoot - * @throws {Error} If the payload is 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.ibc.commitment.v1.MerkleRoot; - } - - /** Properties of a MerklePrefix. */ - interface IMerklePrefix { - - /** MerklePrefix keyPrefix */ - keyPrefix?: (Uint8Array|null); - } - - /** Represents a MerklePrefix. */ - class MerklePrefix implements IMerklePrefix { - - /** - * Constructs a new MerklePrefix. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix); - - /** MerklePrefix keyPrefix. */ - public keyPrefix: Uint8Array; - - /** - * Creates a new MerklePrefix instance using the specified properties. - * @param [properties] Properties to set - * @returns MerklePrefix instance - */ - public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; - - /** - * Encodes the specified MerklePrefix message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. - * @param m MerklePrefix message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MerklePrefix message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MerklePrefix - * @throws {Error} If the payload is 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.ibc.commitment.v1.MerklePrefix; - } - - /** Properties of a MerklePath. */ - interface IMerklePath { - - /** MerklePath keyPath */ - keyPath?: (cosmos_sdk.x.ibc.commitment.v1.IKeyPath|null); - } - - /** Represents a MerklePath. */ - class MerklePath implements IMerklePath { - - /** - * Constructs a new MerklePath. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath); - - /** MerklePath keyPath. */ - public keyPath?: (cosmos_sdk.x.ibc.commitment.v1.IKeyPath|null); - - /** - * Creates a new MerklePath instance using the specified properties. - * @param [properties] Properties to set - * @returns MerklePath instance - */ - public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath): cosmos_sdk.x.ibc.commitment.v1.MerklePath; - - /** - * Encodes the specified MerklePath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. - * @param m MerklePath message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MerklePath message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MerklePath - * @throws {Error} If the payload is 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.ibc.commitment.v1.MerklePath; - } - - /** Properties of a MerkleProof. */ - interface IMerkleProof { - - /** MerkleProof proof */ - proof?: (tendermint.crypto.merkle.IProof|null); - } - - /** Represents a MerkleProof. */ - class MerkleProof implements IMerkleProof { - - /** - * Constructs a new MerkleProof. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof); - - /** MerkleProof proof. */ - public proof?: (tendermint.crypto.merkle.IProof|null); - - /** - * Creates a new MerkleProof instance using the specified properties. - * @param [properties] Properties to set - * @returns MerkleProof instance - */ - public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; - - /** - * Encodes the specified MerkleProof message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. - * @param m MerkleProof message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MerkleProof message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MerkleProof - * @throws {Error} If the payload is 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.ibc.commitment.v1.MerkleProof; - } - - /** Properties of a KeyPath. */ - interface IKeyPath { - - /** KeyPath keys */ - keys?: (cosmos_sdk.x.ibc.commitment.v1.IKey[]|null); - } - - /** Represents a KeyPath. */ - class KeyPath implements IKeyPath { - - /** - * Constructs a new KeyPath. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath); - - /** KeyPath keys. */ - public keys: cosmos_sdk.x.ibc.commitment.v1.IKey[]; - - /** - * Creates a new KeyPath instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyPath instance - */ - public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath): cosmos_sdk.x.ibc.commitment.v1.KeyPath; - - /** - * Encodes the specified KeyPath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. - * @param m KeyPath message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a KeyPath message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns KeyPath - * @throws {Error} If the payload is 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.ibc.commitment.v1.KeyPath; - } - - /** Properties of a Key. */ - interface IKey { - - /** Key name */ - name?: (Uint8Array|null); - - /** Key enc */ - enc?: (cosmos_sdk.x.ibc.commitment.v1.KeyEncoding|null); - } - - /** Represents a Key. */ - class Key implements IKey { - - /** - * Constructs a new Key. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.ibc.commitment.v1.IKey); - - /** Key name. */ - public name: Uint8Array; - - /** Key enc. */ - public enc: cosmos_sdk.x.ibc.commitment.v1.KeyEncoding; - - /** - * Creates a new Key instance using the specified properties. - * @param [properties] Properties to set - * @returns Key instance - */ - public static create(properties?: cosmos_sdk.x.ibc.commitment.v1.IKey): cosmos_sdk.x.ibc.commitment.v1.Key; - - /** - * Encodes the specified Key message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. - * @param m Key message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.ibc.commitment.v1.IKey, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Key message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Key - * @throws {Error} If the payload is 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.ibc.commitment.v1.Key; - } - - /** KeyEncoding enum. */ - enum KeyEncoding { - KEY_ENCODING_URL_UNSPECIFIED = 0, - KEY_ENCODING_HEX = 1 - } - } - } - } - - /** Namespace mint. */ - namespace mint { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Minter. */ - interface IMinter { - - /** Minter inflation */ - inflation?: (string|null); - - /** Minter annualProvisions */ - annualProvisions?: (string|null); - } - - /** Represents a Minter. */ - class Minter implements IMinter { - - /** - * Constructs a new Minter. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.mint.v1.IMinter); - - /** Minter inflation. */ - public inflation: string; - - /** Minter annualProvisions. */ - public annualProvisions: string; - - /** - * Creates a new Minter instance using the specified properties. - * @param [properties] Properties to set - * @returns Minter instance - */ - public static create(properties?: cosmos_sdk.x.mint.v1.IMinter): cosmos_sdk.x.mint.v1.Minter; - - /** - * Encodes the specified Minter message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. - * @param m Minter message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.mint.v1.IMinter, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Minter message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Minter - * @throws {Error} If the payload is 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.mint.v1.Minter; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params mintDenom */ - mintDenom?: (string|null); - - /** Params inflationRateChange */ - inflationRateChange?: (string|null); - - /** Params inflationMax */ - inflationMax?: (string|null); - - /** Params inflationMin */ - inflationMin?: (string|null); - - /** Params goalBonded */ - goalBonded?: (string|null); - - /** Params blocksPerYear */ - blocksPerYear?: (number|Long|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.mint.v1.IParams); - - /** Params mintDenom. */ - public mintDenom: string; - - /** Params inflationRateChange. */ - public inflationRateChange: string; - - /** Params inflationMax. */ - public inflationMax: string; - - /** Params inflationMin. */ - public inflationMin: string; - - /** Params goalBonded. */ - public goalBonded: string; - - /** Params blocksPerYear. */ - public blocksPerYear: (number|Long); - - /** - * Creates a new Params instance using the specified properties. - * @param [properties] Properties to set - * @returns Params instance - */ - public static create(properties?: cosmos_sdk.x.mint.v1.IParams): cosmos_sdk.x.mint.v1.Params; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. - * @param m Params message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.mint.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Params message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.mint.v1.Params; - } - } - } - - /** Namespace params. */ - namespace params { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a ParameterChangeProposal. */ - interface IParameterChangeProposal { - - /** ParameterChangeProposal title */ - title?: (string|null); - - /** ParameterChangeProposal description */ - description?: (string|null); - - /** ParameterChangeProposal changes */ - changes?: (cosmos_sdk.x.params.v1.IParamChange[]|null); - } - - /** Represents a ParameterChangeProposal. */ - class ParameterChangeProposal implements IParameterChangeProposal { - - /** - * Constructs a new ParameterChangeProposal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.params.v1.IParameterChangeProposal); - - /** ParameterChangeProposal title. */ - public title: string; - - /** ParameterChangeProposal description. */ - public description: string; - - /** ParameterChangeProposal changes. */ - public changes: cosmos_sdk.x.params.v1.IParamChange[]; - - /** - * Creates a new ParameterChangeProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns ParameterChangeProposal instance - */ - public static create(properties?: cosmos_sdk.x.params.v1.IParameterChangeProposal): cosmos_sdk.x.params.v1.ParameterChangeProposal; - - /** - * Encodes the specified ParameterChangeProposal message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. - * @param m ParameterChangeProposal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.params.v1.IParameterChangeProposal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ParameterChangeProposal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ParameterChangeProposal - * @throws {Error} If the payload is 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.params.v1.ParameterChangeProposal; - } - - /** Properties of a ParamChange. */ - interface IParamChange { - - /** ParamChange subspace */ - subspace?: (string|null); - - /** ParamChange key */ - key?: (string|null); - - /** ParamChange value */ - value?: (string|null); - } - - /** Represents a ParamChange. */ - class ParamChange implements IParamChange { - - /** - * Constructs a new ParamChange. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.params.v1.IParamChange); - - /** ParamChange subspace. */ - public subspace: string; - - /** ParamChange key. */ - public key: string; - - /** ParamChange value. */ - public value: string; - - /** - * Creates a new ParamChange instance using the specified properties. - * @param [properties] Properties to set - * @returns ParamChange instance - */ - public static create(properties?: cosmos_sdk.x.params.v1.IParamChange): cosmos_sdk.x.params.v1.ParamChange; - - /** - * Encodes the specified ParamChange message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. - * @param m ParamChange message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.params.v1.IParamChange, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ParamChange message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ParamChange - * @throws {Error} If the payload is 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.params.v1.ParamChange; - } - } - } - - /** Namespace slashing. */ - namespace slashing { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MsgUnjail. */ - interface IMsgUnjail { - - /** MsgUnjail validatorAddr */ - validatorAddr?: (Uint8Array|null); - } - - /** Represents a MsgUnjail. */ - class MsgUnjail implements IMsgUnjail { - - /** - * Constructs a new MsgUnjail. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.slashing.v1.IMsgUnjail); - - /** MsgUnjail validatorAddr. */ - public validatorAddr: Uint8Array; - - /** - * Creates a new MsgUnjail instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUnjail instance - */ - public static create(properties?: cosmos_sdk.x.slashing.v1.IMsgUnjail): cosmos_sdk.x.slashing.v1.MsgUnjail; - - /** - * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. - * @param m MsgUnjail message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.slashing.v1.IMsgUnjail, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUnjail message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUnjail - * @throws {Error} If the payload is 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.slashing.v1.MsgUnjail; - } - - /** Properties of a ValidatorSigningInfo. */ - interface IValidatorSigningInfo { - - /** ValidatorSigningInfo address */ - address?: (Uint8Array|null); - - /** ValidatorSigningInfo startHeight */ - startHeight?: (number|Long|null); - - /** ValidatorSigningInfo indexOffset */ - indexOffset?: (number|Long|null); - - /** ValidatorSigningInfo jailedUntil */ - jailedUntil?: (google.protobuf.ITimestamp|null); - - /** ValidatorSigningInfo tombstoned */ - tombstoned?: (boolean|null); - - /** ValidatorSigningInfo missedBlocksCounter */ - missedBlocksCounter?: (number|Long|null); - } - - /** Represents a ValidatorSigningInfo. */ - class ValidatorSigningInfo implements IValidatorSigningInfo { - - /** - * Constructs a new ValidatorSigningInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo); - - /** ValidatorSigningInfo address. */ - public address: Uint8Array; - - /** ValidatorSigningInfo startHeight. */ - public startHeight: (number|Long); - - /** ValidatorSigningInfo indexOffset. */ - public indexOffset: (number|Long); - - /** ValidatorSigningInfo jailedUntil. */ - public jailedUntil?: (google.protobuf.ITimestamp|null); - - /** ValidatorSigningInfo tombstoned. */ - public tombstoned: boolean; - - /** ValidatorSigningInfo missedBlocksCounter. */ - public missedBlocksCounter: (number|Long); - - /** - * Creates a new ValidatorSigningInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorSigningInfo instance - */ - public static create(properties?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; - - /** - * Encodes the specified ValidatorSigningInfo message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. - * @param m ValidatorSigningInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidatorSigningInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns ValidatorSigningInfo - * @throws {Error} If the payload is 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.slashing.v1.ValidatorSigningInfo; - } - } - } - - /** Namespace staking. */ - namespace staking { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a MsgCreateValidator. */ - interface IMsgCreateValidator { - - /** MsgCreateValidator description */ - description?: (cosmos_sdk.x.staking.v1.IDescription|null); - - /** MsgCreateValidator commission */ - commission?: (cosmos_sdk.x.staking.v1.ICommissionRates|null); - - /** MsgCreateValidator minSelfDelegation */ - minSelfDelegation?: (string|null); - - /** MsgCreateValidator delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** MsgCreateValidator validatorAddress */ - validatorAddress?: (Uint8Array|null); - - /** MsgCreateValidator pubkey */ - pubkey?: (string|null); - - /** MsgCreateValidator value */ - value?: (cosmos_sdk.v1.ICoin|null); - } - - /** Represents a MsgCreateValidator. */ - class MsgCreateValidator implements IMsgCreateValidator { - - /** - * Constructs a new MsgCreateValidator. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IMsgCreateValidator); - - /** MsgCreateValidator description. */ - public description?: (cosmos_sdk.x.staking.v1.IDescription|null); - - /** MsgCreateValidator commission. */ - public commission?: (cosmos_sdk.x.staking.v1.ICommissionRates|null); - - /** MsgCreateValidator minSelfDelegation. */ - public minSelfDelegation: string; - - /** MsgCreateValidator delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgCreateValidator validatorAddress. */ - public validatorAddress: Uint8Array; - - /** MsgCreateValidator pubkey. */ - public pubkey: string; - - /** MsgCreateValidator value. */ - public value?: (cosmos_sdk.v1.ICoin|null); - - /** - * Creates a new MsgCreateValidator instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgCreateValidator instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IMsgCreateValidator): cosmos_sdk.x.staking.v1.MsgCreateValidator; - - /** - * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. - * @param m MsgCreateValidator message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IMsgCreateValidator, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgCreateValidator message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgCreateValidator - * @throws {Error} If the payload is 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.staking.v1.MsgCreateValidator; - } - - /** Properties of a MsgEditValidator. */ - interface IMsgEditValidator { - - /** MsgEditValidator description */ - description?: (cosmos_sdk.x.staking.v1.IDescription|null); - - /** MsgEditValidator validatorAddress */ - validatorAddress?: (Uint8Array|null); - - /** MsgEditValidator commissionRate */ - commissionRate?: (string|null); - - /** MsgEditValidator minSelfDelegation */ - minSelfDelegation?: (string|null); - } - - /** Represents a MsgEditValidator. */ - class MsgEditValidator implements IMsgEditValidator { - - /** - * Constructs a new MsgEditValidator. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IMsgEditValidator); - - /** MsgEditValidator description. */ - public description?: (cosmos_sdk.x.staking.v1.IDescription|null); - - /** MsgEditValidator validatorAddress. */ - public validatorAddress: Uint8Array; - - /** MsgEditValidator commissionRate. */ - public commissionRate: string; - - /** MsgEditValidator minSelfDelegation. */ - public minSelfDelegation: string; - - /** - * Creates a new MsgEditValidator instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgEditValidator instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IMsgEditValidator): cosmos_sdk.x.staking.v1.MsgEditValidator; - - /** - * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. - * @param m MsgEditValidator message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IMsgEditValidator, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgEditValidator message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgEditValidator - * @throws {Error} If the payload is 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.staking.v1.MsgEditValidator; - } - - /** Properties of a MsgDelegate. */ - interface IMsgDelegate { - - /** MsgDelegate delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** MsgDelegate validatorAddress */ - validatorAddress?: (Uint8Array|null); - - /** MsgDelegate amount */ - amount?: (cosmos_sdk.v1.ICoin|null); - } - - /** Represents a MsgDelegate. */ - class MsgDelegate implements IMsgDelegate { - - /** - * Constructs a new MsgDelegate. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IMsgDelegate); - - /** MsgDelegate delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgDelegate validatorAddress. */ - public validatorAddress: Uint8Array; - - /** MsgDelegate amount. */ - public amount?: (cosmos_sdk.v1.ICoin|null); - - /** - * Creates a new MsgDelegate instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgDelegate instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IMsgDelegate): cosmos_sdk.x.staking.v1.MsgDelegate; - - /** - * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. - * @param m MsgDelegate message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IMsgDelegate, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgDelegate message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgDelegate - * @throws {Error} If the payload is 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.staking.v1.MsgDelegate; - } - - /** Properties of a MsgBeginRedelegate. */ - interface IMsgBeginRedelegate { - - /** MsgBeginRedelegate delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** MsgBeginRedelegate validatorSrcAddress */ - validatorSrcAddress?: (Uint8Array|null); - - /** MsgBeginRedelegate validatorDstAddress */ - validatorDstAddress?: (Uint8Array|null); - - /** MsgBeginRedelegate amount */ - amount?: (cosmos_sdk.v1.ICoin|null); - } - - /** Represents a MsgBeginRedelegate. */ - class MsgBeginRedelegate implements IMsgBeginRedelegate { - - /** - * Constructs a new MsgBeginRedelegate. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate); - - /** MsgBeginRedelegate delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgBeginRedelegate validatorSrcAddress. */ - public validatorSrcAddress: Uint8Array; - - /** MsgBeginRedelegate validatorDstAddress. */ - public validatorDstAddress: Uint8Array; - - /** MsgBeginRedelegate amount. */ - public amount?: (cosmos_sdk.v1.ICoin|null); - - /** - * Creates a new MsgBeginRedelegate instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgBeginRedelegate instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; - - /** - * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. - * @param m MsgBeginRedelegate message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgBeginRedelegate message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgBeginRedelegate - * @throws {Error} If the payload is 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.staking.v1.MsgBeginRedelegate; - } - - /** Properties of a MsgUndelegate. */ - interface IMsgUndelegate { - - /** MsgUndelegate delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** MsgUndelegate validatorAddress */ - validatorAddress?: (Uint8Array|null); - - /** MsgUndelegate amount */ - amount?: (cosmos_sdk.v1.ICoin|null); - } - - /** Represents a MsgUndelegate. */ - class MsgUndelegate implements IMsgUndelegate { - - /** - * Constructs a new MsgUndelegate. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IMsgUndelegate); - - /** MsgUndelegate delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgUndelegate validatorAddress. */ - public validatorAddress: Uint8Array; - - /** MsgUndelegate amount. */ - public amount?: (cosmos_sdk.v1.ICoin|null); - - /** - * Creates a new MsgUndelegate instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUndelegate instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IMsgUndelegate): cosmos_sdk.x.staking.v1.MsgUndelegate; - - /** - * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. - * @param m MsgUndelegate message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IMsgUndelegate, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MsgUndelegate message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgUndelegate - * @throws {Error} If the payload is 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.staking.v1.MsgUndelegate; - } - - /** Properties of a HistoricalInfo. */ - interface IHistoricalInfo { - - /** HistoricalInfo header */ - header?: (tendermint.abci.types.IHeader|null); - - /** HistoricalInfo valset */ - valset?: (cosmos_sdk.x.staking.v1.IValidator[]|null); - } - - /** Represents a HistoricalInfo. */ - class HistoricalInfo implements IHistoricalInfo { - - /** - * Constructs a new HistoricalInfo. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IHistoricalInfo); - - /** HistoricalInfo header. */ - public header?: (tendermint.abci.types.IHeader|null); - - /** HistoricalInfo valset. */ - public valset: cosmos_sdk.x.staking.v1.IValidator[]; - - /** - * Creates a new HistoricalInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns HistoricalInfo instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IHistoricalInfo): cosmos_sdk.x.staking.v1.HistoricalInfo; - - /** - * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. - * @param m HistoricalInfo message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IHistoricalInfo, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HistoricalInfo message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns HistoricalInfo - * @throws {Error} If the payload is 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.staking.v1.HistoricalInfo; - } - - /** Properties of a CommissionRates. */ - interface ICommissionRates { - - /** CommissionRates rate */ - rate?: (string|null); - - /** CommissionRates maxRate */ - maxRate?: (string|null); - - /** CommissionRates maxChangeRate */ - maxChangeRate?: (string|null); - } - - /** Represents a CommissionRates. */ - class CommissionRates implements ICommissionRates { - - /** - * Constructs a new CommissionRates. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.ICommissionRates); - - /** CommissionRates rate. */ - public rate: string; - - /** CommissionRates maxRate. */ - public maxRate: string; - - /** CommissionRates maxChangeRate. */ - public maxChangeRate: string; - - /** - * Creates a new CommissionRates instance using the specified properties. - * @param [properties] Properties to set - * @returns CommissionRates instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.ICommissionRates): cosmos_sdk.x.staking.v1.CommissionRates; - - /** - * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. - * @param m CommissionRates message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.ICommissionRates, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommissionRates message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns CommissionRates - * @throws {Error} If the payload is 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.staking.v1.CommissionRates; - } - - /** Properties of a Commission. */ - interface ICommission { - - /** Commission commissionRates */ - commissionRates?: (cosmos_sdk.x.staking.v1.ICommissionRates|null); - - /** Commission updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Commission. */ - class Commission implements ICommission { - - /** - * Constructs a new Commission. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.ICommission); - - /** Commission commissionRates. */ - public commissionRates?: (cosmos_sdk.x.staking.v1.ICommissionRates|null); - - /** Commission updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Commission instance using the specified properties. - * @param [properties] Properties to set - * @returns Commission instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.ICommission): cosmos_sdk.x.staking.v1.Commission; - - /** - * Encodes the specified Commission message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. - * @param m Commission message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.ICommission, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Commission message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Commission - * @throws {Error} If the payload is 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.staking.v1.Commission; - } - - /** Properties of a Description. */ - interface IDescription { - - /** Description moniker */ - moniker?: (string|null); - - /** Description identity */ - identity?: (string|null); - - /** Description website */ - website?: (string|null); - - /** Description securityContact */ - securityContact?: (string|null); - - /** Description details */ - details?: (string|null); - } - - /** Represents a Description. */ - class Description implements IDescription { - - /** - * Constructs a new Description. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IDescription); - - /** Description moniker. */ - public moniker: string; - - /** Description identity. */ - public identity: string; - - /** Description website. */ - public website: string; - - /** Description securityContact. */ - public securityContact: string; - - /** Description details. */ - public details: string; - - /** - * Creates a new Description instance using the specified properties. - * @param [properties] Properties to set - * @returns Description instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IDescription): cosmos_sdk.x.staking.v1.Description; - - /** - * Encodes the specified Description message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. - * @param m Description message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IDescription, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Description message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Description - * @throws {Error} If the payload is 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.staking.v1.Description; - } - - /** Properties of a Validator. */ - interface IValidator { - - /** Validator operatorAddress */ - operatorAddress?: (Uint8Array|null); - - /** Validator consensusPubkey */ - consensusPubkey?: (string|null); - - /** Validator jailed */ - jailed?: (boolean|null); - - /** Validator status */ - status?: (number|null); - - /** Validator tokens */ - tokens?: (string|null); - - /** Validator delegatorShares */ - delegatorShares?: (string|null); - - /** Validator description */ - description?: (cosmos_sdk.x.staking.v1.IDescription|null); - - /** Validator unbondingHeight */ - unbondingHeight?: (number|Long|null); - - /** Validator unbondingTime */ - unbondingTime?: (google.protobuf.ITimestamp|null); - - /** Validator commission */ - commission?: (cosmos_sdk.x.staking.v1.ICommission|null); - - /** Validator minSelfDelegation */ - minSelfDelegation?: (string|null); - } - - /** Represents a Validator. */ - class Validator implements IValidator { - - /** - * Constructs a new Validator. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IValidator); - - /** Validator operatorAddress. */ - public operatorAddress: Uint8Array; - - /** Validator consensusPubkey. */ - public consensusPubkey: string; - - /** Validator jailed. */ - public jailed: boolean; - - /** Validator status. */ - public status: number; - - /** Validator tokens. */ - public tokens: string; - - /** Validator delegatorShares. */ - public delegatorShares: string; - - /** Validator description. */ - public description?: (cosmos_sdk.x.staking.v1.IDescription|null); - - /** Validator unbondingHeight. */ - public unbondingHeight: (number|Long); - - /** Validator unbondingTime. */ - public unbondingTime?: (google.protobuf.ITimestamp|null); - - /** Validator commission. */ - public commission?: (cosmos_sdk.x.staking.v1.ICommission|null); - - /** Validator minSelfDelegation. */ - public minSelfDelegation: string; - - /** - * Creates a new Validator instance using the specified properties. - * @param [properties] Properties to set - * @returns Validator instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IValidator): cosmos_sdk.x.staking.v1.Validator; - - /** - * Encodes the specified Validator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.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: cosmos_sdk.x.staking.v1.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): cosmos_sdk.x.staking.v1.Validator; - } - - /** Properties of a DVPair. */ - interface IDVPair { - - /** DVPair delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** DVPair validatorAddress */ - validatorAddress?: (Uint8Array|null); - } - - /** Represents a DVPair. */ - class DVPair implements IDVPair { - - /** - * Constructs a new DVPair. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IDVPair); - - /** DVPair delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** DVPair validatorAddress. */ - public validatorAddress: Uint8Array; - - /** - * Creates a new DVPair instance using the specified properties. - * @param [properties] Properties to set - * @returns DVPair instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IDVPair): cosmos_sdk.x.staking.v1.DVPair; - - /** - * Encodes the specified DVPair message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. - * @param m DVPair message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IDVPair, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DVPair message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DVPair - * @throws {Error} If the payload is 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.staking.v1.DVPair; - } - - /** Properties of a DVPairs. */ - interface IDVPairs { - - /** DVPairs pairs */ - pairs?: (cosmos_sdk.x.staking.v1.IDVPair[]|null); - } - - /** Represents a DVPairs. */ - class DVPairs implements IDVPairs { - - /** - * Constructs a new DVPairs. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IDVPairs); - - /** DVPairs pairs. */ - public pairs: cosmos_sdk.x.staking.v1.IDVPair[]; - - /** - * Creates a new DVPairs instance using the specified properties. - * @param [properties] Properties to set - * @returns DVPairs instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IDVPairs): cosmos_sdk.x.staking.v1.DVPairs; - - /** - * Encodes the specified DVPairs message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. - * @param m DVPairs message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IDVPairs, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DVPairs message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DVPairs - * @throws {Error} If the payload is 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.staking.v1.DVPairs; - } - - /** Properties of a DVVTriplet. */ - interface IDVVTriplet { - - /** DVVTriplet delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** DVVTriplet validatorSrcAddress */ - validatorSrcAddress?: (Uint8Array|null); - - /** DVVTriplet validatorDstAddress */ - validatorDstAddress?: (Uint8Array|null); - } - - /** Represents a DVVTriplet. */ - class DVVTriplet implements IDVVTriplet { - - /** - * Constructs a new DVVTriplet. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IDVVTriplet); - - /** DVVTriplet delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** DVVTriplet validatorSrcAddress. */ - public validatorSrcAddress: Uint8Array; - - /** DVVTriplet validatorDstAddress. */ - public validatorDstAddress: Uint8Array; - - /** - * Creates a new DVVTriplet instance using the specified properties. - * @param [properties] Properties to set - * @returns DVVTriplet instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IDVVTriplet): cosmos_sdk.x.staking.v1.DVVTriplet; - - /** - * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. - * @param m DVVTriplet message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IDVVTriplet, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DVVTriplet message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DVVTriplet - * @throws {Error} If the payload is 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.staking.v1.DVVTriplet; - } - - /** Properties of a DVVTriplets. */ - interface IDVVTriplets { - - /** DVVTriplets triplets */ - triplets?: (cosmos_sdk.x.staking.v1.IDVVTriplet[]|null); - } - - /** Represents a DVVTriplets. */ - class DVVTriplets implements IDVVTriplets { - - /** - * Constructs a new DVVTriplets. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IDVVTriplets); - - /** DVVTriplets triplets. */ - public triplets: cosmos_sdk.x.staking.v1.IDVVTriplet[]; - - /** - * Creates a new DVVTriplets instance using the specified properties. - * @param [properties] Properties to set - * @returns DVVTriplets instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IDVVTriplets): cosmos_sdk.x.staking.v1.DVVTriplets; - - /** - * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. - * @param m DVVTriplets message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IDVVTriplets, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DVVTriplets message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns DVVTriplets - * @throws {Error} If the payload is 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.staking.v1.DVVTriplets; - } - - /** Properties of a Delegation. */ - interface IDelegation { - - /** Delegation delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** Delegation validatorAddress */ - validatorAddress?: (Uint8Array|null); - - /** Delegation shares */ - shares?: (string|null); - } - - /** Represents a Delegation. */ - class Delegation implements IDelegation { - - /** - * Constructs a new Delegation. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IDelegation); - - /** Delegation delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** Delegation validatorAddress. */ - public validatorAddress: Uint8Array; - - /** Delegation shares. */ - public shares: string; - - /** - * Creates a new Delegation instance using the specified properties. - * @param [properties] Properties to set - * @returns Delegation instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IDelegation): cosmos_sdk.x.staking.v1.Delegation; - - /** - * Encodes the specified Delegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. - * @param m Delegation message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IDelegation, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Delegation message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Delegation - * @throws {Error} If the payload is 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.staking.v1.Delegation; - } - - /** Properties of an UnbondingDelegation. */ - interface IUnbondingDelegation { - - /** UnbondingDelegation delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** UnbondingDelegation validatorAddress */ - validatorAddress?: (Uint8Array|null); - - /** UnbondingDelegation entries */ - entries?: (cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry[]|null); - } - - /** Represents an UnbondingDelegation. */ - class UnbondingDelegation implements IUnbondingDelegation { - - /** - * Constructs a new UnbondingDelegation. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IUnbondingDelegation); - - /** UnbondingDelegation delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** UnbondingDelegation validatorAddress. */ - public validatorAddress: Uint8Array; - - /** UnbondingDelegation entries. */ - public entries: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry[]; - - /** - * Creates a new UnbondingDelegation instance using the specified properties. - * @param [properties] Properties to set - * @returns UnbondingDelegation instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegation): cosmos_sdk.x.staking.v1.UnbondingDelegation; - - /** - * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. - * @param m UnbondingDelegation message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IUnbondingDelegation, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnbondingDelegation message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns UnbondingDelegation - * @throws {Error} If the payload is 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.staking.v1.UnbondingDelegation; - } - - /** Properties of an UnbondingDelegationEntry. */ - interface IUnbondingDelegationEntry { - - /** UnbondingDelegationEntry creationHeight */ - creationHeight?: (number|Long|null); - - /** UnbondingDelegationEntry completionTime */ - completionTime?: (google.protobuf.ITimestamp|null); - - /** UnbondingDelegationEntry initialBalance */ - initialBalance?: (string|null); - - /** UnbondingDelegationEntry balance */ - balance?: (string|null); - } - - /** Represents an UnbondingDelegationEntry. */ - class UnbondingDelegationEntry implements IUnbondingDelegationEntry { - - /** - * Constructs a new UnbondingDelegationEntry. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry); - - /** UnbondingDelegationEntry creationHeight. */ - public creationHeight: (number|Long); - - /** UnbondingDelegationEntry completionTime. */ - public completionTime?: (google.protobuf.ITimestamp|null); - - /** UnbondingDelegationEntry initialBalance. */ - public initialBalance: string; - - /** UnbondingDelegationEntry balance. */ - public balance: string; - - /** - * Creates a new UnbondingDelegationEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns UnbondingDelegationEntry instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; - - /** - * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. - * @param m UnbondingDelegationEntry message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns UnbondingDelegationEntry - * @throws {Error} If the payload is 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.staking.v1.UnbondingDelegationEntry; - } - - /** Properties of a RedelegationEntry. */ - interface IRedelegationEntry { - - /** RedelegationEntry creationHeight */ - creationHeight?: (number|Long|null); - - /** RedelegationEntry completionTime */ - completionTime?: (google.protobuf.ITimestamp|null); - - /** RedelegationEntry initialBalance */ - initialBalance?: (string|null); - - /** RedelegationEntry sharesDst */ - sharesDst?: (string|null); - } - - /** Represents a RedelegationEntry. */ - class RedelegationEntry implements IRedelegationEntry { - - /** - * Constructs a new RedelegationEntry. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IRedelegationEntry); - - /** RedelegationEntry creationHeight. */ - public creationHeight: (number|Long); - - /** RedelegationEntry completionTime. */ - public completionTime?: (google.protobuf.ITimestamp|null); - - /** RedelegationEntry initialBalance. */ - public initialBalance: string; - - /** RedelegationEntry sharesDst. */ - public sharesDst: string; - - /** - * Creates a new RedelegationEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns RedelegationEntry instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IRedelegationEntry): cosmos_sdk.x.staking.v1.RedelegationEntry; - - /** - * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. - * @param m RedelegationEntry message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IRedelegationEntry, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedelegationEntry message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns RedelegationEntry - * @throws {Error} If the payload is 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.staking.v1.RedelegationEntry; - } - - /** Properties of a Redelegation. */ - interface IRedelegation { - - /** Redelegation delegatorAddress */ - delegatorAddress?: (Uint8Array|null); - - /** Redelegation validatorSrcAddress */ - validatorSrcAddress?: (Uint8Array|null); - - /** Redelegation validatorDstAddress */ - validatorDstAddress?: (Uint8Array|null); - - /** Redelegation entries */ - entries?: (cosmos_sdk.x.staking.v1.IRedelegationEntry[]|null); - } - - /** Represents a Redelegation. */ - class Redelegation implements IRedelegation { - - /** - * Constructs a new Redelegation. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IRedelegation); - - /** Redelegation delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** Redelegation validatorSrcAddress. */ - public validatorSrcAddress: Uint8Array; - - /** Redelegation validatorDstAddress. */ - public validatorDstAddress: Uint8Array; - - /** Redelegation entries. */ - public entries: cosmos_sdk.x.staking.v1.IRedelegationEntry[]; - - /** - * Creates a new Redelegation instance using the specified properties. - * @param [properties] Properties to set - * @returns Redelegation instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IRedelegation): cosmos_sdk.x.staking.v1.Redelegation; - - /** - * Encodes the specified Redelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. - * @param m Redelegation message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IRedelegation, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Redelegation message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Redelegation - * @throws {Error} If the payload is 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.staking.v1.Redelegation; - } - - /** Properties of a Params. */ - interface IParams { - - /** Params unbondingTime */ - unbondingTime?: (google.protobuf.IDuration|null); - - /** Params maxValidators */ - maxValidators?: (number|null); - - /** Params maxEntries */ - maxEntries?: (number|null); - - /** Params historicalEntries */ - historicalEntries?: (number|null); - - /** Params bondDenom */ - bondDenom?: (string|null); - } - - /** Represents a Params. */ - class Params implements IParams { - - /** - * Constructs a new Params. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.staking.v1.IParams); - - /** Params unbondingTime. */ - public unbondingTime?: (google.protobuf.IDuration|null); - - /** Params maxValidators. */ - public maxValidators: number; - - /** Params maxEntries. */ - public maxEntries: number; - - /** Params historicalEntries. */ - public historicalEntries: number; - - /** Params bondDenom. */ - public bondDenom: string; - - /** - * Creates a new Params instance using the specified properties. - * @param [properties] Properties to set - * @returns Params instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IParams): cosmos_sdk.x.staking.v1.Params; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. - * @param m Params message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.staking.v1.IParams, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Params message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): cosmos_sdk.x.staking.v1.Params; - } - } - } - - /** Namespace upgrade. */ - namespace upgrade { - - /** Namespace v1. */ - namespace v1 { - - /** Properties of a Plan. */ - interface IPlan { - - /** Plan name */ - name?: (string|null); - - /** Plan time */ - time?: (google.protobuf.ITimestamp|null); - - /** Plan height */ - height?: (number|Long|null); - - /** Plan info */ - info?: (string|null); - } - - /** Represents a Plan. */ - class Plan implements IPlan { - - /** - * Constructs a new Plan. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.upgrade.v1.IPlan); - - /** Plan name. */ - public name: string; - - /** Plan time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** Plan height. */ - public height: (number|Long); - - /** Plan info. */ - public info: string; - - /** - * Creates a new Plan instance using the specified properties. - * @param [properties] Properties to set - * @returns Plan instance - */ - public static create(properties?: cosmos_sdk.x.upgrade.v1.IPlan): cosmos_sdk.x.upgrade.v1.Plan; - - /** - * Encodes the specified Plan message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. - * @param m Plan message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.upgrade.v1.IPlan, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Plan message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns Plan - * @throws {Error} If the payload is 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.upgrade.v1.Plan; - } - - /** Properties of a SoftwareUpgradeProposal. */ - interface ISoftwareUpgradeProposal { - - /** SoftwareUpgradeProposal title */ - title?: (string|null); - - /** SoftwareUpgradeProposal description */ - description?: (string|null); - - /** SoftwareUpgradeProposal plan */ - plan?: (cosmos_sdk.x.upgrade.v1.IPlan|null); - } - - /** Represents a SoftwareUpgradeProposal. */ - class SoftwareUpgradeProposal implements ISoftwareUpgradeProposal { - - /** - * Constructs a new SoftwareUpgradeProposal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal); - - /** SoftwareUpgradeProposal title. */ - public title: string; - - /** SoftwareUpgradeProposal description. */ - public description: string; - - /** SoftwareUpgradeProposal plan. */ - public plan?: (cosmos_sdk.x.upgrade.v1.IPlan|null); - - /** - * Creates a new SoftwareUpgradeProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns SoftwareUpgradeProposal instance - */ - public static create(properties?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; - - /** - * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. - * @param m SoftwareUpgradeProposal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns SoftwareUpgradeProposal - * @throws {Error} If the payload is 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.upgrade.v1.SoftwareUpgradeProposal; - } - - /** Properties of a CancelSoftwareUpgradeProposal. */ - interface ICancelSoftwareUpgradeProposal { - - /** CancelSoftwareUpgradeProposal title */ - title?: (string|null); - - /** CancelSoftwareUpgradeProposal description */ - description?: (string|null); - } - - /** Represents a CancelSoftwareUpgradeProposal. */ - class CancelSoftwareUpgradeProposal implements ICancelSoftwareUpgradeProposal { - - /** - * Constructs a new CancelSoftwareUpgradeProposal. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal); - - /** CancelSoftwareUpgradeProposal title. */ - public title: string; - - /** CancelSoftwareUpgradeProposal description. */ - public description: string; - - /** - * Creates a new CancelSoftwareUpgradeProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelSoftwareUpgradeProposal instance - */ - public static create(properties?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @param m CancelSoftwareUpgradeProposal message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns CancelSoftwareUpgradeProposal - * @throws {Error} If the payload is 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.upgrade.v1.CancelSoftwareUpgradeProposal; + /** SignMode enum. */ + enum SignMode { + SIGN_MODE_UNSPECIFIED = 0, + SIGN_MODE_DIRECT = 1, + SIGN_MODE_TEXTUAL = 2, + SIGN_MODE_LEGACY_AMINO_JSON = 127 } } } } - /** Namespace ibc. */ - namespace ibc { + /** Namespace crypto. */ + namespace crypto { - /** Namespace localhost. */ - namespace localhost { + /** Namespace v1. */ + namespace v1 { - /** Namespace v1. */ - namespace v1 { + /** Properties of a PublicKey. */ + interface IPublicKey { - /** Properties of a MsgCreateClient. */ - interface IMsgCreateClient { + /** PublicKey secp256k1 */ + secp256k1?: (Uint8Array|null); - /** MsgCreateClient signer */ - signer?: (Uint8Array|null); - } + /** PublicKey ed25519 */ + ed25519?: (Uint8Array|null); - /** Represents a MsgCreateClient. */ - class MsgCreateClient implements IMsgCreateClient { + /** PublicKey sr25519 */ + sr25519?: (Uint8Array|null); - /** - * Constructs a new MsgCreateClient. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient); + /** PublicKey multisig */ + multisig?: (cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null); - /** MsgCreateClient signer. */ - public signer: Uint8Array; + /** PublicKey secp256r1 */ + secp256r1?: (Uint8Array|null); - /** - * Creates a new MsgCreateClient instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgCreateClient instance - */ - public static create(properties?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; + /** PublicKey anyPubkey */ + anyPubkey?: (google.protobuf.IAny|null); + } - /** - * Encodes the specified MsgCreateClient message. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. - * @param m MsgCreateClient message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, w?: $protobuf.Writer): $protobuf.Writer; + /** Represents a PublicKey. */ + class PublicKey implements IPublicKey { - /** - * Decodes a MsgCreateClient message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MsgCreateClient - * @throws {Error} If the payload is 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.ibc.localhost.v1.MsgCreateClient; - } + /** + * 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; } } } @@ -11134,201 +4438,6 @@ export namespace google { public static decode(r: ($protobuf.Reader|Uint8Array), l?: number): google.protobuf.Any; } - /** Properties of a FileOptions. */ - interface IFileOptions { - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [p] Properties to set - */ - constructor(p?: google.protobuf.IFileOptions); - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param m FileOptions message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: google.protobuf.IFileOptions, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is 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.FileOptions; - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [p] Properties to set - */ - constructor(p?: google.protobuf.IMessageOptions); - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param m MessageOptions message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: google.protobuf.IMessageOptions, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is 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.MessageOptions; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [p] Properties to set - */ - constructor(p?: google.protobuf.IFieldOptions); - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param m FieldOptions message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: google.protobuf.IFieldOptions, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is 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.FieldOptions; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [p] Properties to set - */ - constructor(p?: google.protobuf.IEnumOptions); - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param m EnumOptions message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: google.protobuf.IEnumOptions, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is 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.EnumOptions; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [p] Properties to set - */ - constructor(p?: google.protobuf.IEnumValueOptions); - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param m EnumValueOptions message or plain object to encode - * @param [w] Writer to encode to - * @returns Writer - */ - public static encode(m: google.protobuf.IEnumValueOptions, w?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param r Reader or buffer to decode from - * @param [l] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is 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.EnumValueOptions; - } - /** Properties of a Timestamp. */ interface ITimestamp { diff --git a/packages/demo-protobuf/src/generated/codecimpl.js b/packages/demo-protobuf/src/generated/codecimpl.js index 3c767e1e..99911965 100644 --- a/packages/demo-protobuf/src/generated/codecimpl.js +++ b/packages/demo-protobuf/src/generated/codecimpl.js @@ -18,1526 +18,1660 @@ $root.cosmos_sdk = (function() { */ var cosmos_sdk = {}; - cosmos_sdk.codec = (function() { + cosmos_sdk.x = (function() { /** - * Namespace codec. + * Namespace x. * @memberof cosmos_sdk * @namespace */ - var codec = {}; + var x = {}; - codec.v1 = (function() { + x.bank = (function() { /** - * Namespace v1. - * @memberof cosmos_sdk.codec + * Namespace bank. + * @memberof cosmos_sdk.x * @namespace */ - var v1 = {}; + var bank = {}; - v1.Dog = (function() { + bank.v1 = (function() { /** - * Properties of a Dog. - * @memberof cosmos_sdk.codec.v1 - * @interface IDog - * @property {string|null} [size] Dog size - * @property {string|null} [name] Dog name + * Namespace v1. + * @memberof cosmos_sdk.x.bank + * @namespace */ + var v1 = {}; - /** - * Constructs a new Dog. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents a Dog. - * @implements IDog - * @constructor - * @param {cosmos_sdk.codec.v1.IDog=} [p] Properties to set - */ - function Dog(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]]; - } + v1.MsgSend = (function() { - /** - * Dog size. - * @member {string} size - * @memberof cosmos_sdk.codec.v1.Dog - * @instance - */ - Dog.prototype.size = ""; + /** + * Properties of a MsgSend. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IMsgSend + * @property {Uint8Array|null} [fromAddress] MsgSend fromAddress + * @property {Uint8Array|null} [toAddress] MsgSend toAddress + * @property {Array.|null} [amount] MsgSend amount + */ - /** - * Dog name. - * @member {string} name - * @memberof cosmos_sdk.codec.v1.Dog - * @instance - */ - Dog.prototype.name = ""; - - /** - * Creates a new Dog instance using the specified properties. - * @function create - * @memberof cosmos_sdk.codec.v1.Dog - * @static - * @param {cosmos_sdk.codec.v1.IDog=} [properties] Properties to set - * @returns {cosmos_sdk.codec.v1.Dog} Dog instance - */ - Dog.create = function create(properties) { - return new Dog(properties); - }; - - /** - * Encodes the specified Dog message. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.codec.v1.Dog - * @static - * @param {cosmos_sdk.codec.v1.IDog} m Dog message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Dog.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.size != null && Object.hasOwnProperty.call(m, "size")) - w.uint32(10).string(m.size); - if (m.name != null && Object.hasOwnProperty.call(m, "name")) - w.uint32(18).string(m.name); - return w; - }; - - /** - * Decodes a Dog message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.codec.v1.Dog - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.codec.v1.Dog} Dog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Dog.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.codec.v1.Dog(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.size = r.string(); - break; - case 2: - m.name = r.string(); - break; - default: - r.skipType(t & 7); - break; - } + /** + * Constructs a new MsgSend. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a MsgSend. + * @implements IMsgSend + * @constructor + * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [p] Properties to set + */ + 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]]; } - return m; - }; - return Dog; - })(); + /** + * MsgSend fromAddress. + * @member {Uint8Array} fromAddress + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @instance + */ + MsgSend.prototype.fromAddress = $util.newBuffer([]); - v1.Cat = (function() { + /** + * MsgSend toAddress. + * @member {Uint8Array} toAddress + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @instance + */ + MsgSend.prototype.toAddress = $util.newBuffer([]); - /** - * Properties of a Cat. - * @memberof cosmos_sdk.codec.v1 - * @interface ICat - * @property {string|null} [moniker] Cat moniker - * @property {number|null} [lives] Cat lives - */ + /** + * MsgSend amount. + * @member {Array.} amount + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @instance + */ + MsgSend.prototype.amount = $util.emptyArray; - /** - * Constructs a new Cat. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents a Cat. - * @implements ICat - * @constructor - * @param {cosmos_sdk.codec.v1.ICat=} [p] Properties to set - */ - function Cat(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]]; - } + /** + * Creates a new MsgSend instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend instance + */ + MsgSend.create = function create(properties) { + return new MsgSend(properties); + }; - /** - * Cat moniker. - * @member {string} moniker - * @memberof cosmos_sdk.codec.v1.Cat - * @instance - */ - Cat.prototype.moniker = ""; - - /** - * Cat lives. - * @member {number} lives - * @memberof cosmos_sdk.codec.v1.Cat - * @instance - */ - Cat.prototype.lives = 0; - - /** - * Creates a new Cat instance using the specified properties. - * @function create - * @memberof cosmos_sdk.codec.v1.Cat - * @static - * @param {cosmos_sdk.codec.v1.ICat=} [properties] Properties to set - * @returns {cosmos_sdk.codec.v1.Cat} Cat instance - */ - Cat.create = function create(properties) { - return new Cat(properties); - }; - - /** - * Encodes the specified Cat message. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.codec.v1.Cat - * @static - * @param {cosmos_sdk.codec.v1.ICat} m Cat message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Cat.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.moniker != null && Object.hasOwnProperty.call(m, "moniker")) - w.uint32(10).string(m.moniker); - if (m.lives != null && Object.hasOwnProperty.call(m, "lives")) - w.uint32(16).int32(m.lives); - return w; - }; - - /** - * Decodes a Cat message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.codec.v1.Cat - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.codec.v1.Cat} Cat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Cat.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.codec.v1.Cat(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.moniker = r.string(); - break; - case 2: - m.lives = r.int32(); - break; - default: - r.skipType(t & 7); - break; + /** + * Encodes the specified MsgSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgSend} m MsgSend message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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 m; - }; + return w; + }; - return Cat; - })(); - - v1.HasAnimal = (function() { - - /** - * Properties of a HasAnimal. - * @memberof cosmos_sdk.codec.v1 - * @interface IHasAnimal - * @property {google.protobuf.IAny|null} [animal] HasAnimal animal - * @property {number|Long|null} [x] HasAnimal x - */ - - /** - * Constructs a new HasAnimal. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents a HasAnimal. - * @implements IHasAnimal - * @constructor - * @param {cosmos_sdk.codec.v1.IHasAnimal=} [p] Properties to set - */ - function HasAnimal(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]]; - } - - /** - * HasAnimal animal. - * @member {google.protobuf.IAny|null|undefined} animal - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @instance - */ - HasAnimal.prototype.animal = null; - - /** - * HasAnimal x. - * @member {number|Long} x - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @instance - */ - HasAnimal.prototype.x = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new HasAnimal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @static - * @param {cosmos_sdk.codec.v1.IHasAnimal=} [properties] Properties to set - * @returns {cosmos_sdk.codec.v1.HasAnimal} HasAnimal instance - */ - HasAnimal.create = function create(properties) { - return new HasAnimal(properties); - }; - - /** - * Encodes the specified HasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @static - * @param {cosmos_sdk.codec.v1.IHasAnimal} m HasAnimal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HasAnimal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.animal != null && Object.hasOwnProperty.call(m, "animal")) - $root.google.protobuf.Any.encode(m.animal, w.uint32(10).fork()).ldelim(); - if (m.x != null && Object.hasOwnProperty.call(m, "x")) - w.uint32(16).int64(m.x); - return w; - }; - - /** - * Decodes a HasAnimal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.codec.v1.HasAnimal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.codec.v1.HasAnimal} HasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HasAnimal.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.codec.v1.HasAnimal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.animal = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - case 2: - m.x = r.int64(); - break; - default: - r.skipType(t & 7); - break; + /** + * Decodes a MsgSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.MsgSend + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgSend.decode = function decode(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() { + + /** + * Properties of an Input. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IInput + * @property {Uint8Array|null} [address] Input address + * @property {Array.|null} [coins] Input coins + */ + + /** + * Constructs a new Input. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents an Input. + * @implements IInput + * @constructor + * @param {cosmos_sdk.x.bank.v1.IInput=} [p] Properties to set + */ + 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]]; } - return m; - }; - return HasAnimal; - })(); + /** + * Input address. + * @member {Uint8Array} address + * @memberof cosmos_sdk.x.bank.v1.Input + * @instance + */ + Input.prototype.address = $util.newBuffer([]); - v1.HasHasAnimal = (function() { + /** + * Input coins. + * @member {Array.} coins + * @memberof cosmos_sdk.x.bank.v1.Input + * @instance + */ + Input.prototype.coins = $util.emptyArray; - /** - * Properties of a HasHasAnimal. - * @memberof cosmos_sdk.codec.v1 - * @interface IHasHasAnimal - * @property {google.protobuf.IAny|null} [hasAnimal] HasHasAnimal hasAnimal - */ + /** + * Creates a new Input instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {cosmos_sdk.x.bank.v1.IInput=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.Input} Input instance + */ + Input.create = function create(properties) { + return new Input(properties); + }; - /** - * Constructs a new HasHasAnimal. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents a HasHasAnimal. - * @implements IHasHasAnimal - * @constructor - * @param {cosmos_sdk.codec.v1.IHasHasAnimal=} [p] Properties to set - */ - function HasHasAnimal(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]]; - } - - /** - * HasHasAnimal hasAnimal. - * @member {google.protobuf.IAny|null|undefined} hasAnimal - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @instance - */ - HasHasAnimal.prototype.hasAnimal = null; - - /** - * Creates a new HasHasAnimal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @static - * @param {cosmos_sdk.codec.v1.IHasHasAnimal=} [properties] Properties to set - * @returns {cosmos_sdk.codec.v1.HasHasAnimal} HasHasAnimal instance - */ - HasHasAnimal.create = function create(properties) { - return new HasHasAnimal(properties); - }; - - /** - * Encodes the specified HasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @static - * @param {cosmos_sdk.codec.v1.IHasHasAnimal} m HasHasAnimal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HasHasAnimal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.hasAnimal != null && Object.hasOwnProperty.call(m, "hasAnimal")) - $root.google.protobuf.Any.encode(m.hasAnimal, w.uint32(10).fork()).ldelim(); - return w; - }; - - /** - * Decodes a HasHasAnimal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.codec.v1.HasHasAnimal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.codec.v1.HasHasAnimal} HasHasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HasHasAnimal.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.codec.v1.HasHasAnimal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.hasAnimal = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; + /** + * Encodes the specified Input message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {cosmos_sdk.x.bank.v1.IInput} m Input message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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 m; - }; + return w; + }; - return HasHasAnimal; - })(); - - v1.HasHasHasAnimal = (function() { - - /** - * Properties of a HasHasHasAnimal. - * @memberof cosmos_sdk.codec.v1 - * @interface IHasHasHasAnimal - * @property {google.protobuf.IAny|null} [hasHasAnimal] HasHasHasAnimal hasHasAnimal - */ - - /** - * Constructs a new HasHasHasAnimal. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents a HasHasHasAnimal. - * @implements IHasHasHasAnimal - * @constructor - * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal=} [p] Properties to set - */ - function HasHasHasAnimal(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]]; - } - - /** - * HasHasHasAnimal hasHasAnimal. - * @member {google.protobuf.IAny|null|undefined} hasHasAnimal - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @instance - */ - HasHasHasAnimal.prototype.hasHasAnimal = null; - - /** - * Creates a new HasHasHasAnimal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @static - * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal=} [properties] Properties to set - * @returns {cosmos_sdk.codec.v1.HasHasHasAnimal} HasHasHasAnimal instance - */ - HasHasHasAnimal.create = function create(properties) { - return new HasHasHasAnimal(properties); - }; - - /** - * Encodes the specified HasHasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @static - * @param {cosmos_sdk.codec.v1.IHasHasHasAnimal} m HasHasHasAnimal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HasHasHasAnimal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.hasHasAnimal != null && Object.hasOwnProperty.call(m, "hasHasAnimal")) - $root.google.protobuf.Any.encode(m.hasHasAnimal, w.uint32(10).fork()).ldelim(); - return w; - }; - - /** - * Decodes a HasHasHasAnimal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.codec.v1.HasHasHasAnimal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.codec.v1.HasHasHasAnimal} HasHasHasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HasHasHasAnimal.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.codec.v1.HasHasHasAnimal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.hasHasAnimal = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; + /** + * Decodes an Input message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.Input + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.Input} Input + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Input.decode = function decode(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() { + + /** + * Properties of an Output. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IOutput + * @property {Uint8Array|null} [address] Output address + * @property {Array.|null} [coins] Output coins + */ + + /** + * Constructs a new Output. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents an Output. + * @implements IOutput + * @constructor + * @param {cosmos_sdk.x.bank.v1.IOutput=} [p] Properties to set + */ + 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]]; } - return m; - }; - return HasHasHasAnimal; - })(); + /** + * Output address. + * @member {Uint8Array} address + * @memberof cosmos_sdk.x.bank.v1.Output + * @instance + */ + Output.prototype.address = $util.newBuffer([]); - v1.TestService = (function() { + /** + * Output coins. + * @member {Array.} coins + * @memberof cosmos_sdk.x.bank.v1.Output + * @instance + */ + Output.prototype.coins = $util.emptyArray; - /** - * Constructs a new TestService service. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents a TestService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function TestService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * Creates a new Output instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {cosmos_sdk.x.bank.v1.IOutput=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.Output} Output instance + */ + Output.create = function create(properties) { + return new Output(properties); + }; - (TestService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = TestService; - - /** - * Creates new TestService service using the specified rpc implementation. - * @function create - * @memberof cosmos_sdk.codec.v1.TestService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {TestService} RPC service. Useful where requests and/or responses are streamed. - */ - TestService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link cosmos_sdk.codec.v1.TestService#echo}. - * @memberof cosmos_sdk.codec.v1.TestService - * @typedef EchoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos_sdk.codec.v1.EchoResponse} [response] EchoResponse - */ - - /** - * Calls Echo. - * @function echo - * @memberof cosmos_sdk.codec.v1.TestService - * @instance - * @param {cosmos_sdk.codec.v1.IEchoRequest} request EchoRequest message or plain object - * @param {cosmos_sdk.codec.v1.TestService.EchoCallback} callback Node-style callback called with the error, if any, and EchoResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestService.prototype.echo = function echo(request, callback) { - return this.rpcCall(echo, $root.cosmos_sdk.codec.v1.EchoRequest, $root.cosmos_sdk.codec.v1.EchoResponse, request, callback); - }, "name", { value: "Echo" }); - - /** - * Calls Echo. - * @function echo - * @memberof cosmos_sdk.codec.v1.TestService - * @instance - * @param {cosmos_sdk.codec.v1.IEchoRequest} request EchoRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos_sdk.codec.v1.TestService#sayHello}. - * @memberof cosmos_sdk.codec.v1.TestService - * @typedef SayHelloCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos_sdk.codec.v1.SayHelloResponse} [response] SayHelloResponse - */ - - /** - * Calls SayHello. - * @function sayHello - * @memberof cosmos_sdk.codec.v1.TestService - * @instance - * @param {cosmos_sdk.codec.v1.ISayHelloRequest} request SayHelloRequest message or plain object - * @param {cosmos_sdk.codec.v1.TestService.SayHelloCallback} callback Node-style callback called with the error, if any, and SayHelloResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(TestService.prototype.sayHello = function sayHello(request, callback) { - return this.rpcCall(sayHello, $root.cosmos_sdk.codec.v1.SayHelloRequest, $root.cosmos_sdk.codec.v1.SayHelloResponse, request, callback); - }, "name", { value: "SayHello" }); - - /** - * Calls SayHello. - * @function sayHello - * @memberof cosmos_sdk.codec.v1.TestService - * @instance - * @param {cosmos_sdk.codec.v1.ISayHelloRequest} request SayHelloRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return TestService; - })(); - - v1.EchoRequest = (function() { - - /** - * Properties of an EchoRequest. - * @memberof cosmos_sdk.codec.v1 - * @interface IEchoRequest - * @property {string|null} [message] EchoRequest message - */ - - /** - * Constructs a new EchoRequest. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents an EchoRequest. - * @implements IEchoRequest - * @constructor - * @param {cosmos_sdk.codec.v1.IEchoRequest=} [p] Properties to set - */ - function EchoRequest(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]]; - } - - /** - * EchoRequest message. - * @member {string} message - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @instance - */ - EchoRequest.prototype.message = ""; - - /** - * Creates a new EchoRequest instance using the specified properties. - * @function create - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @static - * @param {cosmos_sdk.codec.v1.IEchoRequest=} [properties] Properties to set - * @returns {cosmos_sdk.codec.v1.EchoRequest} EchoRequest instance - */ - EchoRequest.create = function create(properties) { - return new EchoRequest(properties); - }; - - /** - * Encodes the specified EchoRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @static - * @param {cosmos_sdk.codec.v1.IEchoRequest} m EchoRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EchoRequest.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; - }; - - /** - * Decodes an EchoRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.codec.v1.EchoRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.codec.v1.EchoRequest} EchoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EchoRequest.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.codec.v1.EchoRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.message = r.string(); - break; - default: - r.skipType(t & 7); - break; + /** + * Encodes the specified Output message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {cosmos_sdk.x.bank.v1.IOutput} m Output message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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 m; - }; + return w; + }; - return EchoRequest; - })(); - - v1.EchoResponse = (function() { - - /** - * Properties of an EchoResponse. - * @memberof cosmos_sdk.codec.v1 - * @interface IEchoResponse - * @property {string|null} [message] EchoResponse message - */ - - /** - * Constructs a new EchoResponse. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents an EchoResponse. - * @implements IEchoResponse - * @constructor - * @param {cosmos_sdk.codec.v1.IEchoResponse=} [p] Properties to set - */ - function EchoResponse(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]]; - } - - /** - * EchoResponse message. - * @member {string} message - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @instance - */ - EchoResponse.prototype.message = ""; - - /** - * Creates a new EchoResponse instance using the specified properties. - * @function create - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @static - * @param {cosmos_sdk.codec.v1.IEchoResponse=} [properties] Properties to set - * @returns {cosmos_sdk.codec.v1.EchoResponse} EchoResponse instance - */ - EchoResponse.create = function create(properties) { - return new EchoResponse(properties); - }; - - /** - * Encodes the specified EchoResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @static - * @param {cosmos_sdk.codec.v1.IEchoResponse} m EchoResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EchoResponse.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; - }; - - /** - * Decodes an EchoResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.codec.v1.EchoResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.codec.v1.EchoResponse} EchoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EchoResponse.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.codec.v1.EchoResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.message = r.string(); - break; - default: - r.skipType(t & 7); - break; + /** + * Decodes an Output message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.Output + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.Output} Output + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Output.decode = function decode(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() { + + /** + * Properties of a MsgMultiSend. + * @memberof cosmos_sdk.x.bank.v1 + * @interface IMsgMultiSend + * @property {Array.|null} [inputs] MsgMultiSend inputs + * @property {Array.|null} [outputs] MsgMultiSend outputs + */ + + /** + * Constructs a new MsgMultiSend. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a MsgMultiSend. + * @implements IMsgMultiSend + * @constructor + * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [p] Properties to set + */ + 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]]; } - return m; - }; - return EchoResponse; - })(); + /** + * MsgMultiSend inputs. + * @member {Array.} inputs + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.inputs = $util.emptyArray; - v1.SayHelloRequest = (function() { + /** + * MsgMultiSend outputs. + * @member {Array.} outputs + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @instance + */ + MsgMultiSend.prototype.outputs = $util.emptyArray; - /** - * Properties of a SayHelloRequest. - * @memberof cosmos_sdk.codec.v1 - * @interface ISayHelloRequest - * @property {string|null} [name] SayHelloRequest name - */ + /** + * Creates a new MsgMultiSend instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend instance + */ + MsgMultiSend.create = function create(properties) { + return new MsgMultiSend(properties); + }; - /** - * Constructs a new SayHelloRequest. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents a SayHelloRequest. - * @implements ISayHelloRequest - * @constructor - * @param {cosmos_sdk.codec.v1.ISayHelloRequest=} [p] Properties to set - */ - function SayHelloRequest(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]]; - } - - /** - * SayHelloRequest name. - * @member {string} name - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @instance - */ - SayHelloRequest.prototype.name = ""; - - /** - * Creates a new SayHelloRequest instance using the specified properties. - * @function create - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @static - * @param {cosmos_sdk.codec.v1.ISayHelloRequest=} [properties] Properties to set - * @returns {cosmos_sdk.codec.v1.SayHelloRequest} SayHelloRequest instance - */ - SayHelloRequest.create = function create(properties) { - return new SayHelloRequest(properties); - }; - - /** - * Encodes the specified SayHelloRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @static - * @param {cosmos_sdk.codec.v1.ISayHelloRequest} m SayHelloRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SayHelloRequest.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.name != null && Object.hasOwnProperty.call(m, "name")) - w.uint32(10).string(m.name); - return w; - }; - - /** - * Decodes a SayHelloRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.codec.v1.SayHelloRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.codec.v1.SayHelloRequest} SayHelloRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SayHelloRequest.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.codec.v1.SayHelloRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.name = r.string(); - break; - default: - r.skipType(t & 7); - break; + /** + * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend} m MsgMultiSend message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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(); } - } - return m; - }; - - return SayHelloRequest; - })(); - - v1.SayHelloResponse = (function() { - - /** - * Properties of a SayHelloResponse. - * @memberof cosmos_sdk.codec.v1 - * @interface ISayHelloResponse - * @property {string|null} [greeting] SayHelloResponse greeting - */ - - /** - * Constructs a new SayHelloResponse. - * @memberof cosmos_sdk.codec.v1 - * @classdesc Represents a SayHelloResponse. - * @implements ISayHelloResponse - * @constructor - * @param {cosmos_sdk.codec.v1.ISayHelloResponse=} [p] Properties to set - */ - function SayHelloResponse(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]]; - } - - /** - * SayHelloResponse greeting. - * @member {string} greeting - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @instance - */ - SayHelloResponse.prototype.greeting = ""; - - /** - * Creates a new SayHelloResponse instance using the specified properties. - * @function create - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @static - * @param {cosmos_sdk.codec.v1.ISayHelloResponse=} [properties] Properties to set - * @returns {cosmos_sdk.codec.v1.SayHelloResponse} SayHelloResponse instance - */ - SayHelloResponse.create = function create(properties) { - return new SayHelloResponse(properties); - }; - - /** - * Encodes the specified SayHelloResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @static - * @param {cosmos_sdk.codec.v1.ISayHelloResponse} m SayHelloResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SayHelloResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.greeting != null && Object.hasOwnProperty.call(m, "greeting")) - w.uint32(10).string(m.greeting); - return w; - }; - - /** - * Decodes a SayHelloResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.codec.v1.SayHelloResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.codec.v1.SayHelloResponse} SayHelloResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SayHelloResponse.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.codec.v1.SayHelloResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.greeting = r.string(); - break; - default: - r.skipType(t & 7); - break; + 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 m; - }; + return w; + }; - return SayHelloResponse; + /** + * Decodes a MsgMultiSend message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgMultiSend.decode = function decode(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() { + + /** + * Properties of a Supply. + * @memberof cosmos_sdk.x.bank.v1 + * @interface ISupply + * @property {Array.|null} [total] Supply total + */ + + /** + * Constructs a new Supply. + * @memberof cosmos_sdk.x.bank.v1 + * @classdesc Represents a Supply. + * @implements ISupply + * @constructor + * @param {cosmos_sdk.x.bank.v1.ISupply=} [p] Properties to set + */ + 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 total. + * @member {Array.} total + * @memberof cosmos_sdk.x.bank.v1.Supply + * @instance + */ + Supply.prototype.total = $util.emptyArray; + + /** + * Creates a new Supply instance using the specified properties. + * @function create + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {cosmos_sdk.x.bank.v1.ISupply=} [properties] Properties to set + * @returns {cosmos_sdk.x.bank.v1.Supply} Supply instance + */ + Supply.create = function create(properties) { + return new Supply(properties); + }; + + /** + * Encodes the specified Supply message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {cosmos_sdk.x.bank.v1.ISupply} m Supply message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a Supply message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.x.bank.v1.Supply + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.x.bank.v1.Supply} Supply + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Supply.decode = function decode(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 v1; + return bank; })(); - return codec; + return x; })(); - cosmos_sdk.crypto = (function() { + cosmos_sdk.v1 = (function() { /** - * Namespace crypto. + * Namespace v1. * @memberof cosmos_sdk * @namespace */ - var crypto = {}; + var v1 = {}; - crypto.v1 = (function() { + v1.Coin = (function() { /** - * Namespace v1. - * @memberof cosmos_sdk.crypto - * @namespace + * Properties of a Coin. + * @memberof cosmos_sdk.v1 + * @interface ICoin + * @property {string|null} [denom] Coin denom + * @property {string|null} [amount] Coin amount */ - var v1 = {}; - v1.PublicKey = (function() { + /** + * Constructs a new Coin. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a Coin. + * @implements ICoin + * @constructor + * @param {cosmos_sdk.v1.ICoin=} [p] Properties to set + */ + 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]]; + } - /** - * Properties of a PublicKey. - * @memberof cosmos_sdk.crypto.v1 - * @interface IPublicKey - * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 - * @property {Uint8Array|null} [ed25519] PublicKey ed25519 - * @property {Uint8Array|null} [sr25519] PublicKey sr25519 - * @property {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null} [multisig] PublicKey multisig - * @property {Uint8Array|null} [secp256r1] PublicKey secp256r1 - * @property {google.protobuf.IAny|null} [anyPubkey] PublicKey anyPubkey - */ + /** + * Coin denom. + * @member {string} denom + * @memberof cosmos_sdk.v1.Coin + * @instance + */ + Coin.prototype.denom = ""; - /** - * Constructs a new PublicKey. - * @memberof cosmos_sdk.crypto.v1 - * @classdesc Represents a PublicKey. - * @implements IPublicKey - * @constructor - * @param {cosmos_sdk.crypto.v1.IPublicKey=} [p] Properties to set - */ - 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]]; + /** + * Coin amount. + * @member {string} amount + * @memberof cosmos_sdk.v1.Coin + * @instance + */ + Coin.prototype.amount = ""; + + /** + * Creates a new Coin instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {cosmos_sdk.v1.ICoin=} [properties] Properties to set + * @returns {cosmos_sdk.v1.Coin} Coin instance + */ + Coin.create = function create(properties) { + return new Coin(properties); + }; + + /** + * Encodes the specified Coin message. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {cosmos_sdk.v1.ICoin} m Coin message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a Coin message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.Coin + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.Coin} Coin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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; + }; - /** - * PublicKey secp256k1. - * @member {Uint8Array} secp256k1 - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.secp256k1 = $util.newBuffer([]); - - /** - * PublicKey ed25519. - * @member {Uint8Array} ed25519 - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.ed25519 = $util.newBuffer([]); - - /** - * PublicKey sr25519. - * @member {Uint8Array} sr25519 - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.sr25519 = $util.newBuffer([]); - - /** - * PublicKey multisig. - * @member {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null|undefined} multisig - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.multisig = null; - - /** - * PublicKey secp256r1. - * @member {Uint8Array} secp256r1 - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.secp256r1 = $util.newBuffer([]); - - /** - * PublicKey anyPubkey. - * @member {google.protobuf.IAny|null|undefined} anyPubkey - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.anyPubkey = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PublicKey sum. - * @member {"secp256k1"|"ed25519"|"sr25519"|"multisig"|"secp256r1"|"anyPubkey"|undefined} sum - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - Object.defineProperty(PublicKey.prototype, "sum", { - get: $util.oneOfGetter($oneOfFields = ["secp256k1", "ed25519", "sr25519", "multisig", "secp256r1", "anyPubkey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PublicKey instance using the specified properties. - * @function create - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {cosmos_sdk.crypto.v1.IPublicKey=} [properties] Properties to set - * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey instance - */ - PublicKey.create = function create(properties) { - return new PublicKey(properties); - }; - - /** - * Encodes the specified PublicKey message. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {cosmos_sdk.crypto.v1.IPublicKey} m PublicKey message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a PublicKey message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a PubKeyMultisigThreshold. - * @memberof cosmos_sdk.crypto.v1 - * @interface IPubKeyMultisigThreshold - * @property {number|null} [threshold] PubKeyMultisigThreshold threshold - * @property {Array.|null} [publicKeys] PubKeyMultisigThreshold publicKeys - */ - - /** - * Constructs a new PubKeyMultisigThreshold. - * @memberof cosmos_sdk.crypto.v1 - * @classdesc Represents a PubKeyMultisigThreshold. - * @implements IPubKeyMultisigThreshold - * @constructor - * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [p] Properties to set - */ - 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 threshold. - * @member {number} threshold - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @instance - */ - PubKeyMultisigThreshold.prototype.threshold = 0; - - /** - * PubKeyMultisigThreshold publicKeys. - * @member {Array.} publicKeys - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @instance - */ - PubKeyMultisigThreshold.prototype.publicKeys = $util.emptyArray; - - /** - * Creates a new PubKeyMultisigThreshold instance using the specified properties. - * @function create - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [properties] Properties to set - * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold instance - */ - PubKeyMultisigThreshold.create = function create(properties) { - return new PubKeyMultisigThreshold(properties); - }; - - /** - * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold} m PubKeyMultisigThreshold message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a MultiSignature. - * @memberof cosmos_sdk.crypto.v1 - * @interface IMultiSignature - * @property {Array.|null} [signatures] MultiSignature signatures - */ - - /** - * Constructs a new MultiSignature. - * @memberof cosmos_sdk.crypto.v1 - * @classdesc Represents a MultiSignature. - * @implements IMultiSignature - * @constructor - * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [p] Properties to set - */ - 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 signatures. - * @member {Array.} signatures - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @instance - */ - MultiSignature.prototype.signatures = $util.emptyArray; - - /** - * Creates a new MultiSignature instance using the specified properties. - * @function create - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [properties] Properties to set - * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature instance - */ - MultiSignature.create = function create(properties) { - return new MultiSignature(properties); - }; - - /** - * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {cosmos_sdk.crypto.v1.IMultiSignature} m MultiSignature message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a MultiSignature message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a CompactBitArray. - * @memberof cosmos_sdk.crypto.v1 - * @interface ICompactBitArray - * @property {number|null} [extraBitsStored] CompactBitArray extraBitsStored - * @property {Uint8Array|null} [elems] CompactBitArray elems - */ - - /** - * Constructs a new CompactBitArray. - * @memberof cosmos_sdk.crypto.v1 - * @classdesc Represents a CompactBitArray. - * @implements ICompactBitArray - * @constructor - * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [p] Properties to set - */ - 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 extraBitsStored. - * @member {number} extraBitsStored - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @instance - */ - CompactBitArray.prototype.extraBitsStored = 0; - - /** - * CompactBitArray elems. - * @member {Uint8Array} elems - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @instance - */ - CompactBitArray.prototype.elems = $util.newBuffer([]); - - /** - * Creates a new CompactBitArray instance using the specified properties. - * @function create - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [properties] Properties to set - * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray instance - */ - CompactBitArray.create = function create(properties) { - return new CompactBitArray(properties); - }; - - /** - * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {cosmos_sdk.crypto.v1.ICompactBitArray} m CompactBitArray message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a CompactBitArray message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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 Coin; })(); - return crypto; + v1.DecCoin = (function() { + + /** + * Properties of a DecCoin. + * @memberof cosmos_sdk.v1 + * @interface IDecCoin + * @property {string|null} [denom] DecCoin denom + * @property {string|null} [amount] DecCoin amount + */ + + /** + * Constructs a new DecCoin. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a DecCoin. + * @implements IDecCoin + * @constructor + * @param {cosmos_sdk.v1.IDecCoin=} [p] Properties to set + */ + 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 denom. + * @member {string} denom + * @memberof cosmos_sdk.v1.DecCoin + * @instance + */ + DecCoin.prototype.denom = ""; + + /** + * DecCoin amount. + * @member {string} amount + * @memberof cosmos_sdk.v1.DecCoin + * @instance + */ + DecCoin.prototype.amount = ""; + + /** + * Creates a new DecCoin instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {cosmos_sdk.v1.IDecCoin=} [properties] Properties to set + * @returns {cosmos_sdk.v1.DecCoin} DecCoin instance + */ + DecCoin.create = function create(properties) { + return new DecCoin(properties); + }; + + /** + * Encodes the specified DecCoin message. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {cosmos_sdk.v1.IDecCoin} m DecCoin message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a DecCoin message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.DecCoin + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.DecCoin} DecCoin + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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() { + + /** + * Properties of an IntProto. + * @memberof cosmos_sdk.v1 + * @interface IIntProto + * @property {string|null} [int] IntProto int + */ + + /** + * Constructs a new IntProto. + * @memberof cosmos_sdk.v1 + * @classdesc Represents an IntProto. + * @implements IIntProto + * @constructor + * @param {cosmos_sdk.v1.IIntProto=} [p] Properties to set + */ + 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 int. + * @member {string} int + * @memberof cosmos_sdk.v1.IntProto + * @instance + */ + IntProto.prototype.int = ""; + + /** + * Creates a new IntProto instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {cosmos_sdk.v1.IIntProto=} [properties] Properties to set + * @returns {cosmos_sdk.v1.IntProto} IntProto instance + */ + IntProto.create = function create(properties) { + return new IntProto(properties); + }; + + /** + * Encodes the specified IntProto message. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {cosmos_sdk.v1.IIntProto} m IntProto message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes an IntProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.IntProto + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.IntProto} IntProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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() { + + /** + * Properties of a DecProto. + * @memberof cosmos_sdk.v1 + * @interface IDecProto + * @property {string|null} [dec] DecProto dec + */ + + /** + * Constructs a new DecProto. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a DecProto. + * @implements IDecProto + * @constructor + * @param {cosmos_sdk.v1.IDecProto=} [p] Properties to set + */ + 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 dec. + * @member {string} dec + * @memberof cosmos_sdk.v1.DecProto + * @instance + */ + DecProto.prototype.dec = ""; + + /** + * Creates a new DecProto instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {cosmos_sdk.v1.IDecProto=} [properties] Properties to set + * @returns {cosmos_sdk.v1.DecProto} DecProto instance + */ + DecProto.create = function create(properties) { + return new DecProto(properties); + }; + + /** + * Encodes the specified DecProto message. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {cosmos_sdk.v1.IDecProto} m DecProto message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a DecProto message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.DecProto + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.DecProto} DecProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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() { + + /** + * Properties of a ValAddresses. + * @memberof cosmos_sdk.v1 + * @interface IValAddresses + * @property {Array.|null} [addresses] ValAddresses addresses + */ + + /** + * Constructs a new ValAddresses. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a ValAddresses. + * @implements IValAddresses + * @constructor + * @param {cosmos_sdk.v1.IValAddresses=} [p] Properties to set + */ + 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 addresses. + * @member {Array.} addresses + * @memberof cosmos_sdk.v1.ValAddresses + * @instance + */ + ValAddresses.prototype.addresses = $util.emptyArray; + + /** + * Creates a new ValAddresses instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {cosmos_sdk.v1.IValAddresses=} [properties] Properties to set + * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses instance + */ + ValAddresses.create = function create(properties) { + return new ValAddresses(properties); + }; + + /** + * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {cosmos_sdk.v1.IValAddresses} m ValAddresses message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a ValAddresses message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.ValAddresses + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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() { + + /** + * Properties of a GasInfo. + * @memberof cosmos_sdk.v1 + * @interface IGasInfo + * @property {number|Long|null} [gasWanted] GasInfo gasWanted + * @property {number|Long|null} [gasUsed] GasInfo gasUsed + */ + + /** + * Constructs a new GasInfo. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a GasInfo. + * @implements IGasInfo + * @constructor + * @param {cosmos_sdk.v1.IGasInfo=} [p] Properties to set + */ + 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 gasWanted. + * @member {number|Long} gasWanted + * @memberof cosmos_sdk.v1.GasInfo + * @instance + */ + GasInfo.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GasInfo gasUsed. + * @member {number|Long} gasUsed + * @memberof cosmos_sdk.v1.GasInfo + * @instance + */ + GasInfo.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * Creates a new GasInfo instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {cosmos_sdk.v1.IGasInfo=} [properties] Properties to set + * @returns {cosmos_sdk.v1.GasInfo} GasInfo instance + */ + GasInfo.create = function create(properties) { + return new GasInfo(properties); + }; + + /** + * Encodes the specified GasInfo message. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {cosmos_sdk.v1.IGasInfo} m GasInfo message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a GasInfo message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.GasInfo + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.GasInfo} GasInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GasInfo.decode = function decode(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() { + + /** + * Properties of a Result. + * @memberof cosmos_sdk.v1 + * @interface IResult + * @property {Uint8Array|null} [data] Result data + * @property {string|null} [log] Result log + * @property {Array.|null} [events] Result events + */ + + /** + * Constructs a new Result. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a Result. + * @implements IResult + * @constructor + * @param {cosmos_sdk.v1.IResult=} [p] Properties to set + */ + 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 data. + * @member {Uint8Array} data + * @memberof cosmos_sdk.v1.Result + * @instance + */ + Result.prototype.data = $util.newBuffer([]); + + /** + * Result log. + * @member {string} log + * @memberof cosmos_sdk.v1.Result + * @instance + */ + Result.prototype.log = ""; + + /** + * Result events. + * @member {Array.} events + * @memberof cosmos_sdk.v1.Result + * @instance + */ + Result.prototype.events = $util.emptyArray; + + /** + * Creates a new Result instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.Result + * @static + * @param {cosmos_sdk.v1.IResult=} [properties] Properties to set + * @returns {cosmos_sdk.v1.Result} Result instance + */ + Result.create = function create(properties) { + return new Result(properties); + }; + + /** + * Encodes the specified Result message. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.Result + * @static + * @param {cosmos_sdk.v1.IResult} m Result message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a Result message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.Result + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decode = function decode(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() { + + /** + * Properties of a SimulationResponse. + * @memberof cosmos_sdk.v1 + * @interface ISimulationResponse + * @property {cosmos_sdk.v1.IGasInfo|null} [gasInfo] SimulationResponse gasInfo + * @property {cosmos_sdk.v1.IResult|null} [result] SimulationResponse result + */ + + /** + * Constructs a new SimulationResponse. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a SimulationResponse. + * @implements ISimulationResponse + * @constructor + * @param {cosmos_sdk.v1.ISimulationResponse=} [p] Properties to set + */ + 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 gasInfo. + * @member {cosmos_sdk.v1.IGasInfo|null|undefined} gasInfo + * @memberof cosmos_sdk.v1.SimulationResponse + * @instance + */ + SimulationResponse.prototype.gasInfo = null; + + /** + * SimulationResponse result. + * @member {cosmos_sdk.v1.IResult|null|undefined} result + * @memberof cosmos_sdk.v1.SimulationResponse + * @instance + */ + SimulationResponse.prototype.result = null; + + /** + * Creates a new SimulationResponse instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {cosmos_sdk.v1.ISimulationResponse=} [properties] Properties to set + * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse instance + */ + SimulationResponse.create = function create(properties) { + return new SimulationResponse(properties); + }; + + /** + * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {cosmos_sdk.v1.ISimulationResponse} m SimulationResponse message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a SimulationResponse message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.SimulationResponse + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SimulationResponse.decode = function decode(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() { + + /** + * Properties of a MsgData. + * @memberof cosmos_sdk.v1 + * @interface IMsgData + * @property {string|null} [msgType] MsgData msgType + * @property {Uint8Array|null} [data] MsgData data + */ + + /** + * Constructs a new MsgData. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a MsgData. + * @implements IMsgData + * @constructor + * @param {cosmos_sdk.v1.IMsgData=} [p] Properties to set + */ + 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 msgType. + * @member {string} msgType + * @memberof cosmos_sdk.v1.MsgData + * @instance + */ + MsgData.prototype.msgType = ""; + + /** + * MsgData data. + * @member {Uint8Array} data + * @memberof cosmos_sdk.v1.MsgData + * @instance + */ + MsgData.prototype.data = $util.newBuffer([]); + + /** + * Creates a new MsgData instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {cosmos_sdk.v1.IMsgData=} [properties] Properties to set + * @returns {cosmos_sdk.v1.MsgData} MsgData instance + */ + MsgData.create = function create(properties) { + return new MsgData(properties); + }; + + /** + * Encodes the specified MsgData message. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {cosmos_sdk.v1.IMsgData} m MsgData message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a MsgData message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.MsgData + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.MsgData} MsgData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MsgData.decode = function decode(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() { + + /** + * Properties of a TxData. + * @memberof cosmos_sdk.v1 + * @interface ITxData + * @property {Array.|null} [data] TxData data + */ + + /** + * Constructs a new TxData. + * @memberof cosmos_sdk.v1 + * @classdesc Represents a TxData. + * @implements ITxData + * @constructor + * @param {cosmos_sdk.v1.ITxData=} [p] Properties to set + */ + 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 data. + * @member {Array.} data + * @memberof cosmos_sdk.v1.TxData + * @instance + */ + TxData.prototype.data = $util.emptyArray; + + /** + * Creates a new TxData instance using the specified properties. + * @function create + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {cosmos_sdk.v1.ITxData=} [properties] Properties to set + * @returns {cosmos_sdk.v1.TxData} TxData instance + */ + TxData.create = function create(properties) { + return new TxData(properties); + }; + + /** + * Encodes the specified TxData message. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {cosmos_sdk.v1.ITxData} m TxData message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a TxData message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.v1.TxData + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.v1.TxData} TxData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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() { @@ -1549,48 +1683,6 @@ $root.cosmos_sdk = (function() { */ var tx = {}; - tx.signing = (function() { - - /** - * Namespace signing. - * @memberof cosmos_sdk.tx - * @namespace - */ - var signing = {}; - - signing.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.tx.signing - * @namespace - */ - var v1 = {}; - - /** - * SignMode enum. - * @name cosmos_sdk.tx.signing.v1.SignMode - * @enum {number} - * @property {number} SIGN_MODE_UNSPECIFIED=0 SIGN_MODE_UNSPECIFIED value - * @property {number} SIGN_MODE_DIRECT=1 SIGN_MODE_DIRECT value - * @property {number} SIGN_MODE_TEXTUAL=2 SIGN_MODE_TEXTUAL value - * @property {number} SIGN_MODE_LEGACY_AMINO_JSON=127 SIGN_MODE_LEGACY_AMINO_JSON value - */ - 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; - })(); - tx.v1 = (function() { /** @@ -2699,15109 +2791,572 @@ $root.cosmos_sdk = (function() { return v1; })(); + tx.signing = (function() { + + /** + * Namespace signing. + * @memberof cosmos_sdk.tx + * @namespace + */ + var signing = {}; + + signing.v1 = (function() { + + /** + * Namespace v1. + * @memberof cosmos_sdk.tx.signing + * @namespace + */ + var v1 = {}; + + /** + * SignMode enum. + * @name cosmos_sdk.tx.signing.v1.SignMode + * @enum {number} + * @property {number} SIGN_MODE_UNSPECIFIED=0 SIGN_MODE_UNSPECIFIED value + * @property {number} SIGN_MODE_DIRECT=1 SIGN_MODE_DIRECT value + * @property {number} SIGN_MODE_TEXTUAL=2 SIGN_MODE_TEXTUAL value + * @property {number} SIGN_MODE_LEGACY_AMINO_JSON=127 SIGN_MODE_LEGACY_AMINO_JSON value + */ + 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.v1 = (function() { + cosmos_sdk.crypto = (function() { /** - * Namespace v1. + * Namespace crypto. * @memberof cosmos_sdk * @namespace */ - var v1 = {}; + var crypto = {}; - v1.Coin = (function() { + crypto.v1 = (function() { /** - * Properties of a Coin. - * @memberof cosmos_sdk.v1 - * @interface ICoin - * @property {string|null} [denom] Coin denom - * @property {string|null} [amount] Coin amount + * Namespace v1. + * @memberof cosmos_sdk.crypto + * @namespace */ + var v1 = {}; - /** - * Constructs a new Coin. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a Coin. - * @implements ICoin - * @constructor - * @param {cosmos_sdk.v1.ICoin=} [p] Properties to set - */ - 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]]; - } + v1.PublicKey = (function() { - /** - * Coin denom. - * @member {string} denom - * @memberof cosmos_sdk.v1.Coin - * @instance - */ - Coin.prototype.denom = ""; + /** + * Properties of a PublicKey. + * @memberof cosmos_sdk.crypto.v1 + * @interface IPublicKey + * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 + * @property {Uint8Array|null} [ed25519] PublicKey ed25519 + * @property {Uint8Array|null} [sr25519] PublicKey sr25519 + * @property {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null} [multisig] PublicKey multisig + * @property {Uint8Array|null} [secp256r1] PublicKey secp256r1 + * @property {google.protobuf.IAny|null} [anyPubkey] PublicKey anyPubkey + */ - /** - * Coin amount. - * @member {string} amount - * @memberof cosmos_sdk.v1.Coin - * @instance - */ - Coin.prototype.amount = ""; - - /** - * Creates a new Coin instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {cosmos_sdk.v1.ICoin=} [properties] Properties to set - * @returns {cosmos_sdk.v1.Coin} Coin instance - */ - Coin.create = function create(properties) { - return new Coin(properties); - }; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {cosmos_sdk.v1.ICoin} m Coin message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Coin message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.Coin} Coin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; - } + /** + * Constructs a new PublicKey. + * @memberof cosmos_sdk.crypto.v1 + * @classdesc Represents a PublicKey. + * @implements IPublicKey + * @constructor + * @param {cosmos_sdk.crypto.v1.IPublicKey=} [p] Properties to set + */ + 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]]; } - return m; - }; - return Coin; - })(); + /** + * PublicKey secp256k1. + * @member {Uint8Array} secp256k1 + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.secp256k1 = $util.newBuffer([]); - v1.DecCoin = (function() { + /** + * PublicKey ed25519. + * @member {Uint8Array} ed25519 + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.ed25519 = $util.newBuffer([]); - /** - * Properties of a DecCoin. - * @memberof cosmos_sdk.v1 - * @interface IDecCoin - * @property {string|null} [denom] DecCoin denom - * @property {string|null} [amount] DecCoin amount - */ + /** + * PublicKey sr25519. + * @member {Uint8Array} sr25519 + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.sr25519 = $util.newBuffer([]); - /** - * Constructs a new DecCoin. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a DecCoin. - * @implements IDecCoin - * @constructor - * @param {cosmos_sdk.v1.IDecCoin=} [p] Properties to set - */ - 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]]; - } + /** + * PublicKey multisig. + * @member {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null|undefined} multisig + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.multisig = null; - /** - * DecCoin denom. - * @member {string} denom - * @memberof cosmos_sdk.v1.DecCoin - * @instance - */ - DecCoin.prototype.denom = ""; + /** + * PublicKey secp256r1. + * @member {Uint8Array} secp256r1 + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.secp256r1 = $util.newBuffer([]); - /** - * DecCoin amount. - * @member {string} amount - * @memberof cosmos_sdk.v1.DecCoin - * @instance - */ - DecCoin.prototype.amount = ""; + /** + * PublicKey anyPubkey. + * @member {google.protobuf.IAny|null|undefined} anyPubkey + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + PublicKey.prototype.anyPubkey = null; - /** - * Creates a new DecCoin instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {cosmos_sdk.v1.IDecCoin=} [properties] Properties to set - * @returns {cosmos_sdk.v1.DecCoin} DecCoin instance - */ - DecCoin.create = function create(properties) { - return new DecCoin(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {cosmos_sdk.v1.IDecCoin} m DecCoin message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; + /** + * PublicKey sum. + * @member {"secp256k1"|"ed25519"|"sr25519"|"multisig"|"secp256r1"|"anyPubkey"|undefined} sum + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @instance + */ + Object.defineProperty(PublicKey.prototype, "sum", { + get: $util.oneOfGetter($oneOfFields = ["secp256k1", "ed25519", "sr25519", "multisig", "secp256r1", "anyPubkey"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a DecCoin message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.DecCoin} DecCoin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; + /** + * Creates a new PublicKey instance using the specified properties. + * @function create + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {cosmos_sdk.crypto.v1.IPublicKey=} [properties] Properties to set + * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey instance + */ + PublicKey.create = function create(properties) { + return new PublicKey(properties); + }; + + /** + * Encodes the specified PublicKey message. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {cosmos_sdk.crypto.v1.IPublicKey} m PublicKey message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a PublicKey message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.crypto.v1.PublicKey + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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() { + + /** + * Properties of a PubKeyMultisigThreshold. + * @memberof cosmos_sdk.crypto.v1 + * @interface IPubKeyMultisigThreshold + * @property {number|null} [threshold] PubKeyMultisigThreshold threshold + * @property {Array.|null} [publicKeys] PubKeyMultisigThreshold publicKeys + */ + + /** + * Constructs a new PubKeyMultisigThreshold. + * @memberof cosmos_sdk.crypto.v1 + * @classdesc Represents a PubKeyMultisigThreshold. + * @implements IPubKeyMultisigThreshold + * @constructor + * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [p] Properties to set + */ + 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]]; } - return m; - }; - return DecCoin; - })(); + /** + * PubKeyMultisigThreshold threshold. + * @member {number} threshold + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @instance + */ + PubKeyMultisigThreshold.prototype.threshold = 0; - v1.IntProto = (function() { + /** + * PubKeyMultisigThreshold publicKeys. + * @member {Array.} publicKeys + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @instance + */ + PubKeyMultisigThreshold.prototype.publicKeys = $util.emptyArray; - /** - * Properties of an IntProto. - * @memberof cosmos_sdk.v1 - * @interface IIntProto - * @property {string|null} [int] IntProto int - */ + /** + * Creates a new PubKeyMultisigThreshold instance using the specified properties. + * @function create + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [properties] Properties to set + * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold instance + */ + PubKeyMultisigThreshold.create = function create(properties) { + return new PubKeyMultisigThreshold(properties); + }; - /** - * Constructs a new IntProto. - * @memberof cosmos_sdk.v1 - * @classdesc Represents an IntProto. - * @implements IIntProto - * @constructor - * @param {cosmos_sdk.v1.IIntProto=} [p] Properties to set - */ - 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 int. - * @member {string} int - * @memberof cosmos_sdk.v1.IntProto - * @instance - */ - IntProto.prototype.int = ""; - - /** - * Creates a new IntProto instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {cosmos_sdk.v1.IIntProto=} [properties] Properties to set - * @returns {cosmos_sdk.v1.IntProto} IntProto instance - */ - IntProto.create = function create(properties) { - return new IntProto(properties); - }; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {cosmos_sdk.v1.IIntProto} m IntProto message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an IntProto message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.IntProto} IntProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; + /** + * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold} m PubKeyMultisigThreshold message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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() { + + /** + * Properties of a MultiSignature. + * @memberof cosmos_sdk.crypto.v1 + * @interface IMultiSignature + * @property {Array.|null} [signatures] MultiSignature signatures + */ + + /** + * Constructs a new MultiSignature. + * @memberof cosmos_sdk.crypto.v1 + * @classdesc Represents a MultiSignature. + * @implements IMultiSignature + * @constructor + * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [p] Properties to set + */ + 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]]; } - return m; - }; - return IntProto; - })(); + /** + * MultiSignature signatures. + * @member {Array.} signatures + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @instance + */ + MultiSignature.prototype.signatures = $util.emptyArray; - v1.DecProto = (function() { + /** + * Creates a new MultiSignature instance using the specified properties. + * @function create + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [properties] Properties to set + * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature instance + */ + MultiSignature.create = function create(properties) { + return new MultiSignature(properties); + }; - /** - * Properties of a DecProto. - * @memberof cosmos_sdk.v1 - * @interface IDecProto - * @property {string|null} [dec] DecProto dec - */ - - /** - * Constructs a new DecProto. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a DecProto. - * @implements IDecProto - * @constructor - * @param {cosmos_sdk.v1.IDecProto=} [p] Properties to set - */ - 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 dec. - * @member {string} dec - * @memberof cosmos_sdk.v1.DecProto - * @instance - */ - DecProto.prototype.dec = ""; - - /** - * Creates a new DecProto instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {cosmos_sdk.v1.IDecProto=} [properties] Properties to set - * @returns {cosmos_sdk.v1.DecProto} DecProto instance - */ - DecProto.create = function create(properties) { - return new DecProto(properties); - }; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {cosmos_sdk.v1.IDecProto} m DecProto message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a DecProto message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.DecProto} DecProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; + /** + * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {cosmos_sdk.crypto.v1.IMultiSignature} m MultiSignature message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a MultiSignature message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.crypto.v1.MultiSignature + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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() { + + /** + * Properties of a CompactBitArray. + * @memberof cosmos_sdk.crypto.v1 + * @interface ICompactBitArray + * @property {number|null} [extraBitsStored] CompactBitArray extraBitsStored + * @property {Uint8Array|null} [elems] CompactBitArray elems + */ + + /** + * Constructs a new CompactBitArray. + * @memberof cosmos_sdk.crypto.v1 + * @classdesc Represents a CompactBitArray. + * @implements ICompactBitArray + * @constructor + * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [p] Properties to set + */ + 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]]; } - return m; - }; - - return DecProto; - })(); - - v1.ValAddresses = (function() { - - /** - * Properties of a ValAddresses. - * @memberof cosmos_sdk.v1 - * @interface IValAddresses - * @property {Array.|null} [addresses] ValAddresses addresses - */ - - /** - * Constructs a new ValAddresses. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a ValAddresses. - * @implements IValAddresses - * @constructor - * @param {cosmos_sdk.v1.IValAddresses=} [p] Properties to set - */ - 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 addresses. - * @member {Array.} addresses - * @memberof cosmos_sdk.v1.ValAddresses - * @instance - */ - ValAddresses.prototype.addresses = $util.emptyArray; - - /** - * Creates a new ValAddresses instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {cosmos_sdk.v1.IValAddresses=} [properties] Properties to set - * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses instance - */ - ValAddresses.create = function create(properties) { - return new ValAddresses(properties); - }; - - /** - * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {cosmos_sdk.v1.IValAddresses} m ValAddresses message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ValAddresses message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a GasInfo. - * @memberof cosmos_sdk.v1 - * @interface IGasInfo - * @property {number|Long|null} [gasWanted] GasInfo gasWanted - * @property {number|Long|null} [gasUsed] GasInfo gasUsed - */ - - /** - * Constructs a new GasInfo. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a GasInfo. - * @implements IGasInfo - * @constructor - * @param {cosmos_sdk.v1.IGasInfo=} [p] Properties to set - */ - 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 gasWanted. - * @member {number|Long} gasWanted - * @memberof cosmos_sdk.v1.GasInfo - * @instance - */ - GasInfo.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * GasInfo gasUsed. - * @member {number|Long} gasUsed - * @memberof cosmos_sdk.v1.GasInfo - * @instance - */ - GasInfo.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new GasInfo instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {cosmos_sdk.v1.IGasInfo=} [properties] Properties to set - * @returns {cosmos_sdk.v1.GasInfo} GasInfo instance - */ - GasInfo.create = function create(properties) { - return new GasInfo(properties); - }; - - /** - * Encodes the specified GasInfo message. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {cosmos_sdk.v1.IGasInfo} m GasInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a GasInfo message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.GasInfo} GasInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GasInfo.decode = function decode(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() { - - /** - * Properties of a Result. - * @memberof cosmos_sdk.v1 - * @interface IResult - * @property {Uint8Array|null} [data] Result data - * @property {string|null} [log] Result log - * @property {Array.|null} [events] Result events - */ - - /** - * Constructs a new Result. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a Result. - * @implements IResult - * @constructor - * @param {cosmos_sdk.v1.IResult=} [p] Properties to set - */ - 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 data. - * @member {Uint8Array} data - * @memberof cosmos_sdk.v1.Result - * @instance - */ - Result.prototype.data = $util.newBuffer([]); - - /** - * Result log. - * @member {string} log - * @memberof cosmos_sdk.v1.Result - * @instance - */ - Result.prototype.log = ""; - - /** - * Result events. - * @member {Array.} events - * @memberof cosmos_sdk.v1.Result - * @instance - */ - Result.prototype.events = $util.emptyArray; - - /** - * Creates a new Result instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.Result - * @static - * @param {cosmos_sdk.v1.IResult=} [properties] Properties to set - * @returns {cosmos_sdk.v1.Result} Result instance - */ - Result.create = function create(properties) { - return new Result(properties); - }; - - /** - * Encodes the specified Result message. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.Result - * @static - * @param {cosmos_sdk.v1.IResult} m Result message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Result message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.Result - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.Result} Result - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Result.decode = function decode(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() { - - /** - * Properties of a SimulationResponse. - * @memberof cosmos_sdk.v1 - * @interface ISimulationResponse - * @property {cosmos_sdk.v1.IGasInfo|null} [gasInfo] SimulationResponse gasInfo - * @property {cosmos_sdk.v1.IResult|null} [result] SimulationResponse result - */ - - /** - * Constructs a new SimulationResponse. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a SimulationResponse. - * @implements ISimulationResponse - * @constructor - * @param {cosmos_sdk.v1.ISimulationResponse=} [p] Properties to set - */ - 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 gasInfo. - * @member {cosmos_sdk.v1.IGasInfo|null|undefined} gasInfo - * @memberof cosmos_sdk.v1.SimulationResponse - * @instance - */ - SimulationResponse.prototype.gasInfo = null; - - /** - * SimulationResponse result. - * @member {cosmos_sdk.v1.IResult|null|undefined} result - * @memberof cosmos_sdk.v1.SimulationResponse - * @instance - */ - SimulationResponse.prototype.result = null; - - /** - * Creates a new SimulationResponse instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {cosmos_sdk.v1.ISimulationResponse=} [properties] Properties to set - * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse instance - */ - SimulationResponse.create = function create(properties) { - return new SimulationResponse(properties); - }; - - /** - * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {cosmos_sdk.v1.ISimulationResponse} m SimulationResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulationResponse.decode = function decode(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() { - - /** - * Properties of a MsgData. - * @memberof cosmos_sdk.v1 - * @interface IMsgData - * @property {string|null} [msgType] MsgData msgType - * @property {Uint8Array|null} [data] MsgData data - */ - - /** - * Constructs a new MsgData. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a MsgData. - * @implements IMsgData - * @constructor - * @param {cosmos_sdk.v1.IMsgData=} [p] Properties to set - */ - 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 msgType. - * @member {string} msgType - * @memberof cosmos_sdk.v1.MsgData - * @instance - */ - MsgData.prototype.msgType = ""; - - /** - * MsgData data. - * @member {Uint8Array} data - * @memberof cosmos_sdk.v1.MsgData - * @instance - */ - MsgData.prototype.data = $util.newBuffer([]); - - /** - * Creates a new MsgData instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {cosmos_sdk.v1.IMsgData=} [properties] Properties to set - * @returns {cosmos_sdk.v1.MsgData} MsgData instance - */ - MsgData.create = function create(properties) { - return new MsgData(properties); - }; - - /** - * Encodes the specified MsgData message. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {cosmos_sdk.v1.IMsgData} m MsgData message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a MsgData message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.MsgData} MsgData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgData.decode = function decode(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() { - - /** - * Properties of a TxData. - * @memberof cosmos_sdk.v1 - * @interface ITxData - * @property {Array.|null} [data] TxData data - */ - - /** - * Constructs a new TxData. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a TxData. - * @implements ITxData - * @constructor - * @param {cosmos_sdk.v1.ITxData=} [p] Properties to set - */ - 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 data. - * @member {Array.} data - * @memberof cosmos_sdk.v1.TxData - * @instance - */ - TxData.prototype.data = $util.emptyArray; - - /** - * Creates a new TxData instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {cosmos_sdk.v1.ITxData=} [properties] Properties to set - * @returns {cosmos_sdk.v1.TxData} TxData instance - */ - TxData.create = function create(properties) { - return new TxData(properties); - }; - - /** - * Encodes the specified TxData message. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {cosmos_sdk.v1.ITxData} m TxData message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a TxData message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.TxData} TxData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.x = (function() { - - /** - * Namespace x. - * @memberof cosmos_sdk - * @namespace - */ - var x = {}; - - x.auth = (function() { - - /** - * Namespace auth. - * @memberof cosmos_sdk.x - * @namespace - */ - var auth = {}; - - auth.v1 = (function() { /** - * Namespace v1. - * @memberof cosmos_sdk.x.auth - * @namespace + * CompactBitArray extraBitsStored. + * @member {number} extraBitsStored + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @instance */ - var v1 = {}; + CompactBitArray.prototype.extraBitsStored = 0; - v1.BaseAccount = (function() { + /** + * CompactBitArray elems. + * @member {Uint8Array} elems + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @instance + */ + CompactBitArray.prototype.elems = $util.newBuffer([]); - /** - * Properties of a BaseAccount. - * @memberof cosmos_sdk.x.auth.v1 - * @interface IBaseAccount - * @property {Uint8Array|null} [address] BaseAccount address - * @property {Uint8Array|null} [pubKey] BaseAccount pubKey - * @property {number|Long|null} [accountNumber] BaseAccount accountNumber - * @property {number|Long|null} [sequence] BaseAccount sequence - */ + /** + * Creates a new CompactBitArray instance using the specified properties. + * @function create + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [properties] Properties to set + * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray instance + */ + CompactBitArray.create = function create(properties) { + return new CompactBitArray(properties); + }; - /** - * Constructs a new BaseAccount. - * @memberof cosmos_sdk.x.auth.v1 - * @classdesc Represents a BaseAccount. - * @implements IBaseAccount - * @constructor - * @param {cosmos_sdk.x.auth.v1.IBaseAccount=} [p] Properties to set - */ - function BaseAccount(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]]; + /** + * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. + * @function encode + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {cosmos_sdk.crypto.v1.ICompactBitArray} m CompactBitArray message or plain object to encode + * @param {$protobuf.Writer} [w] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Decodes a CompactBitArray message from the specified reader or buffer. + * @function decode + * @memberof cosmos_sdk.crypto.v1.CompactBitArray + * @static + * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from + * @param {number} [l] Message length if known beforehand + * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + 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; + }; - /** - * BaseAccount address. - * @member {Uint8Array} address - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @instance - */ - BaseAccount.prototype.address = $util.newBuffer([]); - - /** - * BaseAccount pubKey. - * @member {Uint8Array} pubKey - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @instance - */ - BaseAccount.prototype.pubKey = $util.newBuffer([]); - - /** - * BaseAccount accountNumber. - * @member {number|Long} accountNumber - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @instance - */ - BaseAccount.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * BaseAccount sequence. - * @member {number|Long} sequence - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @instance - */ - BaseAccount.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new BaseAccount instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @static - * @param {cosmos_sdk.x.auth.v1.IBaseAccount=} [properties] Properties to set - * @returns {cosmos_sdk.x.auth.v1.BaseAccount} BaseAccount instance - */ - BaseAccount.create = function create(properties) { - return new BaseAccount(properties); - }; - - /** - * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @static - * @param {cosmos_sdk.x.auth.v1.IBaseAccount} m BaseAccount message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseAccount.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.pubKey != null && Object.hasOwnProperty.call(m, "pubKey")) - w.uint32(18).bytes(m.pubKey); - if (m.accountNumber != null && Object.hasOwnProperty.call(m, "accountNumber")) - w.uint32(24).uint64(m.accountNumber); - if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence")) - w.uint32(32).uint64(m.sequence); - return w; - }; - - /** - * Decodes a BaseAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.auth.v1.BaseAccount - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.auth.v1.BaseAccount} BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseAccount.decode = function decode(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.auth.v1.BaseAccount(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.address = r.bytes(); - break; - case 2: - m.pubKey = r.bytes(); - break; - case 3: - m.accountNumber = r.uint64(); - break; - case 4: - m.sequence = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return BaseAccount; - })(); - - v1.ModuleAccount = (function() { - - /** - * Properties of a ModuleAccount. - * @memberof cosmos_sdk.x.auth.v1 - * @interface IModuleAccount - * @property {cosmos_sdk.x.auth.v1.IBaseAccount|null} [baseAccount] ModuleAccount baseAccount - * @property {string|null} [name] ModuleAccount name - * @property {Array.|null} [permissions] ModuleAccount permissions - */ - - /** - * Constructs a new ModuleAccount. - * @memberof cosmos_sdk.x.auth.v1 - * @classdesc Represents a ModuleAccount. - * @implements IModuleAccount - * @constructor - * @param {cosmos_sdk.x.auth.v1.IModuleAccount=} [p] Properties to set - */ - function ModuleAccount(p) { - this.permissions = []; - 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]]; - } - - /** - * ModuleAccount baseAccount. - * @member {cosmos_sdk.x.auth.v1.IBaseAccount|null|undefined} baseAccount - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.baseAccount = null; - - /** - * ModuleAccount name. - * @member {string} name - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.name = ""; - - /** - * ModuleAccount permissions. - * @member {Array.} permissions - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @instance - */ - ModuleAccount.prototype.permissions = $util.emptyArray; - - /** - * Creates a new ModuleAccount instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @static - * @param {cosmos_sdk.x.auth.v1.IModuleAccount=} [properties] Properties to set - * @returns {cosmos_sdk.x.auth.v1.ModuleAccount} ModuleAccount instance - */ - ModuleAccount.create = function create(properties) { - return new ModuleAccount(properties); - }; - - /** - * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @static - * @param {cosmos_sdk.x.auth.v1.IModuleAccount} m ModuleAccount message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModuleAccount.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.baseAccount != null && Object.hasOwnProperty.call(m, "baseAccount")) - $root.cosmos_sdk.x.auth.v1.BaseAccount.encode(m.baseAccount, w.uint32(10).fork()).ldelim(); - if (m.name != null && Object.hasOwnProperty.call(m, "name")) - w.uint32(18).string(m.name); - if (m.permissions != null && m.permissions.length) { - for (var i = 0; i < m.permissions.length; ++i) - w.uint32(26).string(m.permissions[i]); - } - return w; - }; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.auth.v1.ModuleAccount - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.auth.v1.ModuleAccount} ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModuleAccount.decode = function decode(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.auth.v1.ModuleAccount(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.decode(r, r.uint32()); - break; - case 2: - m.name = r.string(); - break; - case 3: - if (!(m.permissions && m.permissions.length)) - m.permissions = []; - m.permissions.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ModuleAccount; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof cosmos_sdk.x.auth.v1 - * @interface IParams - * @property {number|Long|null} [maxMemoCharacters] Params maxMemoCharacters - * @property {number|Long|null} [txSigLimit] Params txSigLimit - * @property {number|Long|null} [txSizeCostPerByte] Params txSizeCostPerByte - * @property {number|Long|null} [sigVerifyCostEd25519] Params sigVerifyCostEd25519 - * @property {number|Long|null} [sigVerifyCostSecp256k1] Params sigVerifyCostSecp256k1 - */ - - /** - * Constructs a new Params. - * @memberof cosmos_sdk.x.auth.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos_sdk.x.auth.v1.IParams=} [p] Properties to set - */ - function Params(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]]; - } - - /** - * Params maxMemoCharacters. - * @member {number|Long} maxMemoCharacters - * @memberof cosmos_sdk.x.auth.v1.Params - * @instance - */ - Params.prototype.maxMemoCharacters = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params txSigLimit. - * @member {number|Long} txSigLimit - * @memberof cosmos_sdk.x.auth.v1.Params - * @instance - */ - Params.prototype.txSigLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params txSizeCostPerByte. - * @member {number|Long} txSizeCostPerByte - * @memberof cosmos_sdk.x.auth.v1.Params - * @instance - */ - Params.prototype.txSizeCostPerByte = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params sigVerifyCostEd25519. - * @member {number|Long} sigVerifyCostEd25519 - * @memberof cosmos_sdk.x.auth.v1.Params - * @instance - */ - Params.prototype.sigVerifyCostEd25519 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Params sigVerifyCostSecp256k1. - * @member {number|Long} sigVerifyCostSecp256k1 - * @memberof cosmos_sdk.x.auth.v1.Params - * @instance - */ - Params.prototype.sigVerifyCostSecp256k1 = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new Params instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.auth.v1.Params - * @static - * @param {cosmos_sdk.x.auth.v1.IParams=} [properties] Properties to set - * @returns {cosmos_sdk.x.auth.v1.Params} Params instance - */ - Params.create = function create(properties) { - return new Params(properties); - }; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.auth.v1.Params - * @static - * @param {cosmos_sdk.x.auth.v1.IParams} m Params message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.maxMemoCharacters != null && Object.hasOwnProperty.call(m, "maxMemoCharacters")) - w.uint32(8).uint64(m.maxMemoCharacters); - if (m.txSigLimit != null && Object.hasOwnProperty.call(m, "txSigLimit")) - w.uint32(16).uint64(m.txSigLimit); - if (m.txSizeCostPerByte != null && Object.hasOwnProperty.call(m, "txSizeCostPerByte")) - w.uint32(24).uint64(m.txSizeCostPerByte); - if (m.sigVerifyCostEd25519 != null && Object.hasOwnProperty.call(m, "sigVerifyCostEd25519")) - w.uint32(32).uint64(m.sigVerifyCostEd25519); - if (m.sigVerifyCostSecp256k1 != null && Object.hasOwnProperty.call(m, "sigVerifyCostSecp256k1")) - w.uint32(40).uint64(m.sigVerifyCostSecp256k1); - return w; - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.auth.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.auth.v1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(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.auth.v1.Params(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.maxMemoCharacters = r.uint64(); - break; - case 2: - m.txSigLimit = r.uint64(); - break; - case 3: - m.txSizeCostPerByte = r.uint64(); - break; - case 4: - m.sigVerifyCostEd25519 = r.uint64(); - break; - case 5: - m.sigVerifyCostSecp256k1 = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Params; - })(); - - return v1; + return CompactBitArray; })(); - auth.vesting = (function() { - - /** - * Namespace vesting. - * @memberof cosmos_sdk.x.auth - * @namespace - */ - var vesting = {}; - - vesting.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.auth.vesting - * @namespace - */ - var v1 = {}; - - v1.BaseVestingAccount = (function() { - - /** - * Properties of a BaseVestingAccount. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @interface IBaseVestingAccount - * @property {cosmos_sdk.x.auth.v1.IBaseAccount|null} [baseAccount] BaseVestingAccount baseAccount - * @property {Array.|null} [originalVesting] BaseVestingAccount originalVesting - * @property {Array.|null} [delegatedFree] BaseVestingAccount delegatedFree - * @property {Array.|null} [delegatedVesting] BaseVestingAccount delegatedVesting - * @property {number|Long|null} [endTime] BaseVestingAccount endTime - */ - - /** - * Constructs a new BaseVestingAccount. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @classdesc Represents a BaseVestingAccount. - * @implements IBaseVestingAccount - * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount=} [p] Properties to set - */ - function BaseVestingAccount(p) { - this.originalVesting = []; - this.delegatedFree = []; - this.delegatedVesting = []; - 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]]; - } - - /** - * BaseVestingAccount baseAccount. - * @member {cosmos_sdk.x.auth.v1.IBaseAccount|null|undefined} baseAccount - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @instance - */ - BaseVestingAccount.prototype.baseAccount = null; - - /** - * BaseVestingAccount originalVesting. - * @member {Array.} originalVesting - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @instance - */ - BaseVestingAccount.prototype.originalVesting = $util.emptyArray; - - /** - * BaseVestingAccount delegatedFree. - * @member {Array.} delegatedFree - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @instance - */ - BaseVestingAccount.prototype.delegatedFree = $util.emptyArray; - - /** - * BaseVestingAccount delegatedVesting. - * @member {Array.} delegatedVesting - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @instance - */ - BaseVestingAccount.prototype.delegatedVesting = $util.emptyArray; - - /** - * BaseVestingAccount endTime. - * @member {number|Long} endTime - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @instance - */ - BaseVestingAccount.prototype.endTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new BaseVestingAccount instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount=} [properties] Properties to set - * @returns {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} BaseVestingAccount instance - */ - BaseVestingAccount.create = function create(properties) { - return new BaseVestingAccount(properties); - }; - - /** - * Encodes the specified BaseVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount} m BaseVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BaseVestingAccount.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.baseAccount != null && Object.hasOwnProperty.call(m, "baseAccount")) - $root.cosmos_sdk.x.auth.v1.BaseAccount.encode(m.baseAccount, w.uint32(10).fork()).ldelim(); - if (m.originalVesting != null && m.originalVesting.length) { - for (var i = 0; i < m.originalVesting.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.originalVesting[i], w.uint32(18).fork()).ldelim(); - } - if (m.delegatedFree != null && m.delegatedFree.length) { - for (var i = 0; i < m.delegatedFree.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.delegatedFree[i], w.uint32(26).fork()).ldelim(); - } - if (m.delegatedVesting != null && m.delegatedVesting.length) { - for (var i = 0; i < m.delegatedVesting.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.delegatedVesting[i], w.uint32(34).fork()).ldelim(); - } - if (m.endTime != null && Object.hasOwnProperty.call(m, "endTime")) - w.uint32(40).int64(m.endTime); - return w; - }; - - /** - * Decodes a BaseVestingAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount} BaseVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BaseVestingAccount.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.auth.vesting.v1.BaseVestingAccount(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.baseAccount = $root.cosmos_sdk.x.auth.v1.BaseAccount.decode(r, r.uint32()); - break; - case 2: - if (!(m.originalVesting && m.originalVesting.length)) - m.originalVesting = []; - m.originalVesting.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - case 3: - if (!(m.delegatedFree && m.delegatedFree.length)) - m.delegatedFree = []; - m.delegatedFree.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - case 4: - if (!(m.delegatedVesting && m.delegatedVesting.length)) - m.delegatedVesting = []; - m.delegatedVesting.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - case 5: - m.endTime = r.int64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return BaseVestingAccount; - })(); - - v1.ContinuousVestingAccount = (function() { - - /** - * Properties of a ContinuousVestingAccount. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @interface IContinuousVestingAccount - * @property {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null} [baseVestingAccount] ContinuousVestingAccount baseVestingAccount - * @property {number|Long|null} [startTime] ContinuousVestingAccount startTime - */ - - /** - * Constructs a new ContinuousVestingAccount. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @classdesc Represents a ContinuousVestingAccount. - * @implements IContinuousVestingAccount - * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount=} [p] Properties to set - */ - function ContinuousVestingAccount(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]]; - } - - /** - * ContinuousVestingAccount baseVestingAccount. - * @member {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null|undefined} baseVestingAccount - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @instance - */ - ContinuousVestingAccount.prototype.baseVestingAccount = null; - - /** - * ContinuousVestingAccount startTime. - * @member {number|Long} startTime - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @instance - */ - ContinuousVestingAccount.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ContinuousVestingAccount instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount=} [properties] Properties to set - * @returns {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} ContinuousVestingAccount instance - */ - ContinuousVestingAccount.create = function create(properties) { - return new ContinuousVestingAccount(properties); - }; - - /** - * Encodes the specified ContinuousVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount} m ContinuousVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ContinuousVestingAccount.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.baseVestingAccount != null && Object.hasOwnProperty.call(m, "baseVestingAccount")) - $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(m.baseVestingAccount, w.uint32(10).fork()).ldelim(); - if (m.startTime != null && Object.hasOwnProperty.call(m, "startTime")) - w.uint32(16).int64(m.startTime); - return w; - }; - - /** - * Decodes a ContinuousVestingAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount} ContinuousVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ContinuousVestingAccount.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.auth.vesting.v1.ContinuousVestingAccount(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(r, r.uint32()); - break; - case 2: - m.startTime = r.int64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ContinuousVestingAccount; - })(); - - v1.DelayedVestingAccount = (function() { - - /** - * Properties of a DelayedVestingAccount. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @interface IDelayedVestingAccount - * @property {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null} [baseVestingAccount] DelayedVestingAccount baseVestingAccount - */ - - /** - * Constructs a new DelayedVestingAccount. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @classdesc Represents a DelayedVestingAccount. - * @implements IDelayedVestingAccount - * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount=} [p] Properties to set - */ - function DelayedVestingAccount(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]]; - } - - /** - * DelayedVestingAccount baseVestingAccount. - * @member {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null|undefined} baseVestingAccount - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @instance - */ - DelayedVestingAccount.prototype.baseVestingAccount = null; - - /** - * Creates a new DelayedVestingAccount instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount=} [properties] Properties to set - * @returns {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} DelayedVestingAccount instance - */ - DelayedVestingAccount.create = function create(properties) { - return new DelayedVestingAccount(properties); - }; - - /** - * Encodes the specified DelayedVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount} m DelayedVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DelayedVestingAccount.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.baseVestingAccount != null && Object.hasOwnProperty.call(m, "baseVestingAccount")) - $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(m.baseVestingAccount, w.uint32(10).fork()).ldelim(); - return w; - }; - - /** - * Decodes a DelayedVestingAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount} DelayedVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DelayedVestingAccount.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.auth.vesting.v1.DelayedVestingAccount(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return DelayedVestingAccount; - })(); - - v1.Period = (function() { - - /** - * Properties of a Period. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @interface IPeriod - * @property {number|Long|null} [length] Period length - * @property {Array.|null} [amount] Period amount - */ - - /** - * Constructs a new Period. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @classdesc Represents a Period. - * @implements IPeriod - * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod=} [p] Properties to set - */ - function Period(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]]; - } - - /** - * Period length. - * @member {number|Long} length - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @instance - */ - Period.prototype.length = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Period amount. - * @member {Array.} amount - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @instance - */ - Period.prototype.amount = $util.emptyArray; - - /** - * Creates a new Period instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod=} [properties] Properties to set - * @returns {cosmos_sdk.x.auth.vesting.v1.Period} Period instance - */ - Period.create = function create(properties) { - return new Period(properties); - }; - - /** - * Encodes the specified Period message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriod} m Period message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Period.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.length != null && Object.hasOwnProperty.call(m, "length")) - w.uint32(8).int64(m.length); - 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(18).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a Period message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.auth.vesting.v1.Period - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.auth.vesting.v1.Period} Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Period.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.auth.vesting.v1.Period(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.length = r.int64(); - break; - case 2: - 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 Period; - })(); - - v1.PeriodicVestingAccount = (function() { - - /** - * Properties of a PeriodicVestingAccount. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @interface IPeriodicVestingAccount - * @property {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null} [baseVestingAccount] PeriodicVestingAccount baseVestingAccount - * @property {number|Long|null} [startTime] PeriodicVestingAccount startTime - * @property {Array.|null} [vestingPeriods] PeriodicVestingAccount vestingPeriods - */ - - /** - * Constructs a new PeriodicVestingAccount. - * @memberof cosmos_sdk.x.auth.vesting.v1 - * @classdesc Represents a PeriodicVestingAccount. - * @implements IPeriodicVestingAccount - * @constructor - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount=} [p] Properties to set - */ - function PeriodicVestingAccount(p) { - this.vestingPeriods = []; - 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]]; - } - - /** - * PeriodicVestingAccount baseVestingAccount. - * @member {cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount|null|undefined} baseVestingAccount - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @instance - */ - PeriodicVestingAccount.prototype.baseVestingAccount = null; - - /** - * PeriodicVestingAccount startTime. - * @member {number|Long} startTime - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @instance - */ - PeriodicVestingAccount.prototype.startTime = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * PeriodicVestingAccount vestingPeriods. - * @member {Array.} vestingPeriods - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @instance - */ - PeriodicVestingAccount.prototype.vestingPeriods = $util.emptyArray; - - /** - * Creates a new PeriodicVestingAccount instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount=} [properties] Properties to set - * @returns {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} PeriodicVestingAccount instance - */ - PeriodicVestingAccount.create = function create(properties) { - return new PeriodicVestingAccount(properties); - }; - - /** - * Encodes the specified PeriodicVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @static - * @param {cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount} m PeriodicVestingAccount message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PeriodicVestingAccount.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.baseVestingAccount != null && Object.hasOwnProperty.call(m, "baseVestingAccount")) - $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.encode(m.baseVestingAccount, w.uint32(10).fork()).ldelim(); - if (m.startTime != null && Object.hasOwnProperty.call(m, "startTime")) - w.uint32(16).int64(m.startTime); - if (m.vestingPeriods != null && m.vestingPeriods.length) { - for (var i = 0; i < m.vestingPeriods.length; ++i) - $root.cosmos_sdk.x.auth.vesting.v1.Period.encode(m.vestingPeriods[i], w.uint32(26).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a PeriodicVestingAccount message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount} PeriodicVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PeriodicVestingAccount.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.auth.vesting.v1.PeriodicVestingAccount(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.baseVestingAccount = $root.cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.decode(r, r.uint32()); - break; - case 2: - m.startTime = r.int64(); - break; - case 3: - if (!(m.vestingPeriods && m.vestingPeriods.length)) - m.vestingPeriods = []; - m.vestingPeriods.push($root.cosmos_sdk.x.auth.vesting.v1.Period.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return PeriodicVestingAccount; - })(); - - return v1; - })(); - - return vesting; - })(); - - return auth; + return v1; })(); - x.bank = (function() { - - /** - * Namespace bank. - * @memberof cosmos_sdk.x - * @namespace - */ - var bank = {}; - - bank.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.bank - * @namespace - */ - var v1 = {}; - - v1.Query = (function() { - - /** - * Constructs a new Query service. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a Query - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function Query(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Query.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Query; - - /** - * Creates new Query service using the specified rpc implementation. - * @function create - * @memberof cosmos_sdk.x.bank.v1.Query - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Query} RPC service. Useful where requests and/or responses are streamed. - */ - Query.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#balance}. - * @memberof cosmos_sdk.x.bank.v1.Query - * @typedef BalanceCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos_sdk.x.bank.v1.QueryBalanceResponse} [response] QueryBalanceResponse - */ - - /** - * Calls Balance. - * @function balance - * @memberof cosmos_sdk.x.bank.v1.Query - * @instance - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} request QueryBalanceRequest message or plain object - * @param {cosmos_sdk.x.bank.v1.Query.BalanceCallback} callback Node-style callback called with the error, if any, and QueryBalanceResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.balance = function balance(request, callback) { - return this.rpcCall(balance, $root.cosmos_sdk.x.bank.v1.QueryBalanceRequest, $root.cosmos_sdk.x.bank.v1.QueryBalanceResponse, request, callback); - }, "name", { value: "Balance" }); - - /** - * Calls Balance. - * @function balance - * @memberof cosmos_sdk.x.bank.v1.Query - * @instance - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} request QueryBalanceRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#allBalances}. - * @memberof cosmos_sdk.x.bank.v1.Query - * @typedef AllBalancesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} [response] QueryAllBalancesResponse - */ - - /** - * Calls AllBalances. - * @function allBalances - * @memberof cosmos_sdk.x.bank.v1.Query - * @instance - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} request QueryAllBalancesRequest message or plain object - * @param {cosmos_sdk.x.bank.v1.Query.AllBalancesCallback} callback Node-style callback called with the error, if any, and QueryAllBalancesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.allBalances = function allBalances(request, callback) { - return this.rpcCall(allBalances, $root.cosmos_sdk.x.bank.v1.QueryAllBalancesRequest, $root.cosmos_sdk.x.bank.v1.QueryAllBalancesResponse, request, callback); - }, "name", { value: "AllBalances" }); - - /** - * Calls AllBalances. - * @function allBalances - * @memberof cosmos_sdk.x.bank.v1.Query - * @instance - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} request QueryAllBalancesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#totalSupply}. - * @memberof cosmos_sdk.x.bank.v1.Query - * @typedef TotalSupplyCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} [response] QueryTotalSupplyResponse - */ - - /** - * Calls TotalSupply. - * @function totalSupply - * @memberof cosmos_sdk.x.bank.v1.Query - * @instance - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} request QueryTotalSupplyRequest message or plain object - * @param {cosmos_sdk.x.bank.v1.Query.TotalSupplyCallback} callback Node-style callback called with the error, if any, and QueryTotalSupplyResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.totalSupply = function totalSupply(request, callback) { - return this.rpcCall(totalSupply, $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest, $root.cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse, request, callback); - }, "name", { value: "TotalSupply" }); - - /** - * Calls TotalSupply. - * @function totalSupply - * @memberof cosmos_sdk.x.bank.v1.Query - * @instance - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} request QueryTotalSupplyRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#supplyOf}. - * @memberof cosmos_sdk.x.bank.v1.Query - * @typedef SupplyOfCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} [response] QuerySupplyOfResponse - */ - - /** - * Calls SupplyOf. - * @function supplyOf - * @memberof cosmos_sdk.x.bank.v1.Query - * @instance - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} request QuerySupplyOfRequest message or plain object - * @param {cosmos_sdk.x.bank.v1.Query.SupplyOfCallback} callback Node-style callback called with the error, if any, and QuerySupplyOfResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Query.prototype.supplyOf = function supplyOf(request, callback) { - return this.rpcCall(supplyOf, $root.cosmos_sdk.x.bank.v1.QuerySupplyOfRequest, $root.cosmos_sdk.x.bank.v1.QuerySupplyOfResponse, request, callback); - }, "name", { value: "SupplyOf" }); - - /** - * Calls SupplyOf. - * @function supplyOf - * @memberof cosmos_sdk.x.bank.v1.Query - * @instance - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} request QuerySupplyOfRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Query; - })(); - - v1.QueryBalanceRequest = (function() { - - /** - * Properties of a QueryBalanceRequest. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IQueryBalanceRequest - * @property {Uint8Array|null} [address] QueryBalanceRequest address - * @property {string|null} [denom] QueryBalanceRequest denom - */ - - /** - * Constructs a new QueryBalanceRequest. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a QueryBalanceRequest. - * @implements IQueryBalanceRequest - * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest=} [p] Properties to set - */ - function QueryBalanceRequest(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]]; - } - - /** - * QueryBalanceRequest address. - * @member {Uint8Array} address - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @instance - */ - QueryBalanceRequest.prototype.address = $util.newBuffer([]); - - /** - * QueryBalanceRequest denom. - * @member {string} denom - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @instance - */ - QueryBalanceRequest.prototype.denom = ""; - - /** - * Creates a new QueryBalanceRequest instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.QueryBalanceRequest} QueryBalanceRequest instance - */ - QueryBalanceRequest.create = function create(properties) { - return new QueryBalanceRequest(properties); - }; - - /** - * Encodes the specified QueryBalanceRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceRequest} m QueryBalanceRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBalanceRequest.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.denom != null && Object.hasOwnProperty.call(m, "denom")) - w.uint32(18).string(m.denom); - return w; - }; - - /** - * Decodes a QueryBalanceRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.QueryBalanceRequest} QueryBalanceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBalanceRequest.decode = function decode(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.QueryBalanceRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.address = r.bytes(); - break; - case 2: - m.denom = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return QueryBalanceRequest; - })(); - - v1.QueryBalanceResponse = (function() { - - /** - * Properties of a QueryBalanceResponse. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IQueryBalanceResponse - * @property {cosmos_sdk.v1.ICoin|null} [balance] QueryBalanceResponse balance - */ - - /** - * Constructs a new QueryBalanceResponse. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a QueryBalanceResponse. - * @implements IQueryBalanceResponse - * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse=} [p] Properties to set - */ - function QueryBalanceResponse(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]]; - } - - /** - * QueryBalanceResponse balance. - * @member {cosmos_sdk.v1.ICoin|null|undefined} balance - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @instance - */ - QueryBalanceResponse.prototype.balance = null; - - /** - * Creates a new QueryBalanceResponse instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.QueryBalanceResponse} QueryBalanceResponse instance - */ - QueryBalanceResponse.create = function create(properties) { - return new QueryBalanceResponse(properties); - }; - - /** - * Encodes the specified QueryBalanceResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryBalanceResponse} m QueryBalanceResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryBalanceResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.balance != null && Object.hasOwnProperty.call(m, "balance")) - $root.cosmos_sdk.v1.Coin.encode(m.balance, w.uint32(10).fork()).ldelim(); - return w; - }; - - /** - * Decodes a QueryBalanceResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.QueryBalanceResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.QueryBalanceResponse} QueryBalanceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryBalanceResponse.decode = function decode(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.QueryBalanceResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.balance = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return QueryBalanceResponse; - })(); - - v1.QueryAllBalancesRequest = (function() { - - /** - * Properties of a QueryAllBalancesRequest. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IQueryAllBalancesRequest - * @property {Uint8Array|null} [address] QueryAllBalancesRequest address - */ - - /** - * Constructs a new QueryAllBalancesRequest. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a QueryAllBalancesRequest. - * @implements IQueryAllBalancesRequest - * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest=} [p] Properties to set - */ - function QueryAllBalancesRequest(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]]; - } - - /** - * QueryAllBalancesRequest address. - * @member {Uint8Array} address - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @instance - */ - QueryAllBalancesRequest.prototype.address = $util.newBuffer([]); - - /** - * Creates a new QueryAllBalancesRequest instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} QueryAllBalancesRequest instance - */ - QueryAllBalancesRequest.create = function create(properties) { - return new QueryAllBalancesRequest(properties); - }; - - /** - * Encodes the specified QueryAllBalancesRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest} m QueryAllBalancesRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAllBalancesRequest.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); - return w; - }; - - /** - * Decodes a QueryAllBalancesRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesRequest} QueryAllBalancesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAllBalancesRequest.decode = function decode(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.QueryAllBalancesRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.address = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return QueryAllBalancesRequest; - })(); - - v1.QueryAllBalancesResponse = (function() { - - /** - * Properties of a QueryAllBalancesResponse. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IQueryAllBalancesResponse - * @property {Array.|null} [balances] QueryAllBalancesResponse balances - */ - - /** - * Constructs a new QueryAllBalancesResponse. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a QueryAllBalancesResponse. - * @implements IQueryAllBalancesResponse - * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse=} [p] Properties to set - */ - function QueryAllBalancesResponse(p) { - this.balances = []; - 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]]; - } - - /** - * QueryAllBalancesResponse balances. - * @member {Array.} balances - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @instance - */ - QueryAllBalancesResponse.prototype.balances = $util.emptyArray; - - /** - * Creates a new QueryAllBalancesResponse instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} QueryAllBalancesResponse instance - */ - QueryAllBalancesResponse.create = function create(properties) { - return new QueryAllBalancesResponse(properties); - }; - - /** - * Encodes the specified QueryAllBalancesResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse} m QueryAllBalancesResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryAllBalancesResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.balances != null && m.balances.length) { - for (var i = 0; i < m.balances.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.balances[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a QueryAllBalancesResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.QueryAllBalancesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.QueryAllBalancesResponse} QueryAllBalancesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryAllBalancesResponse.decode = function decode(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.QueryAllBalancesResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.balances && m.balances.length)) - m.balances = []; - m.balances.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return QueryAllBalancesResponse; - })(); - - v1.QueryTotalSupplyRequest = (function() { - - /** - * Properties of a QueryTotalSupplyRequest. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IQueryTotalSupplyRequest - */ - - /** - * Constructs a new QueryTotalSupplyRequest. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a QueryTotalSupplyRequest. - * @implements IQueryTotalSupplyRequest - * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest=} [p] Properties to set - */ - function QueryTotalSupplyRequest(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]]; - } - - /** - * Creates a new QueryTotalSupplyRequest instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} QueryTotalSupplyRequest instance - */ - QueryTotalSupplyRequest.create = function create(properties) { - return new QueryTotalSupplyRequest(properties); - }; - - /** - * Encodes the specified QueryTotalSupplyRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest} m QueryTotalSupplyRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalSupplyRequest.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest} QueryTotalSupplyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalSupplyRequest.decode = function decode(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.QueryTotalSupplyRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return QueryTotalSupplyRequest; - })(); - - v1.QueryTotalSupplyResponse = (function() { - - /** - * Properties of a QueryTotalSupplyResponse. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IQueryTotalSupplyResponse - * @property {Array.|null} [supply] QueryTotalSupplyResponse supply - */ - - /** - * Constructs a new QueryTotalSupplyResponse. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a QueryTotalSupplyResponse. - * @implements IQueryTotalSupplyResponse - * @constructor - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse=} [p] Properties to set - */ - function QueryTotalSupplyResponse(p) { - this.supply = []; - 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]]; - } - - /** - * QueryTotalSupplyResponse supply. - * @member {Array.} supply - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @instance - */ - QueryTotalSupplyResponse.prototype.supply = $util.emptyArray; - - /** - * Creates a new QueryTotalSupplyResponse instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} QueryTotalSupplyResponse instance - */ - QueryTotalSupplyResponse.create = function create(properties) { - return new QueryTotalSupplyResponse(properties); - }; - - /** - * Encodes the specified QueryTotalSupplyResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse} m QueryTotalSupplyResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QueryTotalSupplyResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.supply != null && m.supply.length) { - for (var i = 0; i < m.supply.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.supply[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse} QueryTotalSupplyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QueryTotalSupplyResponse.decode = function decode(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.QueryTotalSupplyResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.supply && m.supply.length)) - m.supply = []; - m.supply.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return QueryTotalSupplyResponse; - })(); - - v1.QuerySupplyOfRequest = (function() { - - /** - * Properties of a QuerySupplyOfRequest. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IQuerySupplyOfRequest - * @property {string|null} [denom] QuerySupplyOfRequest denom - */ - - /** - * Constructs a new QuerySupplyOfRequest. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a QuerySupplyOfRequest. - * @implements IQuerySupplyOfRequest - * @constructor - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest=} [p] Properties to set - */ - function QuerySupplyOfRequest(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]]; - } - - /** - * QuerySupplyOfRequest denom. - * @member {string} denom - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @instance - */ - QuerySupplyOfRequest.prototype.denom = ""; - - /** - * Creates a new QuerySupplyOfRequest instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} QuerySupplyOfRequest instance - */ - QuerySupplyOfRequest.create = function create(properties) { - return new QuerySupplyOfRequest(properties); - }; - - /** - * Encodes the specified QuerySupplyOfRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @static - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest} m QuerySupplyOfRequest message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySupplyOfRequest.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); - return w; - }; - - /** - * Decodes a QuerySupplyOfRequest message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfRequest - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfRequest} QuerySupplyOfRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySupplyOfRequest.decode = function decode(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.QuerySupplyOfRequest(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.denom = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return QuerySupplyOfRequest; - })(); - - v1.QuerySupplyOfResponse = (function() { - - /** - * Properties of a QuerySupplyOfResponse. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IQuerySupplyOfResponse - * @property {string|null} [amount] QuerySupplyOfResponse amount - */ - - /** - * Constructs a new QuerySupplyOfResponse. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a QuerySupplyOfResponse. - * @implements IQuerySupplyOfResponse - * @constructor - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse=} [p] Properties to set - */ - function QuerySupplyOfResponse(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]]; - } - - /** - * QuerySupplyOfResponse amount. - * @member {string} amount - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @instance - */ - QuerySupplyOfResponse.prototype.amount = ""; - - /** - * Creates a new QuerySupplyOfResponse instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} QuerySupplyOfResponse instance - */ - QuerySupplyOfResponse.create = function create(properties) { - return new QuerySupplyOfResponse(properties); - }; - - /** - * Encodes the specified QuerySupplyOfResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @static - * @param {cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse} m QuerySupplyOfResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuerySupplyOfResponse.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) - w.uint32(10).string(m.amount); - return w; - }; - - /** - * Decodes a QuerySupplyOfResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.QuerySupplyOfResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.QuerySupplyOfResponse} QuerySupplyOfResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuerySupplyOfResponse.decode = function decode(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.QuerySupplyOfResponse(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.amount = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return QuerySupplyOfResponse; - })(); - - v1.MsgSend = (function() { - - /** - * Properties of a MsgSend. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IMsgSend - * @property {Uint8Array|null} [fromAddress] MsgSend fromAddress - * @property {Uint8Array|null} [toAddress] MsgSend toAddress - * @property {Array.|null} [amount] MsgSend amount - */ - - /** - * Constructs a new MsgSend. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a MsgSend. - * @implements IMsgSend - * @constructor - * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [p] Properties to set - */ - 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 fromAddress. - * @member {Uint8Array} fromAddress - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @instance - */ - MsgSend.prototype.fromAddress = $util.newBuffer([]); - - /** - * MsgSend toAddress. - * @member {Uint8Array} toAddress - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @instance - */ - MsgSend.prototype.toAddress = $util.newBuffer([]); - - /** - * MsgSend amount. - * @member {Array.} amount - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @instance - */ - MsgSend.prototype.amount = $util.emptyArray; - - /** - * Creates a new MsgSend instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend instance - */ - MsgSend.create = function create(properties) { - return new MsgSend(properties); - }; - - /** - * Encodes the specified MsgSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgSend} m MsgSend message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a MsgSend message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSend.decode = function decode(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() { - - /** - * Properties of an Input. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IInput - * @property {Uint8Array|null} [address] Input address - * @property {Array.|null} [coins] Input coins - */ - - /** - * Constructs a new Input. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents an Input. - * @implements IInput - * @constructor - * @param {cosmos_sdk.x.bank.v1.IInput=} [p] Properties to set - */ - 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 address. - * @member {Uint8Array} address - * @memberof cosmos_sdk.x.bank.v1.Input - * @instance - */ - Input.prototype.address = $util.newBuffer([]); - - /** - * Input coins. - * @member {Array.} coins - * @memberof cosmos_sdk.x.bank.v1.Input - * @instance - */ - Input.prototype.coins = $util.emptyArray; - - /** - * Creates a new Input instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {cosmos_sdk.x.bank.v1.IInput=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.Input} Input instance - */ - Input.create = function create(properties) { - return new Input(properties); - }; - - /** - * Encodes the specified Input message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {cosmos_sdk.x.bank.v1.IInput} m Input message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an Input message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.Input} Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Input.decode = function decode(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() { - - /** - * Properties of an Output. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IOutput - * @property {Uint8Array|null} [address] Output address - * @property {Array.|null} [coins] Output coins - */ - - /** - * Constructs a new Output. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents an Output. - * @implements IOutput - * @constructor - * @param {cosmos_sdk.x.bank.v1.IOutput=} [p] Properties to set - */ - 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 address. - * @member {Uint8Array} address - * @memberof cosmos_sdk.x.bank.v1.Output - * @instance - */ - Output.prototype.address = $util.newBuffer([]); - - /** - * Output coins. - * @member {Array.} coins - * @memberof cosmos_sdk.x.bank.v1.Output - * @instance - */ - Output.prototype.coins = $util.emptyArray; - - /** - * Creates a new Output instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {cosmos_sdk.x.bank.v1.IOutput=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.Output} Output instance - */ - Output.create = function create(properties) { - return new Output(properties); - }; - - /** - * Encodes the specified Output message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {cosmos_sdk.x.bank.v1.IOutput} m Output message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an Output message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.Output} Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Output.decode = function decode(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() { - - /** - * Properties of a MsgMultiSend. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IMsgMultiSend - * @property {Array.|null} [inputs] MsgMultiSend inputs - * @property {Array.|null} [outputs] MsgMultiSend outputs - */ - - /** - * Constructs a new MsgMultiSend. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a MsgMultiSend. - * @implements IMsgMultiSend - * @constructor - * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [p] Properties to set - */ - 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 inputs. - * @member {Array.} inputs - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @instance - */ - MsgMultiSend.prototype.inputs = $util.emptyArray; - - /** - * MsgMultiSend outputs. - * @member {Array.} outputs - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @instance - */ - MsgMultiSend.prototype.outputs = $util.emptyArray; - - /** - * Creates a new MsgMultiSend instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend instance - */ - MsgMultiSend.create = function create(properties) { - return new MsgMultiSend(properties); - }; - - /** - * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend} m MsgMultiSend message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMultiSend.decode = function decode(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() { - - /** - * Properties of a Supply. - * @memberof cosmos_sdk.x.bank.v1 - * @interface ISupply - * @property {Array.|null} [total] Supply total - */ - - /** - * Constructs a new Supply. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a Supply. - * @implements ISupply - * @constructor - * @param {cosmos_sdk.x.bank.v1.ISupply=} [p] Properties to set - */ - 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 total. - * @member {Array.} total - * @memberof cosmos_sdk.x.bank.v1.Supply - * @instance - */ - Supply.prototype.total = $util.emptyArray; - - /** - * Creates a new Supply instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {cosmos_sdk.x.bank.v1.ISupply=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.Supply} Supply instance - */ - Supply.create = function create(properties) { - return new Supply(properties); - }; - - /** - * Encodes the specified Supply message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {cosmos_sdk.x.bank.v1.ISupply} m Supply message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Supply message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.Supply} Supply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Supply.decode = function decode(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; - })(); - - x.capability = (function() { - - /** - * Namespace capability. - * @memberof cosmos_sdk.x - * @namespace - */ - var capability = {}; - - capability.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.capability - * @namespace - */ - var v1 = {}; - - v1.Capability = (function() { - - /** - * Properties of a Capability. - * @memberof cosmos_sdk.x.capability.v1 - * @interface ICapability - * @property {number|Long|null} [index] Capability index - */ - - /** - * Constructs a new Capability. - * @memberof cosmos_sdk.x.capability.v1 - * @classdesc Represents a Capability. - * @implements ICapability - * @constructor - * @param {cosmos_sdk.x.capability.v1.ICapability=} [p] Properties to set - */ - function Capability(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]]; - } - - /** - * Capability index. - * @member {number|Long} index - * @memberof cosmos_sdk.x.capability.v1.Capability - * @instance - */ - Capability.prototype.index = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new Capability instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.capability.v1.Capability - * @static - * @param {cosmos_sdk.x.capability.v1.ICapability=} [properties] Properties to set - * @returns {cosmos_sdk.x.capability.v1.Capability} Capability instance - */ - Capability.create = function create(properties) { - return new Capability(properties); - }; - - /** - * Encodes the specified Capability message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.capability.v1.Capability - * @static - * @param {cosmos_sdk.x.capability.v1.ICapability} m Capability message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Capability.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.index != null && Object.hasOwnProperty.call(m, "index")) - w.uint32(8).uint64(m.index); - return w; - }; - - /** - * Decodes a Capability message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.capability.v1.Capability - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.capability.v1.Capability} Capability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Capability.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.capability.v1.Capability(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.index = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Capability; - })(); - - v1.Owner = (function() { - - /** - * Properties of an Owner. - * @memberof cosmos_sdk.x.capability.v1 - * @interface IOwner - * @property {string|null} [module] Owner module - * @property {string|null} [name] Owner name - */ - - /** - * Constructs a new Owner. - * @memberof cosmos_sdk.x.capability.v1 - * @classdesc Represents an Owner. - * @implements IOwner - * @constructor - * @param {cosmos_sdk.x.capability.v1.IOwner=} [p] Properties to set - */ - function Owner(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]]; - } - - /** - * Owner module. - * @member {string} module - * @memberof cosmos_sdk.x.capability.v1.Owner - * @instance - */ - Owner.prototype.module = ""; - - /** - * Owner name. - * @member {string} name - * @memberof cosmos_sdk.x.capability.v1.Owner - * @instance - */ - Owner.prototype.name = ""; - - /** - * Creates a new Owner instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.capability.v1.Owner - * @static - * @param {cosmos_sdk.x.capability.v1.IOwner=} [properties] Properties to set - * @returns {cosmos_sdk.x.capability.v1.Owner} Owner instance - */ - Owner.create = function create(properties) { - return new Owner(properties); - }; - - /** - * Encodes the specified Owner message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.capability.v1.Owner - * @static - * @param {cosmos_sdk.x.capability.v1.IOwner} m Owner message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Owner.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.module != null && Object.hasOwnProperty.call(m, "module")) - w.uint32(10).string(m.module); - if (m.name != null && Object.hasOwnProperty.call(m, "name")) - w.uint32(18).string(m.name); - return w; - }; - - /** - * Decodes an Owner message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.capability.v1.Owner - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.capability.v1.Owner} Owner - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Owner.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.capability.v1.Owner(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.module = r.string(); - break; - case 2: - m.name = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Owner; - })(); - - v1.CapabilityOwners = (function() { - - /** - * Properties of a CapabilityOwners. - * @memberof cosmos_sdk.x.capability.v1 - * @interface ICapabilityOwners - * @property {Array.|null} [owners] CapabilityOwners owners - */ - - /** - * Constructs a new CapabilityOwners. - * @memberof cosmos_sdk.x.capability.v1 - * @classdesc Represents a CapabilityOwners. - * @implements ICapabilityOwners - * @constructor - * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners=} [p] Properties to set - */ - function CapabilityOwners(p) { - this.owners = []; - 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]]; - } - - /** - * CapabilityOwners owners. - * @member {Array.} owners - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @instance - */ - CapabilityOwners.prototype.owners = $util.emptyArray; - - /** - * Creates a new CapabilityOwners instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @static - * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners=} [properties] Properties to set - * @returns {cosmos_sdk.x.capability.v1.CapabilityOwners} CapabilityOwners instance - */ - CapabilityOwners.create = function create(properties) { - return new CapabilityOwners(properties); - }; - - /** - * Encodes the specified CapabilityOwners message. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @static - * @param {cosmos_sdk.x.capability.v1.ICapabilityOwners} m CapabilityOwners message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CapabilityOwners.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.owners != null && m.owners.length) { - for (var i = 0; i < m.owners.length; ++i) - $root.cosmos_sdk.x.capability.v1.Owner.encode(m.owners[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a CapabilityOwners message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.capability.v1.CapabilityOwners - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.capability.v1.CapabilityOwners} CapabilityOwners - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CapabilityOwners.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.capability.v1.CapabilityOwners(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.owners && m.owners.length)) - m.owners = []; - m.owners.push($root.cosmos_sdk.x.capability.v1.Owner.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return CapabilityOwners; - })(); - - return v1; - })(); - - return capability; - })(); - - x.crisis = (function() { - - /** - * Namespace crisis. - * @memberof cosmos_sdk.x - * @namespace - */ - var crisis = {}; - - crisis.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.crisis - * @namespace - */ - var v1 = {}; - - v1.MsgVerifyInvariant = (function() { - - /** - * Properties of a MsgVerifyInvariant. - * @memberof cosmos_sdk.x.crisis.v1 - * @interface IMsgVerifyInvariant - * @property {Uint8Array|null} [sender] MsgVerifyInvariant sender - * @property {string|null} [invariantModuleName] MsgVerifyInvariant invariantModuleName - * @property {string|null} [invariantRoute] MsgVerifyInvariant invariantRoute - */ - - /** - * Constructs a new MsgVerifyInvariant. - * @memberof cosmos_sdk.x.crisis.v1 - * @classdesc Represents a MsgVerifyInvariant. - * @implements IMsgVerifyInvariant - * @constructor - * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant=} [p] Properties to set - */ - function MsgVerifyInvariant(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]]; - } - - /** - * MsgVerifyInvariant sender. - * @member {Uint8Array} sender - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @instance - */ - MsgVerifyInvariant.prototype.sender = $util.newBuffer([]); - - /** - * MsgVerifyInvariant invariantModuleName. - * @member {string} invariantModuleName - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @instance - */ - MsgVerifyInvariant.prototype.invariantModuleName = ""; - - /** - * MsgVerifyInvariant invariantRoute. - * @member {string} invariantRoute - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @instance - */ - MsgVerifyInvariant.prototype.invariantRoute = ""; - - /** - * Creates a new MsgVerifyInvariant instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @static - * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant=} [properties] Properties to set - * @returns {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} MsgVerifyInvariant instance - */ - MsgVerifyInvariant.create = function create(properties) { - return new MsgVerifyInvariant(properties); - }; - - /** - * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @static - * @param {cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant} m MsgVerifyInvariant message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgVerifyInvariant.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.sender != null && Object.hasOwnProperty.call(m, "sender")) - w.uint32(10).bytes(m.sender); - if (m.invariantModuleName != null && Object.hasOwnProperty.call(m, "invariantModuleName")) - w.uint32(18).string(m.invariantModuleName); - if (m.invariantRoute != null && Object.hasOwnProperty.call(m, "invariantRoute")) - w.uint32(26).string(m.invariantRoute); - return w; - }; - - /** - * Decodes a MsgVerifyInvariant message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.crisis.v1.MsgVerifyInvariant - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.crisis.v1.MsgVerifyInvariant} MsgVerifyInvariant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgVerifyInvariant.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.crisis.v1.MsgVerifyInvariant(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.sender = r.bytes(); - break; - case 2: - m.invariantModuleName = r.string(); - break; - case 3: - m.invariantRoute = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgVerifyInvariant; - })(); - - return v1; - })(); - - return crisis; - })(); - - x.distribution = (function() { - - /** - * Namespace distribution. - * @memberof cosmos_sdk.x - * @namespace - */ - var distribution = {}; - - distribution.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.distribution - * @namespace - */ - var v1 = {}; - - v1.MsgSetWithdrawAddress = (function() { - - /** - * Properties of a MsgSetWithdrawAddress. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IMsgSetWithdrawAddress - * @property {Uint8Array|null} [delegatorAddress] MsgSetWithdrawAddress delegatorAddress - * @property {Uint8Array|null} [withdrawAddress] MsgSetWithdrawAddress withdrawAddress - */ - - /** - * Constructs a new MsgSetWithdrawAddress. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a MsgSetWithdrawAddress. - * @implements IMsgSetWithdrawAddress - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress=} [p] Properties to set - */ - function MsgSetWithdrawAddress(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]]; - } - - /** - * MsgSetWithdrawAddress delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @instance - */ - MsgSetWithdrawAddress.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * MsgSetWithdrawAddress withdrawAddress. - * @member {Uint8Array} withdrawAddress - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @instance - */ - MsgSetWithdrawAddress.prototype.withdrawAddress = $util.newBuffer([]); - - /** - * Creates a new MsgSetWithdrawAddress instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} MsgSetWithdrawAddress instance - */ - MsgSetWithdrawAddress.create = function create(properties) { - return new MsgSetWithdrawAddress(properties); - }; - - /** - * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress} m MsgSetWithdrawAddress message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSetWithdrawAddress.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.withdrawAddress != null && Object.hasOwnProperty.call(m, "withdrawAddress")) - w.uint32(18).bytes(m.withdrawAddress); - return w; - }; - - /** - * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress} MsgSetWithdrawAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSetWithdrawAddress.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.distribution.v1.MsgSetWithdrawAddress(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.withdrawAddress = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgSetWithdrawAddress; - })(); - - v1.MsgWithdrawDelegatorReward = (function() { - - /** - * Properties of a MsgWithdrawDelegatorReward. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IMsgWithdrawDelegatorReward - * @property {Uint8Array|null} [delegatorAddress] MsgWithdrawDelegatorReward delegatorAddress - * @property {Uint8Array|null} [validatorAddress] MsgWithdrawDelegatorReward validatorAddress - */ - - /** - * Constructs a new MsgWithdrawDelegatorReward. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a MsgWithdrawDelegatorReward. - * @implements IMsgWithdrawDelegatorReward - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward=} [p] Properties to set - */ - function MsgWithdrawDelegatorReward(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]]; - } - - /** - * MsgWithdrawDelegatorReward delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @instance - */ - MsgWithdrawDelegatorReward.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * MsgWithdrawDelegatorReward validatorAddress. - * @member {Uint8Array} validatorAddress - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @instance - */ - MsgWithdrawDelegatorReward.prototype.validatorAddress = $util.newBuffer([]); - - /** - * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward instance - */ - MsgWithdrawDelegatorReward.create = function create(properties) { - return new MsgWithdrawDelegatorReward(properties); - }; - - /** - * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward} m MsgWithdrawDelegatorReward message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgWithdrawDelegatorReward.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) - w.uint32(18).bytes(m.validatorAddress); - return w; - }; - - /** - * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward} MsgWithdrawDelegatorReward - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgWithdrawDelegatorReward.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.distribution.v1.MsgWithdrawDelegatorReward(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.validatorAddress = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgWithdrawDelegatorReward; - })(); - - v1.MsgWithdrawValidatorCommission = (function() { - - /** - * Properties of a MsgWithdrawValidatorCommission. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IMsgWithdrawValidatorCommission - * @property {Uint8Array|null} [validatorAddress] MsgWithdrawValidatorCommission validatorAddress - */ - - /** - * Constructs a new MsgWithdrawValidatorCommission. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a MsgWithdrawValidatorCommission. - * @implements IMsgWithdrawValidatorCommission - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission=} [p] Properties to set - */ - function MsgWithdrawValidatorCommission(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]]; - } - - /** - * MsgWithdrawValidatorCommission validatorAddress. - * @member {Uint8Array} validatorAddress - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @instance - */ - MsgWithdrawValidatorCommission.prototype.validatorAddress = $util.newBuffer([]); - - /** - * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission instance - */ - MsgWithdrawValidatorCommission.create = function create(properties) { - return new MsgWithdrawValidatorCommission(properties); - }; - - /** - * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission} m MsgWithdrawValidatorCommission message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgWithdrawValidatorCommission.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) - w.uint32(10).bytes(m.validatorAddress); - return w; - }; - - /** - * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission} MsgWithdrawValidatorCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgWithdrawValidatorCommission.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.distribution.v1.MsgWithdrawValidatorCommission(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.validatorAddress = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgWithdrawValidatorCommission; - })(); - - v1.MsgFundCommunityPool = (function() { - - /** - * Properties of a MsgFundCommunityPool. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IMsgFundCommunityPool - * @property {Array.|null} [amount] MsgFundCommunityPool amount - * @property {Uint8Array|null} [depositor] MsgFundCommunityPool depositor - */ - - /** - * Constructs a new MsgFundCommunityPool. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a MsgFundCommunityPool. - * @implements IMsgFundCommunityPool - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool=} [p] Properties to set - */ - function MsgFundCommunityPool(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]]; - } - - /** - * MsgFundCommunityPool amount. - * @member {Array.} amount - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @instance - */ - MsgFundCommunityPool.prototype.amount = $util.emptyArray; - - /** - * MsgFundCommunityPool depositor. - * @member {Uint8Array} depositor - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @instance - */ - MsgFundCommunityPool.prototype.depositor = $util.newBuffer([]); - - /** - * Creates a new MsgFundCommunityPool instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} MsgFundCommunityPool instance - */ - MsgFundCommunityPool.create = function create(properties) { - return new MsgFundCommunityPool(properties); - }; - - /** - * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @static - * @param {cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool} m MsgFundCommunityPool message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgFundCommunityPool.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.depositor != null && Object.hasOwnProperty.call(m, "depositor")) - w.uint32(18).bytes(m.depositor); - return w; - }; - - /** - * Decodes a MsgFundCommunityPool message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.MsgFundCommunityPool - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.MsgFundCommunityPool} MsgFundCommunityPool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgFundCommunityPool.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.distribution.v1.MsgFundCommunityPool(); - 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.depositor = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgFundCommunityPool; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IParams - * @property {string|null} [communityTax] Params communityTax - * @property {string|null} [baseProposerReward] Params baseProposerReward - * @property {string|null} [bonusProposerReward] Params bonusProposerReward - * @property {boolean|null} [withdrawAddrEnabled] Params withdrawAddrEnabled - */ - - /** - * Constructs a new Params. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IParams=} [p] Properties to set - */ - function Params(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]]; - } - - /** - * Params communityTax. - * @member {string} communityTax - * @memberof cosmos_sdk.x.distribution.v1.Params - * @instance - */ - Params.prototype.communityTax = ""; - - /** - * Params baseProposerReward. - * @member {string} baseProposerReward - * @memberof cosmos_sdk.x.distribution.v1.Params - * @instance - */ - Params.prototype.baseProposerReward = ""; - - /** - * Params bonusProposerReward. - * @member {string} bonusProposerReward - * @memberof cosmos_sdk.x.distribution.v1.Params - * @instance - */ - Params.prototype.bonusProposerReward = ""; - - /** - * Params withdrawAddrEnabled. - * @member {boolean} withdrawAddrEnabled - * @memberof cosmos_sdk.x.distribution.v1.Params - * @instance - */ - Params.prototype.withdrawAddrEnabled = false; - - /** - * Creates a new Params instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.Params - * @static - * @param {cosmos_sdk.x.distribution.v1.IParams=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.Params} Params instance - */ - Params.create = function create(properties) { - return new Params(properties); - }; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.Params - * @static - * @param {cosmos_sdk.x.distribution.v1.IParams} m Params message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.communityTax != null && Object.hasOwnProperty.call(m, "communityTax")) - w.uint32(10).string(m.communityTax); - if (m.baseProposerReward != null && Object.hasOwnProperty.call(m, "baseProposerReward")) - w.uint32(18).string(m.baseProposerReward); - if (m.bonusProposerReward != null && Object.hasOwnProperty.call(m, "bonusProposerReward")) - w.uint32(26).string(m.bonusProposerReward); - if (m.withdrawAddrEnabled != null && Object.hasOwnProperty.call(m, "withdrawAddrEnabled")) - w.uint32(32).bool(m.withdrawAddrEnabled); - return w; - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(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.distribution.v1.Params(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.communityTax = r.string(); - break; - case 2: - m.baseProposerReward = r.string(); - break; - case 3: - m.bonusProposerReward = r.string(); - break; - case 4: - m.withdrawAddrEnabled = r.bool(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Params; - })(); - - v1.ValidatorHistoricalRewards = (function() { - - /** - * Properties of a ValidatorHistoricalRewards. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IValidatorHistoricalRewards - * @property {Array.|null} [cumulativeRewardRatio] ValidatorHistoricalRewards cumulativeRewardRatio - * @property {number|null} [referenceCount] ValidatorHistoricalRewards referenceCount - */ - - /** - * Constructs a new ValidatorHistoricalRewards. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a ValidatorHistoricalRewards. - * @implements IValidatorHistoricalRewards - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards=} [p] Properties to set - */ - function ValidatorHistoricalRewards(p) { - this.cumulativeRewardRatio = []; - 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]]; - } - - /** - * ValidatorHistoricalRewards cumulativeRewardRatio. - * @member {Array.} cumulativeRewardRatio - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @instance - */ - ValidatorHistoricalRewards.prototype.cumulativeRewardRatio = $util.emptyArray; - - /** - * ValidatorHistoricalRewards referenceCount. - * @member {number} referenceCount - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @instance - */ - ValidatorHistoricalRewards.prototype.referenceCount = 0; - - /** - * Creates a new ValidatorHistoricalRewards instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} ValidatorHistoricalRewards instance - */ - ValidatorHistoricalRewards.create = function create(properties) { - return new ValidatorHistoricalRewards(properties); - }; - - /** - * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards} m ValidatorHistoricalRewards message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorHistoricalRewards.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.cumulativeRewardRatio != null && m.cumulativeRewardRatio.length) { - for (var i = 0; i < m.cumulativeRewardRatio.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(m.cumulativeRewardRatio[i], w.uint32(10).fork()).ldelim(); - } - if (m.referenceCount != null && Object.hasOwnProperty.call(m, "referenceCount")) - w.uint32(16).uint32(m.referenceCount); - return w; - }; - - /** - * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards} ValidatorHistoricalRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorHistoricalRewards.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.distribution.v1.ValidatorHistoricalRewards(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.cumulativeRewardRatio && m.cumulativeRewardRatio.length)) - m.cumulativeRewardRatio = []; - m.cumulativeRewardRatio.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); - break; - case 2: - m.referenceCount = r.uint32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ValidatorHistoricalRewards; - })(); - - v1.ValidatorCurrentRewards = (function() { - - /** - * Properties of a ValidatorCurrentRewards. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IValidatorCurrentRewards - * @property {Array.|null} [rewards] ValidatorCurrentRewards rewards - * @property {number|Long|null} [period] ValidatorCurrentRewards period - */ - - /** - * Constructs a new ValidatorCurrentRewards. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a ValidatorCurrentRewards. - * @implements IValidatorCurrentRewards - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards=} [p] Properties to set - */ - function ValidatorCurrentRewards(p) { - this.rewards = []; - 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]]; - } - - /** - * ValidatorCurrentRewards rewards. - * @member {Array.} rewards - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @instance - */ - ValidatorCurrentRewards.prototype.rewards = $util.emptyArray; - - /** - * ValidatorCurrentRewards period. - * @member {number|Long} period - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @instance - */ - ValidatorCurrentRewards.prototype.period = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new ValidatorCurrentRewards instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} ValidatorCurrentRewards instance - */ - ValidatorCurrentRewards.create = function create(properties) { - return new ValidatorCurrentRewards(properties); - }; - - /** - * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards} m ValidatorCurrentRewards message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorCurrentRewards.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.rewards != null && m.rewards.length) { - for (var i = 0; i < m.rewards.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(m.rewards[i], w.uint32(10).fork()).ldelim(); - } - if (m.period != null && Object.hasOwnProperty.call(m, "period")) - w.uint32(16).uint64(m.period); - return w; - }; - - /** - * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards} ValidatorCurrentRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorCurrentRewards.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.distribution.v1.ValidatorCurrentRewards(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.rewards && m.rewards.length)) - m.rewards = []; - m.rewards.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); - break; - case 2: - m.period = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ValidatorCurrentRewards; - })(); - - v1.ValidatorAccumulatedCommission = (function() { - - /** - * Properties of a ValidatorAccumulatedCommission. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IValidatorAccumulatedCommission - * @property {Array.|null} [commission] ValidatorAccumulatedCommission commission - */ - - /** - * Constructs a new ValidatorAccumulatedCommission. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a ValidatorAccumulatedCommission. - * @implements IValidatorAccumulatedCommission - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission=} [p] Properties to set - */ - function ValidatorAccumulatedCommission(p) { - this.commission = []; - 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]]; - } - - /** - * ValidatorAccumulatedCommission commission. - * @member {Array.} commission - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @instance - */ - ValidatorAccumulatedCommission.prototype.commission = $util.emptyArray; - - /** - * Creates a new ValidatorAccumulatedCommission instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission instance - */ - ValidatorAccumulatedCommission.create = function create(properties) { - return new ValidatorAccumulatedCommission(properties); - }; - - /** - * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission} m ValidatorAccumulatedCommission message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorAccumulatedCommission.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.commission != null && m.commission.length) { - for (var i = 0; i < m.commission.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(m.commission[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission} ValidatorAccumulatedCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorAccumulatedCommission.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.distribution.v1.ValidatorAccumulatedCommission(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.commission && m.commission.length)) - m.commission = []; - m.commission.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ValidatorAccumulatedCommission; - })(); - - v1.ValidatorOutstandingRewards = (function() { - - /** - * Properties of a ValidatorOutstandingRewards. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IValidatorOutstandingRewards - * @property {Array.|null} [rewards] ValidatorOutstandingRewards rewards - */ - - /** - * Constructs a new ValidatorOutstandingRewards. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a ValidatorOutstandingRewards. - * @implements IValidatorOutstandingRewards - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards=} [p] Properties to set - */ - function ValidatorOutstandingRewards(p) { - this.rewards = []; - 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]]; - } - - /** - * ValidatorOutstandingRewards rewards. - * @member {Array.} rewards - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @instance - */ - ValidatorOutstandingRewards.prototype.rewards = $util.emptyArray; - - /** - * Creates a new ValidatorOutstandingRewards instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} ValidatorOutstandingRewards instance - */ - ValidatorOutstandingRewards.create = function create(properties) { - return new ValidatorOutstandingRewards(properties); - }; - - /** - * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards} m ValidatorOutstandingRewards message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorOutstandingRewards.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.rewards != null && m.rewards.length) { - for (var i = 0; i < m.rewards.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(m.rewards[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards} ValidatorOutstandingRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorOutstandingRewards.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.distribution.v1.ValidatorOutstandingRewards(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.rewards && m.rewards.length)) - m.rewards = []; - m.rewards.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ValidatorOutstandingRewards; - })(); - - v1.ValidatorSlashEvent = (function() { - - /** - * Properties of a ValidatorSlashEvent. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IValidatorSlashEvent - * @property {number|Long|null} [validatorPeriod] ValidatorSlashEvent validatorPeriod - * @property {string|null} [fraction] ValidatorSlashEvent fraction - */ - - /** - * Constructs a new ValidatorSlashEvent. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a ValidatorSlashEvent. - * @implements IValidatorSlashEvent - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent=} [p] Properties to set - */ - function ValidatorSlashEvent(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]]; - } - - /** - * ValidatorSlashEvent validatorPeriod. - * @member {number|Long} validatorPeriod - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @instance - */ - ValidatorSlashEvent.prototype.validatorPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ValidatorSlashEvent fraction. - * @member {string} fraction - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @instance - */ - ValidatorSlashEvent.prototype.fraction = ""; - - /** - * Creates a new ValidatorSlashEvent instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} ValidatorSlashEvent instance - */ - ValidatorSlashEvent.create = function create(properties) { - return new ValidatorSlashEvent(properties); - }; - - /** - * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvent} m ValidatorSlashEvent message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSlashEvent.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.validatorPeriod != null && Object.hasOwnProperty.call(m, "validatorPeriod")) - w.uint32(8).uint64(m.validatorPeriod); - if (m.fraction != null && Object.hasOwnProperty.call(m, "fraction")) - w.uint32(18).string(m.fraction); - return w; - }; - - /** - * Decodes a ValidatorSlashEvent message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvent - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvent} ValidatorSlashEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSlashEvent.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.distribution.v1.ValidatorSlashEvent(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.validatorPeriod = r.uint64(); - break; - case 2: - m.fraction = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ValidatorSlashEvent; - })(); - - v1.ValidatorSlashEvents = (function() { - - /** - * Properties of a ValidatorSlashEvents. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IValidatorSlashEvents - * @property {Array.|null} [validatorSlashEvents] ValidatorSlashEvents validatorSlashEvents - */ - - /** - * Constructs a new ValidatorSlashEvents. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a ValidatorSlashEvents. - * @implements IValidatorSlashEvents - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents=} [p] Properties to set - */ - function ValidatorSlashEvents(p) { - this.validatorSlashEvents = []; - 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]]; - } - - /** - * ValidatorSlashEvents validatorSlashEvents. - * @member {Array.} validatorSlashEvents - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @instance - */ - ValidatorSlashEvents.prototype.validatorSlashEvents = $util.emptyArray; - - /** - * Creates a new ValidatorSlashEvents instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} ValidatorSlashEvents instance - */ - ValidatorSlashEvents.create = function create(properties) { - return new ValidatorSlashEvents(properties); - }; - - /** - * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @static - * @param {cosmos_sdk.x.distribution.v1.IValidatorSlashEvents} m ValidatorSlashEvents message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSlashEvents.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.validatorSlashEvents != null && m.validatorSlashEvents.length) { - for (var i = 0; i < m.validatorSlashEvents.length; ++i) - $root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.encode(m.validatorSlashEvents[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a ValidatorSlashEvents message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.ValidatorSlashEvents - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.ValidatorSlashEvents} ValidatorSlashEvents - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSlashEvents.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.distribution.v1.ValidatorSlashEvents(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.validatorSlashEvents && m.validatorSlashEvents.length)) - m.validatorSlashEvents = []; - m.validatorSlashEvents.push($root.cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ValidatorSlashEvents; - })(); - - v1.FeePool = (function() { - - /** - * Properties of a FeePool. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IFeePool - * @property {Array.|null} [communityPool] FeePool communityPool - */ - - /** - * Constructs a new FeePool. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a FeePool. - * @implements IFeePool - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IFeePool=} [p] Properties to set - */ - function FeePool(p) { - this.communityPool = []; - 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]]; - } - - /** - * FeePool communityPool. - * @member {Array.} communityPool - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @instance - */ - FeePool.prototype.communityPool = $util.emptyArray; - - /** - * Creates a new FeePool instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @static - * @param {cosmos_sdk.x.distribution.v1.IFeePool=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.FeePool} FeePool instance - */ - FeePool.create = function create(properties) { - return new FeePool(properties); - }; - - /** - * Encodes the specified FeePool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @static - * @param {cosmos_sdk.x.distribution.v1.IFeePool} m FeePool message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeePool.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.communityPool != null && m.communityPool.length) { - for (var i = 0; i < m.communityPool.length; ++i) - $root.cosmos_sdk.v1.DecCoin.encode(m.communityPool[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a FeePool message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.FeePool - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.FeePool} FeePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeePool.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.distribution.v1.FeePool(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.communityPool && m.communityPool.length)) - m.communityPool = []; - m.communityPool.push($root.cosmos_sdk.v1.DecCoin.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return FeePool; - })(); - - v1.CommunityPoolSpendProposal = (function() { - - /** - * Properties of a CommunityPoolSpendProposal. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface ICommunityPoolSpendProposal - * @property {string|null} [title] CommunityPoolSpendProposal title - * @property {string|null} [description] CommunityPoolSpendProposal description - * @property {Uint8Array|null} [recipient] CommunityPoolSpendProposal recipient - * @property {Array.|null} [amount] CommunityPoolSpendProposal amount - */ - - /** - * Constructs a new CommunityPoolSpendProposal. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a CommunityPoolSpendProposal. - * @implements ICommunityPoolSpendProposal - * @constructor - * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal=} [p] Properties to set - */ - function CommunityPoolSpendProposal(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]]; - } - - /** - * CommunityPoolSpendProposal title. - * @member {string} title - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @instance - */ - CommunityPoolSpendProposal.prototype.title = ""; - - /** - * CommunityPoolSpendProposal description. - * @member {string} description - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @instance - */ - CommunityPoolSpendProposal.prototype.description = ""; - - /** - * CommunityPoolSpendProposal recipient. - * @member {Uint8Array} recipient - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @instance - */ - CommunityPoolSpendProposal.prototype.recipient = $util.newBuffer([]); - - /** - * CommunityPoolSpendProposal amount. - * @member {Array.} amount - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @instance - */ - CommunityPoolSpendProposal.prototype.amount = $util.emptyArray; - - /** - * Creates a new CommunityPoolSpendProposal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @static - * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} CommunityPoolSpendProposal instance - */ - CommunityPoolSpendProposal.create = function create(properties) { - return new CommunityPoolSpendProposal(properties); - }; - - /** - * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @static - * @param {cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal} m CommunityPoolSpendProposal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommunityPoolSpendProposal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.title != null && Object.hasOwnProperty.call(m, "title")) - w.uint32(10).string(m.title); - if (m.description != null && Object.hasOwnProperty.call(m, "description")) - w.uint32(18).string(m.description); - if (m.recipient != null && Object.hasOwnProperty.call(m, "recipient")) - w.uint32(26).bytes(m.recipient); - 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(34).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal} CommunityPoolSpendProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommunityPoolSpendProposal.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.distribution.v1.CommunityPoolSpendProposal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.title = r.string(); - break; - case 2: - m.description = r.string(); - break; - case 3: - m.recipient = r.bytes(); - break; - case 4: - 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 CommunityPoolSpendProposal; - })(); - - v1.DelegatorStartingInfo = (function() { - - /** - * Properties of a DelegatorStartingInfo. - * @memberof cosmos_sdk.x.distribution.v1 - * @interface IDelegatorStartingInfo - * @property {number|Long|null} [previousPeriod] DelegatorStartingInfo previousPeriod - * @property {string|null} [stake] DelegatorStartingInfo stake - * @property {number|Long|null} [height] DelegatorStartingInfo height - */ - - /** - * Constructs a new DelegatorStartingInfo. - * @memberof cosmos_sdk.x.distribution.v1 - * @classdesc Represents a DelegatorStartingInfo. - * @implements IDelegatorStartingInfo - * @constructor - * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo=} [p] Properties to set - */ - function DelegatorStartingInfo(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]]; - } - - /** - * DelegatorStartingInfo previousPeriod. - * @member {number|Long} previousPeriod - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @instance - */ - DelegatorStartingInfo.prototype.previousPeriod = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * DelegatorStartingInfo stake. - * @member {string} stake - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @instance - */ - DelegatorStartingInfo.prototype.stake = ""; - - /** - * DelegatorStartingInfo height. - * @member {number|Long} height - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @instance - */ - DelegatorStartingInfo.prototype.height = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new DelegatorStartingInfo instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @static - * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo=} [properties] Properties to set - * @returns {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} DelegatorStartingInfo instance - */ - DelegatorStartingInfo.create = function create(properties) { - return new DelegatorStartingInfo(properties); - }; - - /** - * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @static - * @param {cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo} m DelegatorStartingInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DelegatorStartingInfo.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.previousPeriod != null && Object.hasOwnProperty.call(m, "previousPeriod")) - w.uint32(8).uint64(m.previousPeriod); - if (m.stake != null && Object.hasOwnProperty.call(m, "stake")) - w.uint32(18).string(m.stake); - if (m.height != null && Object.hasOwnProperty.call(m, "height")) - w.uint32(24).uint64(m.height); - return w; - }; - - /** - * Decodes a DelegatorStartingInfo message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.distribution.v1.DelegatorStartingInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.distribution.v1.DelegatorStartingInfo} DelegatorStartingInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DelegatorStartingInfo.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.distribution.v1.DelegatorStartingInfo(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.previousPeriod = r.uint64(); - break; - case 2: - m.stake = r.string(); - break; - case 3: - m.height = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return DelegatorStartingInfo; - })(); - - return v1; - })(); - - return distribution; - })(); - - x.evidence = (function() { - - /** - * Namespace evidence. - * @memberof cosmos_sdk.x - * @namespace - */ - var evidence = {}; - - evidence.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.evidence - * @namespace - */ - var v1 = {}; - - v1.MsgSubmitEvidence = (function() { - - /** - * Properties of a MsgSubmitEvidence. - * @memberof cosmos_sdk.x.evidence.v1 - * @interface IMsgSubmitEvidence - * @property {Uint8Array|null} [submitter] MsgSubmitEvidence submitter - * @property {google.protobuf.IAny|null} [evidence] MsgSubmitEvidence evidence - */ - - /** - * Constructs a new MsgSubmitEvidence. - * @memberof cosmos_sdk.x.evidence.v1 - * @classdesc Represents a MsgSubmitEvidence. - * @implements IMsgSubmitEvidence - * @constructor - * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence=} [p] Properties to set - */ - function MsgSubmitEvidence(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]]; - } - - /** - * MsgSubmitEvidence submitter. - * @member {Uint8Array} submitter - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @instance - */ - MsgSubmitEvidence.prototype.submitter = $util.newBuffer([]); - - /** - * MsgSubmitEvidence evidence. - * @member {google.protobuf.IAny|null|undefined} evidence - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @instance - */ - MsgSubmitEvidence.prototype.evidence = null; - - /** - * Creates a new MsgSubmitEvidence instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @static - * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence=} [properties] Properties to set - * @returns {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} MsgSubmitEvidence instance - */ - MsgSubmitEvidence.create = function create(properties) { - return new MsgSubmitEvidence(properties); - }; - - /** - * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @static - * @param {cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence} m MsgSubmitEvidence message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitEvidence.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.submitter != null && Object.hasOwnProperty.call(m, "submitter")) - w.uint32(10).bytes(m.submitter); - if (m.evidence != null && Object.hasOwnProperty.call(m, "evidence")) - $root.google.protobuf.Any.encode(m.evidence, w.uint32(18).fork()).ldelim(); - return w; - }; - - /** - * Decodes a MsgSubmitEvidence message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.evidence.v1.MsgSubmitEvidence - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.evidence.v1.MsgSubmitEvidence} MsgSubmitEvidence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitEvidence.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.evidence.v1.MsgSubmitEvidence(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.submitter = r.bytes(); - break; - case 2: - m.evidence = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgSubmitEvidence; - })(); - - v1.Equivocation = (function() { - - /** - * Properties of an Equivocation. - * @memberof cosmos_sdk.x.evidence.v1 - * @interface IEquivocation - * @property {number|Long|null} [height] Equivocation height - * @property {google.protobuf.ITimestamp|null} [time] Equivocation time - * @property {number|Long|null} [power] Equivocation power - * @property {Uint8Array|null} [consensusAddress] Equivocation consensusAddress - */ - - /** - * Constructs a new Equivocation. - * @memberof cosmos_sdk.x.evidence.v1 - * @classdesc Represents an Equivocation. - * @implements IEquivocation - * @constructor - * @param {cosmos_sdk.x.evidence.v1.IEquivocation=} [p] Properties to set - */ - function Equivocation(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]]; - } - - /** - * Equivocation height. - * @member {number|Long} height - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @instance - */ - Equivocation.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Equivocation time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @instance - */ - Equivocation.prototype.time = null; - - /** - * Equivocation power. - * @member {number|Long} power - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @instance - */ - Equivocation.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Equivocation consensusAddress. - * @member {Uint8Array} consensusAddress - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @instance - */ - Equivocation.prototype.consensusAddress = $util.newBuffer([]); - - /** - * Creates a new Equivocation instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @static - * @param {cosmos_sdk.x.evidence.v1.IEquivocation=} [properties] Properties to set - * @returns {cosmos_sdk.x.evidence.v1.Equivocation} Equivocation instance - */ - Equivocation.create = function create(properties) { - return new Equivocation(properties); - }; - - /** - * Encodes the specified Equivocation message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @static - * @param {cosmos_sdk.x.evidence.v1.IEquivocation} m Equivocation message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Equivocation.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); - if (m.time != null && Object.hasOwnProperty.call(m, "time")) - $root.google.protobuf.Timestamp.encode(m.time, w.uint32(18).fork()).ldelim(); - if (m.power != null && Object.hasOwnProperty.call(m, "power")) - w.uint32(24).int64(m.power); - if (m.consensusAddress != null && Object.hasOwnProperty.call(m, "consensusAddress")) - w.uint32(34).bytes(m.consensusAddress); - return w; - }; - - /** - * Decodes an Equivocation message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.evidence.v1.Equivocation - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.evidence.v1.Equivocation} Equivocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Equivocation.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.evidence.v1.Equivocation(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.height = r.int64(); - break; - case 2: - m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - case 3: - m.power = r.int64(); - break; - case 4: - m.consensusAddress = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Equivocation; - })(); - - return v1; - })(); - - return evidence; - })(); - - x.gov = (function() { - - /** - * Namespace gov. - * @memberof cosmos_sdk.x - * @namespace - */ - var gov = {}; - - gov.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.gov - * @namespace - */ - var v1 = {}; - - v1.MsgSubmitProposal = (function() { - - /** - * Properties of a MsgSubmitProposal. - * @memberof cosmos_sdk.x.gov.v1 - * @interface IMsgSubmitProposal - * @property {google.protobuf.IAny|null} [content] MsgSubmitProposal content - * @property {Array.|null} [initialDeposit] MsgSubmitProposal initialDeposit - * @property {Uint8Array|null} [proposer] MsgSubmitProposal proposer - */ - - /** - * Constructs a new MsgSubmitProposal. - * @memberof cosmos_sdk.x.gov.v1 - * @classdesc Represents a MsgSubmitProposal. - * @implements IMsgSubmitProposal - * @constructor - * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal=} [p] Properties to set - */ - function MsgSubmitProposal(p) { - this.initialDeposit = []; - 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]]; - } - - /** - * MsgSubmitProposal content. - * @member {google.protobuf.IAny|null|undefined} content - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.content = null; - - /** - * MsgSubmitProposal initialDeposit. - * @member {Array.} initialDeposit - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.initialDeposit = $util.emptyArray; - - /** - * MsgSubmitProposal proposer. - * @member {Uint8Array} proposer - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @instance - */ - MsgSubmitProposal.prototype.proposer = $util.newBuffer([]); - - /** - * Creates a new MsgSubmitProposal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @static - * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal=} [properties] Properties to set - * @returns {cosmos_sdk.x.gov.v1.MsgSubmitProposal} MsgSubmitProposal instance - */ - MsgSubmitProposal.create = function create(properties) { - return new MsgSubmitProposal(properties); - }; - - /** - * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @static - * @param {cosmos_sdk.x.gov.v1.IMsgSubmitProposal} m MsgSubmitProposal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgSubmitProposal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.content != null && Object.hasOwnProperty.call(m, "content")) - $root.google.protobuf.Any.encode(m.content, w.uint32(10).fork()).ldelim(); - if (m.initialDeposit != null && m.initialDeposit.length) { - for (var i = 0; i < m.initialDeposit.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.initialDeposit[i], w.uint32(18).fork()).ldelim(); - } - if (m.proposer != null && Object.hasOwnProperty.call(m, "proposer")) - w.uint32(26).bytes(m.proposer); - return w; - }; - - /** - * Decodes a MsgSubmitProposal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.gov.v1.MsgSubmitProposal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.gov.v1.MsgSubmitProposal} MsgSubmitProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSubmitProposal.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.gov.v1.MsgSubmitProposal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.content = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - case 2: - if (!(m.initialDeposit && m.initialDeposit.length)) - m.initialDeposit = []; - m.initialDeposit.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - case 3: - m.proposer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgSubmitProposal; - })(); - - v1.MsgVote = (function() { - - /** - * Properties of a MsgVote. - * @memberof cosmos_sdk.x.gov.v1 - * @interface IMsgVote - * @property {number|Long|null} [proposalId] MsgVote proposalId - * @property {Uint8Array|null} [voter] MsgVote voter - * @property {cosmos_sdk.x.gov.v1.VoteOption|null} [option] MsgVote option - */ - - /** - * Constructs a new MsgVote. - * @memberof cosmos_sdk.x.gov.v1 - * @classdesc Represents a MsgVote. - * @implements IMsgVote - * @constructor - * @param {cosmos_sdk.x.gov.v1.IMsgVote=} [p] Properties to set - */ - function MsgVote(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]]; - } - - /** - * MsgVote proposalId. - * @member {number|Long} proposalId - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @instance - */ - MsgVote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgVote voter. - * @member {Uint8Array} voter - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @instance - */ - MsgVote.prototype.voter = $util.newBuffer([]); - - /** - * MsgVote option. - * @member {cosmos_sdk.x.gov.v1.VoteOption} option - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @instance - */ - MsgVote.prototype.option = 0; - - /** - * Creates a new MsgVote instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @static - * @param {cosmos_sdk.x.gov.v1.IMsgVote=} [properties] Properties to set - * @returns {cosmos_sdk.x.gov.v1.MsgVote} MsgVote instance - */ - MsgVote.create = function create(properties) { - return new MsgVote(properties); - }; - - /** - * Encodes the specified MsgVote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @static - * @param {cosmos_sdk.x.gov.v1.IMsgVote} m MsgVote message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgVote.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) - w.uint32(8).uint64(m.proposalId); - if (m.voter != null && Object.hasOwnProperty.call(m, "voter")) - w.uint32(18).bytes(m.voter); - if (m.option != null && Object.hasOwnProperty.call(m, "option")) - w.uint32(24).int32(m.option); - return w; - }; - - /** - * Decodes a MsgVote message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.gov.v1.MsgVote - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.gov.v1.MsgVote} MsgVote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgVote.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.gov.v1.MsgVote(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.proposalId = r.uint64(); - break; - case 2: - m.voter = r.bytes(); - break; - case 3: - m.option = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgVote; - })(); - - v1.MsgDeposit = (function() { - - /** - * Properties of a MsgDeposit. - * @memberof cosmos_sdk.x.gov.v1 - * @interface IMsgDeposit - * @property {number|Long|null} [proposalId] MsgDeposit proposalId - * @property {Uint8Array|null} [depositor] MsgDeposit depositor - * @property {Array.|null} [amount] MsgDeposit amount - */ - - /** - * Constructs a new MsgDeposit. - * @memberof cosmos_sdk.x.gov.v1 - * @classdesc Represents a MsgDeposit. - * @implements IMsgDeposit - * @constructor - * @param {cosmos_sdk.x.gov.v1.IMsgDeposit=} [p] Properties to set - */ - function MsgDeposit(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]]; - } - - /** - * MsgDeposit proposalId. - * @member {number|Long} proposalId - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @instance - */ - MsgDeposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgDeposit depositor. - * @member {Uint8Array} depositor - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @instance - */ - MsgDeposit.prototype.depositor = $util.newBuffer([]); - - /** - * MsgDeposit amount. - * @member {Array.} amount - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @instance - */ - MsgDeposit.prototype.amount = $util.emptyArray; - - /** - * Creates a new MsgDeposit instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @static - * @param {cosmos_sdk.x.gov.v1.IMsgDeposit=} [properties] Properties to set - * @returns {cosmos_sdk.x.gov.v1.MsgDeposit} MsgDeposit instance - */ - MsgDeposit.create = function create(properties) { - return new MsgDeposit(properties); - }; - - /** - * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @static - * @param {cosmos_sdk.x.gov.v1.IMsgDeposit} m MsgDeposit message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDeposit.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) - w.uint32(8).uint64(m.proposalId); - if (m.depositor != null && Object.hasOwnProperty.call(m, "depositor")) - w.uint32(18).bytes(m.depositor); - 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; - }; - - /** - * Decodes a MsgDeposit message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.gov.v1.MsgDeposit - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.gov.v1.MsgDeposit} MsgDeposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDeposit.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.gov.v1.MsgDeposit(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.proposalId = r.uint64(); - break; - case 2: - m.depositor = 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 MsgDeposit; - })(); - - /** - * VoteOption enum. - * @name cosmos_sdk.x.gov.v1.VoteOption - * @enum {number} - * @property {number} VOTE_OPTION_UNSPECIFIED=0 VOTE_OPTION_UNSPECIFIED value - * @property {number} VOTE_OPTION_YES=1 VOTE_OPTION_YES value - * @property {number} VOTE_OPTION_ABSTAIN=2 VOTE_OPTION_ABSTAIN value - * @property {number} VOTE_OPTION_NO=3 VOTE_OPTION_NO value - * @property {number} VOTE_OPTION_NO_WITH_VETO=4 VOTE_OPTION_NO_WITH_VETO value - */ - v1.VoteOption = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VOTE_OPTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "VOTE_OPTION_YES"] = 1; - values[valuesById[2] = "VOTE_OPTION_ABSTAIN"] = 2; - values[valuesById[3] = "VOTE_OPTION_NO"] = 3; - values[valuesById[4] = "VOTE_OPTION_NO_WITH_VETO"] = 4; - return values; - })(); - - v1.TextProposal = (function() { - - /** - * Properties of a TextProposal. - * @memberof cosmos_sdk.x.gov.v1 - * @interface ITextProposal - * @property {string|null} [title] TextProposal title - * @property {string|null} [description] TextProposal description - */ - - /** - * Constructs a new TextProposal. - * @memberof cosmos_sdk.x.gov.v1 - * @classdesc Represents a TextProposal. - * @implements ITextProposal - * @constructor - * @param {cosmos_sdk.x.gov.v1.ITextProposal=} [p] Properties to set - */ - function TextProposal(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]]; - } - - /** - * TextProposal title. - * @member {string} title - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @instance - */ - TextProposal.prototype.title = ""; - - /** - * TextProposal description. - * @member {string} description - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @instance - */ - TextProposal.prototype.description = ""; - - /** - * Creates a new TextProposal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @static - * @param {cosmos_sdk.x.gov.v1.ITextProposal=} [properties] Properties to set - * @returns {cosmos_sdk.x.gov.v1.TextProposal} TextProposal instance - */ - TextProposal.create = function create(properties) { - return new TextProposal(properties); - }; - - /** - * Encodes the specified TextProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @static - * @param {cosmos_sdk.x.gov.v1.ITextProposal} m TextProposal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextProposal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.title != null && Object.hasOwnProperty.call(m, "title")) - w.uint32(10).string(m.title); - if (m.description != null && Object.hasOwnProperty.call(m, "description")) - w.uint32(18).string(m.description); - return w; - }; - - /** - * Decodes a TextProposal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.gov.v1.TextProposal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.gov.v1.TextProposal} TextProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextProposal.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.gov.v1.TextProposal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.title = r.string(); - break; - case 2: - m.description = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return TextProposal; - })(); - - v1.Deposit = (function() { - - /** - * Properties of a Deposit. - * @memberof cosmos_sdk.x.gov.v1 - * @interface IDeposit - * @property {number|Long|null} [proposalId] Deposit proposalId - * @property {Uint8Array|null} [depositor] Deposit depositor - * @property {Array.|null} [amount] Deposit amount - */ - - /** - * Constructs a new Deposit. - * @memberof cosmos_sdk.x.gov.v1 - * @classdesc Represents a Deposit. - * @implements IDeposit - * @constructor - * @param {cosmos_sdk.x.gov.v1.IDeposit=} [p] Properties to set - */ - function Deposit(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]]; - } - - /** - * Deposit proposalId. - * @member {number|Long} proposalId - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @instance - */ - Deposit.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Deposit depositor. - * @member {Uint8Array} depositor - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @instance - */ - Deposit.prototype.depositor = $util.newBuffer([]); - - /** - * Deposit amount. - * @member {Array.} amount - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @instance - */ - Deposit.prototype.amount = $util.emptyArray; - - /** - * Creates a new Deposit instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @static - * @param {cosmos_sdk.x.gov.v1.IDeposit=} [properties] Properties to set - * @returns {cosmos_sdk.x.gov.v1.Deposit} Deposit instance - */ - Deposit.create = function create(properties) { - return new Deposit(properties); - }; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @static - * @param {cosmos_sdk.x.gov.v1.IDeposit} m Deposit message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Deposit.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) - w.uint32(8).uint64(m.proposalId); - if (m.depositor != null && Object.hasOwnProperty.call(m, "depositor")) - w.uint32(18).bytes(m.depositor); - 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; - }; - - /** - * Decodes a Deposit message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.gov.v1.Deposit - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.gov.v1.Deposit} Deposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Deposit.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.gov.v1.Deposit(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.proposalId = r.uint64(); - break; - case 2: - m.depositor = 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 Deposit; - })(); - - v1.Proposal = (function() { - - /** - * Properties of a Proposal. - * @memberof cosmos_sdk.x.gov.v1 - * @interface IProposal - * @property {number|Long|null} [proposalId] Proposal proposalId - * @property {google.protobuf.IAny|null} [content] Proposal content - * @property {cosmos_sdk.x.gov.v1.ProposalStatus|null} [status] Proposal status - * @property {cosmos_sdk.x.gov.v1.ITallyResult|null} [finalTallyResult] Proposal finalTallyResult - * @property {google.protobuf.ITimestamp|null} [submitTime] Proposal submitTime - * @property {google.protobuf.ITimestamp|null} [depositEndTime] Proposal depositEndTime - * @property {Array.|null} [totalDeposit] Proposal totalDeposit - * @property {google.protobuf.ITimestamp|null} [votingStartTime] Proposal votingStartTime - * @property {google.protobuf.ITimestamp|null} [votingEndTime] Proposal votingEndTime - */ - - /** - * Constructs a new Proposal. - * @memberof cosmos_sdk.x.gov.v1 - * @classdesc Represents a Proposal. - * @implements IProposal - * @constructor - * @param {cosmos_sdk.x.gov.v1.IProposal=} [p] Properties to set - */ - function Proposal(p) { - this.totalDeposit = []; - 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]]; - } - - /** - * Proposal proposalId. - * @member {number|Long} proposalId - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - */ - Proposal.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Proposal content. - * @member {google.protobuf.IAny|null|undefined} content - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - */ - Proposal.prototype.content = null; - - /** - * Proposal status. - * @member {cosmos_sdk.x.gov.v1.ProposalStatus} status - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - */ - Proposal.prototype.status = 0; - - /** - * Proposal finalTallyResult. - * @member {cosmos_sdk.x.gov.v1.ITallyResult|null|undefined} finalTallyResult - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - */ - Proposal.prototype.finalTallyResult = null; - - /** - * Proposal submitTime. - * @member {google.protobuf.ITimestamp|null|undefined} submitTime - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - */ - Proposal.prototype.submitTime = null; - - /** - * Proposal depositEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} depositEndTime - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - */ - Proposal.prototype.depositEndTime = null; - - /** - * Proposal totalDeposit. - * @member {Array.} totalDeposit - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - */ - Proposal.prototype.totalDeposit = $util.emptyArray; - - /** - * Proposal votingStartTime. - * @member {google.protobuf.ITimestamp|null|undefined} votingStartTime - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - */ - Proposal.prototype.votingStartTime = null; - - /** - * Proposal votingEndTime. - * @member {google.protobuf.ITimestamp|null|undefined} votingEndTime - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @instance - */ - Proposal.prototype.votingEndTime = null; - - /** - * Creates a new Proposal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @static - * @param {cosmos_sdk.x.gov.v1.IProposal=} [properties] Properties to set - * @returns {cosmos_sdk.x.gov.v1.Proposal} Proposal instance - */ - Proposal.create = function create(properties) { - return new Proposal(properties); - }; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @static - * @param {cosmos_sdk.x.gov.v1.IProposal} m Proposal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Proposal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) - w.uint32(8).uint64(m.proposalId); - if (m.content != null && Object.hasOwnProperty.call(m, "content")) - $root.google.protobuf.Any.encode(m.content, w.uint32(18).fork()).ldelim(); - if (m.status != null && Object.hasOwnProperty.call(m, "status")) - w.uint32(24).int32(m.status); - if (m.finalTallyResult != null && Object.hasOwnProperty.call(m, "finalTallyResult")) - $root.cosmos_sdk.x.gov.v1.TallyResult.encode(m.finalTallyResult, w.uint32(34).fork()).ldelim(); - if (m.submitTime != null && Object.hasOwnProperty.call(m, "submitTime")) - $root.google.protobuf.Timestamp.encode(m.submitTime, w.uint32(42).fork()).ldelim(); - if (m.depositEndTime != null && Object.hasOwnProperty.call(m, "depositEndTime")) - $root.google.protobuf.Timestamp.encode(m.depositEndTime, w.uint32(50).fork()).ldelim(); - if (m.totalDeposit != null && m.totalDeposit.length) { - for (var i = 0; i < m.totalDeposit.length; ++i) - $root.cosmos_sdk.v1.Coin.encode(m.totalDeposit[i], w.uint32(58).fork()).ldelim(); - } - if (m.votingStartTime != null && Object.hasOwnProperty.call(m, "votingStartTime")) - $root.google.protobuf.Timestamp.encode(m.votingStartTime, w.uint32(66).fork()).ldelim(); - if (m.votingEndTime != null && Object.hasOwnProperty.call(m, "votingEndTime")) - $root.google.protobuf.Timestamp.encode(m.votingEndTime, w.uint32(74).fork()).ldelim(); - return w; - }; - - /** - * Decodes a Proposal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.gov.v1.Proposal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.gov.v1.Proposal} Proposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Proposal.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.gov.v1.Proposal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.proposalId = r.uint64(); - break; - case 2: - m.content = $root.google.protobuf.Any.decode(r, r.uint32()); - break; - case 3: - m.status = r.int32(); - break; - case 4: - m.finalTallyResult = $root.cosmos_sdk.x.gov.v1.TallyResult.decode(r, r.uint32()); - break; - case 5: - m.submitTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - case 6: - m.depositEndTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - case 7: - if (!(m.totalDeposit && m.totalDeposit.length)) - m.totalDeposit = []; - m.totalDeposit.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - case 8: - m.votingStartTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - case 9: - m.votingEndTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Proposal; - })(); - - /** - * ProposalStatus enum. - * @name cosmos_sdk.x.gov.v1.ProposalStatus - * @enum {number} - * @property {number} PROPOSAL_STATUS_UNSPECIFIED=0 PROPOSAL_STATUS_UNSPECIFIED value - * @property {number} PROPOSAL_STATUS_DEPOSIT_PERIOD=1 PROPOSAL_STATUS_DEPOSIT_PERIOD value - * @property {number} PROPOSAL_STATUS_VOTING_PERIOD=2 PROPOSAL_STATUS_VOTING_PERIOD value - * @property {number} PROPOSAL_STATUS_PASSED=3 PROPOSAL_STATUS_PASSED value - * @property {number} PROPOSAL_STATUS_REJECTED=4 PROPOSAL_STATUS_REJECTED value - * @property {number} PROPOSAL_STATUS_FAILED=5 PROPOSAL_STATUS_FAILED value - */ - v1.ProposalStatus = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "PROPOSAL_STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROPOSAL_STATUS_DEPOSIT_PERIOD"] = 1; - values[valuesById[2] = "PROPOSAL_STATUS_VOTING_PERIOD"] = 2; - values[valuesById[3] = "PROPOSAL_STATUS_PASSED"] = 3; - values[valuesById[4] = "PROPOSAL_STATUS_REJECTED"] = 4; - values[valuesById[5] = "PROPOSAL_STATUS_FAILED"] = 5; - return values; - })(); - - v1.TallyResult = (function() { - - /** - * Properties of a TallyResult. - * @memberof cosmos_sdk.x.gov.v1 - * @interface ITallyResult - * @property {string|null} [yes] TallyResult yes - * @property {string|null} [abstain] TallyResult abstain - * @property {string|null} [no] TallyResult no - * @property {string|null} [noWithVeto] TallyResult noWithVeto - */ - - /** - * Constructs a new TallyResult. - * @memberof cosmos_sdk.x.gov.v1 - * @classdesc Represents a TallyResult. - * @implements ITallyResult - * @constructor - * @param {cosmos_sdk.x.gov.v1.ITallyResult=} [p] Properties to set - */ - function TallyResult(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]]; - } - - /** - * TallyResult yes. - * @member {string} yes - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.yes = ""; - - /** - * TallyResult abstain. - * @member {string} abstain - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.abstain = ""; - - /** - * TallyResult no. - * @member {string} no - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.no = ""; - - /** - * TallyResult noWithVeto. - * @member {string} noWithVeto - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @instance - */ - TallyResult.prototype.noWithVeto = ""; - - /** - * Creates a new TallyResult instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @static - * @param {cosmos_sdk.x.gov.v1.ITallyResult=} [properties] Properties to set - * @returns {cosmos_sdk.x.gov.v1.TallyResult} TallyResult instance - */ - TallyResult.create = function create(properties) { - return new TallyResult(properties); - }; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @static - * @param {cosmos_sdk.x.gov.v1.ITallyResult} m TallyResult message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TallyResult.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.yes != null && Object.hasOwnProperty.call(m, "yes")) - w.uint32(10).string(m.yes); - if (m.abstain != null && Object.hasOwnProperty.call(m, "abstain")) - w.uint32(18).string(m.abstain); - if (m.no != null && Object.hasOwnProperty.call(m, "no")) - w.uint32(26).string(m.no); - if (m.noWithVeto != null && Object.hasOwnProperty.call(m, "noWithVeto")) - w.uint32(34).string(m.noWithVeto); - return w; - }; - - /** - * Decodes a TallyResult message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.gov.v1.TallyResult - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.gov.v1.TallyResult} TallyResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TallyResult.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.gov.v1.TallyResult(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.yes = r.string(); - break; - case 2: - m.abstain = r.string(); - break; - case 3: - m.no = r.string(); - break; - case 4: - m.noWithVeto = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return TallyResult; - })(); - - v1.Vote = (function() { - - /** - * Properties of a Vote. - * @memberof cosmos_sdk.x.gov.v1 - * @interface IVote - * @property {number|Long|null} [proposalId] Vote proposalId - * @property {Uint8Array|null} [voter] Vote voter - * @property {cosmos_sdk.x.gov.v1.VoteOption|null} [option] Vote option - */ - - /** - * Constructs a new Vote. - * @memberof cosmos_sdk.x.gov.v1 - * @classdesc Represents a Vote. - * @implements IVote - * @constructor - * @param {cosmos_sdk.x.gov.v1.IVote=} [p] Properties to set - */ - function Vote(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]]; - } - - /** - * Vote proposalId. - * @member {number|Long} proposalId - * @memberof cosmos_sdk.x.gov.v1.Vote - * @instance - */ - Vote.prototype.proposalId = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Vote voter. - * @member {Uint8Array} voter - * @memberof cosmos_sdk.x.gov.v1.Vote - * @instance - */ - Vote.prototype.voter = $util.newBuffer([]); - - /** - * Vote option. - * @member {cosmos_sdk.x.gov.v1.VoteOption} option - * @memberof cosmos_sdk.x.gov.v1.Vote - * @instance - */ - Vote.prototype.option = 0; - - /** - * Creates a new Vote instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.gov.v1.Vote - * @static - * @param {cosmos_sdk.x.gov.v1.IVote=} [properties] Properties to set - * @returns {cosmos_sdk.x.gov.v1.Vote} Vote instance - */ - Vote.create = function create(properties) { - return new Vote(properties); - }; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.gov.v1.Vote - * @static - * @param {cosmos_sdk.x.gov.v1.IVote} m Vote message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Vote.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.proposalId != null && Object.hasOwnProperty.call(m, "proposalId")) - w.uint32(8).uint64(m.proposalId); - if (m.voter != null && Object.hasOwnProperty.call(m, "voter")) - w.uint32(18).bytes(m.voter); - if (m.option != null && Object.hasOwnProperty.call(m, "option")) - w.uint32(24).int32(m.option); - return w; - }; - - /** - * Decodes a Vote message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.gov.v1.Vote - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.gov.v1.Vote} Vote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Vote.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.gov.v1.Vote(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.proposalId = r.uint64(); - break; - case 2: - m.voter = r.bytes(); - break; - case 3: - m.option = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Vote; - })(); - - return v1; - })(); - - return gov; - })(); - - x.transfer = (function() { - - /** - * Namespace transfer. - * @memberof cosmos_sdk.x - * @namespace - */ - var transfer = {}; - - transfer.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.transfer - * @namespace - */ - var v1 = {}; - - v1.MsgTransfer = (function() { - - /** - * Properties of a MsgTransfer. - * @memberof cosmos_sdk.x.transfer.v1 - * @interface IMsgTransfer - * @property {string|null} [sourcePort] MsgTransfer sourcePort - * @property {string|null} [sourceChannel] MsgTransfer sourceChannel - * @property {Array.|null} [amount] MsgTransfer amount - * @property {Uint8Array|null} [sender] MsgTransfer sender - * @property {string|null} [receiver] MsgTransfer receiver - * @property {number|Long|null} [timeoutHeight] MsgTransfer timeoutHeight - * @property {number|Long|null} [timeoutTimestamp] MsgTransfer timeoutTimestamp - */ - - /** - * Constructs a new MsgTransfer. - * @memberof cosmos_sdk.x.transfer.v1 - * @classdesc Represents a MsgTransfer. - * @implements IMsgTransfer - * @constructor - * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer=} [p] Properties to set - */ - function MsgTransfer(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]]; - } - - /** - * MsgTransfer sourcePort. - * @member {string} sourcePort - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.sourcePort = ""; - - /** - * MsgTransfer sourceChannel. - * @member {string} sourceChannel - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.sourceChannel = ""; - - /** - * MsgTransfer amount. - * @member {Array.} amount - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.amount = $util.emptyArray; - - /** - * MsgTransfer sender. - * @member {Uint8Array} sender - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.sender = $util.newBuffer([]); - - /** - * MsgTransfer receiver. - * @member {string} receiver - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.receiver = ""; - - /** - * MsgTransfer timeoutHeight. - * @member {number|Long} timeoutHeight - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTransfer timeoutTimestamp. - * @member {number|Long} timeoutTimestamp - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @instance - */ - MsgTransfer.prototype.timeoutTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new MsgTransfer instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @static - * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer=} [properties] Properties to set - * @returns {cosmos_sdk.x.transfer.v1.MsgTransfer} MsgTransfer instance - */ - MsgTransfer.create = function create(properties) { - return new MsgTransfer(properties); - }; - - /** - * Encodes the specified MsgTransfer message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @static - * @param {cosmos_sdk.x.transfer.v1.IMsgTransfer} m MsgTransfer message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTransfer.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.sourcePort != null && Object.hasOwnProperty.call(m, "sourcePort")) - w.uint32(10).string(m.sourcePort); - if (m.sourceChannel != null && Object.hasOwnProperty.call(m, "sourceChannel")) - w.uint32(18).string(m.sourceChannel); - 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(); - } - if (m.sender != null && Object.hasOwnProperty.call(m, "sender")) - w.uint32(34).bytes(m.sender); - if (m.receiver != null && Object.hasOwnProperty.call(m, "receiver")) - w.uint32(42).string(m.receiver); - if (m.timeoutHeight != null && Object.hasOwnProperty.call(m, "timeoutHeight")) - w.uint32(48).uint64(m.timeoutHeight); - if (m.timeoutTimestamp != null && Object.hasOwnProperty.call(m, "timeoutTimestamp")) - w.uint32(56).uint64(m.timeoutTimestamp); - return w; - }; - - /** - * Decodes a MsgTransfer message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.transfer.v1.MsgTransfer - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.transfer.v1.MsgTransfer} MsgTransfer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTransfer.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.transfer.v1.MsgTransfer(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.sourcePort = r.string(); - break; - case 2: - m.sourceChannel = r.string(); - break; - case 3: - if (!(m.amount && m.amount.length)) - m.amount = []; - m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); - break; - case 4: - m.sender = r.bytes(); - break; - case 5: - m.receiver = r.string(); - break; - case 6: - m.timeoutHeight = r.uint64(); - break; - case 7: - m.timeoutTimestamp = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgTransfer; - })(); - - v1.FungibleTokenPacketData = (function() { - - /** - * Properties of a FungibleTokenPacketData. - * @memberof cosmos_sdk.x.transfer.v1 - * @interface IFungibleTokenPacketData - * @property {Array.|null} [amount] FungibleTokenPacketData amount - * @property {string|null} [sender] FungibleTokenPacketData sender - * @property {string|null} [receiver] FungibleTokenPacketData receiver - */ - - /** - * Constructs a new FungibleTokenPacketData. - * @memberof cosmos_sdk.x.transfer.v1 - * @classdesc Represents a FungibleTokenPacketData. - * @implements IFungibleTokenPacketData - * @constructor - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData=} [p] Properties to set - */ - function FungibleTokenPacketData(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]]; - } - - /** - * FungibleTokenPacketData amount. - * @member {Array.} amount - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.amount = $util.emptyArray; - - /** - * FungibleTokenPacketData sender. - * @member {string} sender - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.sender = ""; - - /** - * FungibleTokenPacketData receiver. - * @member {string} receiver - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @instance - */ - FungibleTokenPacketData.prototype.receiver = ""; - - /** - * Creates a new FungibleTokenPacketData instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @static - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData=} [properties] Properties to set - * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData instance - */ - FungibleTokenPacketData.create = function create(properties) { - return new FungibleTokenPacketData(properties); - }; - - /** - * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @static - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData} m FungibleTokenPacketData message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FungibleTokenPacketData.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.sender != null && Object.hasOwnProperty.call(m, "sender")) - w.uint32(18).string(m.sender); - if (m.receiver != null && Object.hasOwnProperty.call(m, "receiver")) - w.uint32(26).string(m.receiver); - return w; - }; - - /** - * Decodes a FungibleTokenPacketData message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketData - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketData} FungibleTokenPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FungibleTokenPacketData.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.transfer.v1.FungibleTokenPacketData(); - 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.sender = r.string(); - break; - case 3: - m.receiver = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return FungibleTokenPacketData; - })(); - - v1.FungibleTokenPacketAcknowledgement = (function() { - - /** - * Properties of a FungibleTokenPacketAcknowledgement. - * @memberof cosmos_sdk.x.transfer.v1 - * @interface IFungibleTokenPacketAcknowledgement - * @property {boolean|null} [success] FungibleTokenPacketAcknowledgement success - * @property {string|null} [error] FungibleTokenPacketAcknowledgement error - */ - - /** - * Constructs a new FungibleTokenPacketAcknowledgement. - * @memberof cosmos_sdk.x.transfer.v1 - * @classdesc Represents a FungibleTokenPacketAcknowledgement. - * @implements IFungibleTokenPacketAcknowledgement - * @constructor - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement=} [p] Properties to set - */ - function FungibleTokenPacketAcknowledgement(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]]; - } - - /** - * FungibleTokenPacketAcknowledgement success. - * @member {boolean} success - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @instance - */ - FungibleTokenPacketAcknowledgement.prototype.success = false; - - /** - * FungibleTokenPacketAcknowledgement error. - * @member {string} error - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @instance - */ - FungibleTokenPacketAcknowledgement.prototype.error = ""; - - /** - * Creates a new FungibleTokenPacketAcknowledgement instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @static - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement=} [properties] Properties to set - * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} FungibleTokenPacketAcknowledgement instance - */ - FungibleTokenPacketAcknowledgement.create = function create(properties) { - return new FungibleTokenPacketAcknowledgement(properties); - }; - - /** - * Encodes the specified FungibleTokenPacketAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @static - * @param {cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement} m FungibleTokenPacketAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FungibleTokenPacketAcknowledgement.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.success != null && Object.hasOwnProperty.call(m, "success")) - w.uint32(8).bool(m.success); - if (m.error != null && Object.hasOwnProperty.call(m, "error")) - w.uint32(18).string(m.error); - return w; - }; - - /** - * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement} FungibleTokenPacketAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FungibleTokenPacketAcknowledgement.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.transfer.v1.FungibleTokenPacketAcknowledgement(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.success = r.bool(); - break; - case 2: - m.error = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return FungibleTokenPacketAcknowledgement; - })(); - - return v1; - })(); - - return transfer; - })(); - - x.ibc = (function() { - - /** - * Namespace ibc. - * @memberof cosmos_sdk.x - * @namespace - */ - var ibc = {}; - - ibc.connection = (function() { - - /** - * Namespace connection. - * @memberof cosmos_sdk.x.ibc - * @namespace - */ - var connection = {}; - - connection.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.ibc.connection - * @namespace - */ - var v1 = {}; - - v1.MsgConnectionOpenInit = (function() { - - /** - * Properties of a MsgConnectionOpenInit. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @interface IMsgConnectionOpenInit - * @property {string|null} [clientId] MsgConnectionOpenInit clientId - * @property {string|null} [connectionId] MsgConnectionOpenInit connectionId - * @property {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenInit counterparty - * @property {Uint8Array|null} [signer] MsgConnectionOpenInit signer - */ - - /** - * Constructs a new MsgConnectionOpenInit. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @classdesc Represents a MsgConnectionOpenInit. - * @implements IMsgConnectionOpenInit - * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit=} [p] Properties to set - */ - function MsgConnectionOpenInit(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]]; - } - - /** - * MsgConnectionOpenInit clientId. - * @member {string} clientId - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.clientId = ""; - - /** - * MsgConnectionOpenInit connectionId. - * @member {string} connectionId - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.connectionId = ""; - - /** - * MsgConnectionOpenInit counterparty. - * @member {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.counterparty = null; - - /** - * MsgConnectionOpenInit signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @instance - */ - MsgConnectionOpenInit.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgConnectionOpenInit instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit instance - */ - MsgConnectionOpenInit.create = function create(properties) { - return new MsgConnectionOpenInit(properties); - }; - - /** - * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit} m MsgConnectionOpenInit message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenInit.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) - w.uint32(10).string(m.clientId); - if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) - w.uint32(18).string(m.connectionId); - if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) - $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(m.counterparty, w.uint32(26).fork()).ldelim(); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(34).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgConnectionOpenInit message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit} MsgConnectionOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenInit.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.ibc.connection.v1.MsgConnectionOpenInit(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.clientId = r.string(); - break; - case 2: - m.connectionId = r.string(); - break; - case 3: - m.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(r, r.uint32()); - break; - case 4: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgConnectionOpenInit; - })(); - - v1.MsgConnectionOpenTry = (function() { - - /** - * Properties of a MsgConnectionOpenTry. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @interface IMsgConnectionOpenTry - * @property {string|null} [clientId] MsgConnectionOpenTry clientId - * @property {string|null} [connectionId] MsgConnectionOpenTry connectionId - * @property {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null} [counterparty] MsgConnectionOpenTry counterparty - * @property {Array.|null} [counterpartyVersions] MsgConnectionOpenTry counterpartyVersions - * @property {Uint8Array|null} [proofInit] MsgConnectionOpenTry proofInit - * @property {number|Long|null} [proofHeight] MsgConnectionOpenTry proofHeight - * @property {Uint8Array|null} [proofConsensus] MsgConnectionOpenTry proofConsensus - * @property {number|Long|null} [consensusHeight] MsgConnectionOpenTry consensusHeight - * @property {Uint8Array|null} [signer] MsgConnectionOpenTry signer - */ - - /** - * Constructs a new MsgConnectionOpenTry. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @classdesc Represents a MsgConnectionOpenTry. - * @implements IMsgConnectionOpenTry - * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry=} [p] Properties to set - */ - function MsgConnectionOpenTry(p) { - this.counterpartyVersions = []; - 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]]; - } - - /** - * MsgConnectionOpenTry clientId. - * @member {string} clientId - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.clientId = ""; - - /** - * MsgConnectionOpenTry connectionId. - * @member {string} connectionId - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.connectionId = ""; - - /** - * MsgConnectionOpenTry counterparty. - * @member {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.counterparty = null; - - /** - * MsgConnectionOpenTry counterpartyVersions. - * @member {Array.} counterpartyVersions - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.counterpartyVersions = $util.emptyArray; - - /** - * MsgConnectionOpenTry proofInit. - * @member {Uint8Array} proofInit - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proofInit = $util.newBuffer([]); - - /** - * MsgConnectionOpenTry proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgConnectionOpenTry proofConsensus. - * @member {Uint8Array} proofConsensus - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.proofConsensus = $util.newBuffer([]); - - /** - * MsgConnectionOpenTry consensusHeight. - * @member {number|Long} consensusHeight - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.consensusHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgConnectionOpenTry signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @instance - */ - MsgConnectionOpenTry.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgConnectionOpenTry instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry instance - */ - MsgConnectionOpenTry.create = function create(properties) { - return new MsgConnectionOpenTry(properties); - }; - - /** - * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry} m MsgConnectionOpenTry message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenTry.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) - w.uint32(10).string(m.clientId); - if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) - w.uint32(18).string(m.connectionId); - if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) - $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(m.counterparty, w.uint32(26).fork()).ldelim(); - if (m.counterpartyVersions != null && m.counterpartyVersions.length) { - for (var i = 0; i < m.counterpartyVersions.length; ++i) - w.uint32(34).string(m.counterpartyVersions[i]); - } - if (m.proofInit != null && Object.hasOwnProperty.call(m, "proofInit")) - w.uint32(42).bytes(m.proofInit); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(48).uint64(m.proofHeight); - if (m.proofConsensus != null && Object.hasOwnProperty.call(m, "proofConsensus")) - w.uint32(58).bytes(m.proofConsensus); - if (m.consensusHeight != null && Object.hasOwnProperty.call(m, "consensusHeight")) - w.uint32(64).uint64(m.consensusHeight); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(74).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgConnectionOpenTry message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry} MsgConnectionOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenTry.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.ibc.connection.v1.MsgConnectionOpenTry(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.clientId = r.string(); - break; - case 2: - m.connectionId = r.string(); - break; - case 3: - m.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(r, r.uint32()); - break; - case 4: - if (!(m.counterpartyVersions && m.counterpartyVersions.length)) - m.counterpartyVersions = []; - m.counterpartyVersions.push(r.string()); - break; - case 5: - m.proofInit = r.bytes(); - break; - case 6: - m.proofHeight = r.uint64(); - break; - case 7: - m.proofConsensus = r.bytes(); - break; - case 8: - m.consensusHeight = r.uint64(); - break; - case 9: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgConnectionOpenTry; - })(); - - v1.MsgConnectionOpenAck = (function() { - - /** - * Properties of a MsgConnectionOpenAck. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @interface IMsgConnectionOpenAck - * @property {string|null} [connectionId] MsgConnectionOpenAck connectionId - * @property {string|null} [version] MsgConnectionOpenAck version - * @property {Uint8Array|null} [proofTry] MsgConnectionOpenAck proofTry - * @property {number|Long|null} [proofHeight] MsgConnectionOpenAck proofHeight - * @property {Uint8Array|null} [proofConsensus] MsgConnectionOpenAck proofConsensus - * @property {number|Long|null} [consensusHeight] MsgConnectionOpenAck consensusHeight - * @property {Uint8Array|null} [signer] MsgConnectionOpenAck signer - */ - - /** - * Constructs a new MsgConnectionOpenAck. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @classdesc Represents a MsgConnectionOpenAck. - * @implements IMsgConnectionOpenAck - * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck=} [p] Properties to set - */ - function MsgConnectionOpenAck(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]]; - } - - /** - * MsgConnectionOpenAck connectionId. - * @member {string} connectionId - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.connectionId = ""; - - /** - * MsgConnectionOpenAck version. - * @member {string} version - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.version = ""; - - /** - * MsgConnectionOpenAck proofTry. - * @member {Uint8Array} proofTry - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proofTry = $util.newBuffer([]); - - /** - * MsgConnectionOpenAck proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgConnectionOpenAck proofConsensus. - * @member {Uint8Array} proofConsensus - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.proofConsensus = $util.newBuffer([]); - - /** - * MsgConnectionOpenAck consensusHeight. - * @member {number|Long} consensusHeight - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.consensusHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgConnectionOpenAck signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @instance - */ - MsgConnectionOpenAck.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgConnectionOpenAck instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck instance - */ - MsgConnectionOpenAck.create = function create(properties) { - return new MsgConnectionOpenAck(properties); - }; - - /** - * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck} m MsgConnectionOpenAck message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenAck.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) - w.uint32(10).string(m.connectionId); - if (m.version != null && Object.hasOwnProperty.call(m, "version")) - w.uint32(18).string(m.version); - if (m.proofTry != null && Object.hasOwnProperty.call(m, "proofTry")) - w.uint32(26).bytes(m.proofTry); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(32).uint64(m.proofHeight); - if (m.proofConsensus != null && Object.hasOwnProperty.call(m, "proofConsensus")) - w.uint32(42).bytes(m.proofConsensus); - if (m.consensusHeight != null && Object.hasOwnProperty.call(m, "consensusHeight")) - w.uint32(48).uint64(m.consensusHeight); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(58).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgConnectionOpenAck message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck} MsgConnectionOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenAck.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.ibc.connection.v1.MsgConnectionOpenAck(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.connectionId = r.string(); - break; - case 2: - m.version = r.string(); - break; - case 3: - m.proofTry = r.bytes(); - break; - case 4: - m.proofHeight = r.uint64(); - break; - case 5: - m.proofConsensus = r.bytes(); - break; - case 6: - m.consensusHeight = r.uint64(); - break; - case 7: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgConnectionOpenAck; - })(); - - v1.MsgConnectionOpenConfirm = (function() { - - /** - * Properties of a MsgConnectionOpenConfirm. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @interface IMsgConnectionOpenConfirm - * @property {string|null} [connectionId] MsgConnectionOpenConfirm connectionId - * @property {Uint8Array|null} [proofAck] MsgConnectionOpenConfirm proofAck - * @property {number|Long|null} [proofHeight] MsgConnectionOpenConfirm proofHeight - * @property {Uint8Array|null} [signer] MsgConnectionOpenConfirm signer - */ - - /** - * Constructs a new MsgConnectionOpenConfirm. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @classdesc Represents a MsgConnectionOpenConfirm. - * @implements IMsgConnectionOpenConfirm - * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm=} [p] Properties to set - */ - function MsgConnectionOpenConfirm(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]]; - } - - /** - * MsgConnectionOpenConfirm connectionId. - * @member {string} connectionId - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.connectionId = ""; - - /** - * MsgConnectionOpenConfirm proofAck. - * @member {Uint8Array} proofAck - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.proofAck = $util.newBuffer([]); - - /** - * MsgConnectionOpenConfirm proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgConnectionOpenConfirm signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @instance - */ - MsgConnectionOpenConfirm.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgConnectionOpenConfirm instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm instance - */ - MsgConnectionOpenConfirm.create = function create(properties) { - return new MsgConnectionOpenConfirm(properties); - }; - - /** - * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm} m MsgConnectionOpenConfirm message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgConnectionOpenConfirm.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) - w.uint32(10).string(m.connectionId); - if (m.proofAck != null && Object.hasOwnProperty.call(m, "proofAck")) - w.uint32(18).bytes(m.proofAck); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(24).uint64(m.proofHeight); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(34).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm} MsgConnectionOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgConnectionOpenConfirm.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.ibc.connection.v1.MsgConnectionOpenConfirm(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.connectionId = r.string(); - break; - case 2: - m.proofAck = r.bytes(); - break; - case 3: - m.proofHeight = r.uint64(); - break; - case 4: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgConnectionOpenConfirm; - })(); - - v1.ConnectionEnd = (function() { - - /** - * Properties of a ConnectionEnd. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @interface IConnectionEnd - * @property {string|null} [id] ConnectionEnd id - * @property {string|null} [clientId] ConnectionEnd clientId - * @property {Array.|null} [versions] ConnectionEnd versions - * @property {cosmos_sdk.x.ibc.connection.v1.State|null} [state] ConnectionEnd state - * @property {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null} [counterparty] ConnectionEnd counterparty - */ - - /** - * Constructs a new ConnectionEnd. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @classdesc Represents a ConnectionEnd. - * @implements IConnectionEnd - * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd=} [p] Properties to set - */ - function ConnectionEnd(p) { - this.versions = []; - 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]]; - } - - /** - * ConnectionEnd id. - * @member {string} id - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.id = ""; - - /** - * ConnectionEnd clientId. - * @member {string} clientId - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.clientId = ""; - - /** - * ConnectionEnd versions. - * @member {Array.} versions - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.versions = $util.emptyArray; - - /** - * ConnectionEnd state. - * @member {cosmos_sdk.x.ibc.connection.v1.State} state - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.state = 0; - - /** - * ConnectionEnd counterparty. - * @member {cosmos_sdk.x.ibc.connection.v1.ICounterparty|null|undefined} counterparty - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @instance - */ - ConnectionEnd.prototype.counterparty = null; - - /** - * Creates a new ConnectionEnd instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} ConnectionEnd instance - */ - ConnectionEnd.create = function create(properties) { - return new ConnectionEnd(properties); - }; - - /** - * Encodes the specified ConnectionEnd message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IConnectionEnd} m ConnectionEnd message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConnectionEnd.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.id != null && Object.hasOwnProperty.call(m, "id")) - w.uint32(10).string(m.id); - if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) - w.uint32(18).string(m.clientId); - if (m.versions != null && m.versions.length) { - for (var i = 0; i < m.versions.length; ++i) - w.uint32(26).string(m.versions[i]); - } - if (m.state != null && Object.hasOwnProperty.call(m, "state")) - w.uint32(32).int32(m.state); - if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) - $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.encode(m.counterparty, w.uint32(42).fork()).ldelim(); - return w; - }; - - /** - * Decodes a ConnectionEnd message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.connection.v1.ConnectionEnd - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.connection.v1.ConnectionEnd} ConnectionEnd - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConnectionEnd.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.ibc.connection.v1.ConnectionEnd(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.id = r.string(); - break; - case 2: - m.clientId = r.string(); - break; - case 3: - if (!(m.versions && m.versions.length)) - m.versions = []; - m.versions.push(r.string()); - break; - case 4: - m.state = r.int32(); - break; - case 5: - m.counterparty = $root.cosmos_sdk.x.ibc.connection.v1.Counterparty.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ConnectionEnd; - })(); - - /** - * State enum. - * @name cosmos_sdk.x.ibc.connection.v1.State - * @enum {number} - * @property {number} STATE_UNINITIALIZED_UNSPECIFIED=0 STATE_UNINITIALIZED_UNSPECIFIED value - * @property {number} STATE_INIT=1 STATE_INIT value - * @property {number} STATE_TRYOPEN=2 STATE_TRYOPEN value - * @property {number} STATE_OPEN=3 STATE_OPEN value - */ - v1.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNINITIALIZED_UNSPECIFIED"] = 0; - values[valuesById[1] = "STATE_INIT"] = 1; - values[valuesById[2] = "STATE_TRYOPEN"] = 2; - values[valuesById[3] = "STATE_OPEN"] = 3; - return values; - })(); - - v1.Counterparty = (function() { - - /** - * Properties of a Counterparty. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @interface ICounterparty - * @property {string|null} [clientId] Counterparty clientId - * @property {string|null} [connectionId] Counterparty connectionId - * @property {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix|null} [prefix] Counterparty prefix - */ - - /** - * Constructs a new Counterparty. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @classdesc Represents a Counterparty. - * @implements ICounterparty - * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty=} [p] Properties to set - */ - function Counterparty(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]]; - } - - /** - * Counterparty clientId. - * @member {string} clientId - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @instance - */ - Counterparty.prototype.clientId = ""; - - /** - * Counterparty connectionId. - * @member {string} connectionId - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @instance - */ - Counterparty.prototype.connectionId = ""; - - /** - * Counterparty prefix. - * @member {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix|null|undefined} prefix - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @instance - */ - Counterparty.prototype.prefix = null; - - /** - * Creates a new Counterparty instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.connection.v1.Counterparty} Counterparty instance - */ - Counterparty.create = function create(properties) { - return new Counterparty(properties); - }; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.ICounterparty} m Counterparty message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Counterparty.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.clientId != null && Object.hasOwnProperty.call(m, "clientId")) - w.uint32(10).string(m.clientId); - if (m.connectionId != null && Object.hasOwnProperty.call(m, "connectionId")) - w.uint32(18).string(m.connectionId); - if (m.prefix != null && Object.hasOwnProperty.call(m, "prefix")) - $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.encode(m.prefix, w.uint32(26).fork()).ldelim(); - return w; - }; - - /** - * Decodes a Counterparty message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.connection.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.connection.v1.Counterparty} Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Counterparty.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.ibc.connection.v1.Counterparty(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.clientId = r.string(); - break; - case 2: - m.connectionId = r.string(); - break; - case 3: - m.prefix = $root.cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Counterparty; - })(); - - v1.ClientPaths = (function() { - - /** - * Properties of a ClientPaths. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @interface IClientPaths - * @property {Array.|null} [paths] ClientPaths paths - */ - - /** - * Constructs a new ClientPaths. - * @memberof cosmos_sdk.x.ibc.connection.v1 - * @classdesc Represents a ClientPaths. - * @implements IClientPaths - * @constructor - * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths=} [p] Properties to set - */ - function ClientPaths(p) { - this.paths = []; - 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]]; - } - - /** - * ClientPaths paths. - * @member {Array.} paths - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @instance - */ - ClientPaths.prototype.paths = $util.emptyArray; - - /** - * Creates a new ClientPaths instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.connection.v1.ClientPaths} ClientPaths instance - */ - ClientPaths.create = function create(properties) { - return new ClientPaths(properties); - }; - - /** - * Encodes the specified ClientPaths message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @static - * @param {cosmos_sdk.x.ibc.connection.v1.IClientPaths} m ClientPaths message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientPaths.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.paths != null && m.paths.length) { - for (var i = 0; i < m.paths.length; ++i) - w.uint32(10).string(m.paths[i]); - } - return w; - }; - - /** - * Decodes a ClientPaths message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.connection.v1.ClientPaths - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.connection.v1.ClientPaths} ClientPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientPaths.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.ibc.connection.v1.ClientPaths(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.paths && m.paths.length)) - m.paths = []; - m.paths.push(r.string()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ClientPaths; - })(); - - return v1; - })(); - - return connection; - })(); - - ibc.channel = (function() { - - /** - * Namespace channel. - * @memberof cosmos_sdk.x.ibc - * @namespace - */ - var channel = {}; - - channel.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.ibc.channel - * @namespace - */ - var v1 = {}; - - v1.MsgChannelOpenInit = (function() { - - /** - * Properties of a MsgChannelOpenInit. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IMsgChannelOpenInit - * @property {string|null} [portId] MsgChannelOpenInit portId - * @property {string|null} [channelId] MsgChannelOpenInit channelId - * @property {cosmos_sdk.x.ibc.channel.v1.IChannel|null} [channel] MsgChannelOpenInit channel - * @property {Uint8Array|null} [signer] MsgChannelOpenInit signer - */ - - /** - * Constructs a new MsgChannelOpenInit. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a MsgChannelOpenInit. - * @implements IMsgChannelOpenInit - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit=} [p] Properties to set - */ - function MsgChannelOpenInit(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]]; - } - - /** - * MsgChannelOpenInit portId. - * @member {string} portId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.portId = ""; - - /** - * MsgChannelOpenInit channelId. - * @member {string} channelId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.channelId = ""; - - /** - * MsgChannelOpenInit channel. - * @member {cosmos_sdk.x.ibc.channel.v1.IChannel|null|undefined} channel - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.channel = null; - - /** - * MsgChannelOpenInit signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @instance - */ - MsgChannelOpenInit.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgChannelOpenInit instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit instance - */ - MsgChannelOpenInit.create = function create(properties) { - return new MsgChannelOpenInit(properties); - }; - - /** - * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit} m MsgChannelOpenInit message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenInit.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) - w.uint32(10).string(m.portId); - if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) - w.uint32(18).string(m.channelId); - if (m.channel != null && Object.hasOwnProperty.call(m, "channel")) - $root.cosmos_sdk.x.ibc.channel.v1.Channel.encode(m.channel, w.uint32(26).fork()).ldelim(); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(34).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgChannelOpenInit message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit} MsgChannelOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenInit.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.ibc.channel.v1.MsgChannelOpenInit(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.portId = r.string(); - break; - case 2: - m.channelId = r.string(); - break; - case 3: - m.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.decode(r, r.uint32()); - break; - case 4: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgChannelOpenInit; - })(); - - v1.MsgChannelOpenTry = (function() { - - /** - * Properties of a MsgChannelOpenTry. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IMsgChannelOpenTry - * @property {string|null} [portId] MsgChannelOpenTry portId - * @property {string|null} [channelId] MsgChannelOpenTry channelId - * @property {cosmos_sdk.x.ibc.channel.v1.IChannel|null} [channel] MsgChannelOpenTry channel - * @property {string|null} [counterpartyVersion] MsgChannelOpenTry counterpartyVersion - * @property {Uint8Array|null} [proofInit] MsgChannelOpenTry proofInit - * @property {number|Long|null} [proofHeight] MsgChannelOpenTry proofHeight - * @property {Uint8Array|null} [signer] MsgChannelOpenTry signer - */ - - /** - * Constructs a new MsgChannelOpenTry. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a MsgChannelOpenTry. - * @implements IMsgChannelOpenTry - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry=} [p] Properties to set - */ - function MsgChannelOpenTry(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]]; - } - - /** - * MsgChannelOpenTry portId. - * @member {string} portId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.portId = ""; - - /** - * MsgChannelOpenTry channelId. - * @member {string} channelId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.channelId = ""; - - /** - * MsgChannelOpenTry channel. - * @member {cosmos_sdk.x.ibc.channel.v1.IChannel|null|undefined} channel - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.channel = null; - - /** - * MsgChannelOpenTry counterpartyVersion. - * @member {string} counterpartyVersion - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.counterpartyVersion = ""; - - /** - * MsgChannelOpenTry proofInit. - * @member {Uint8Array} proofInit - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.proofInit = $util.newBuffer([]); - - /** - * MsgChannelOpenTry proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgChannelOpenTry signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @instance - */ - MsgChannelOpenTry.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgChannelOpenTry instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry instance - */ - MsgChannelOpenTry.create = function create(properties) { - return new MsgChannelOpenTry(properties); - }; - - /** - * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry} m MsgChannelOpenTry message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenTry.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) - w.uint32(10).string(m.portId); - if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) - w.uint32(18).string(m.channelId); - if (m.channel != null && Object.hasOwnProperty.call(m, "channel")) - $root.cosmos_sdk.x.ibc.channel.v1.Channel.encode(m.channel, w.uint32(26).fork()).ldelim(); - if (m.counterpartyVersion != null && Object.hasOwnProperty.call(m, "counterpartyVersion")) - w.uint32(34).string(m.counterpartyVersion); - if (m.proofInit != null && Object.hasOwnProperty.call(m, "proofInit")) - w.uint32(42).bytes(m.proofInit); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(48).uint64(m.proofHeight); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(58).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgChannelOpenTry message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry} MsgChannelOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenTry.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.ibc.channel.v1.MsgChannelOpenTry(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.portId = r.string(); - break; - case 2: - m.channelId = r.string(); - break; - case 3: - m.channel = $root.cosmos_sdk.x.ibc.channel.v1.Channel.decode(r, r.uint32()); - break; - case 4: - m.counterpartyVersion = r.string(); - break; - case 5: - m.proofInit = r.bytes(); - break; - case 6: - m.proofHeight = r.uint64(); - break; - case 7: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgChannelOpenTry; - })(); - - v1.MsgChannelOpenAck = (function() { - - /** - * Properties of a MsgChannelOpenAck. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IMsgChannelOpenAck - * @property {string|null} [portId] MsgChannelOpenAck portId - * @property {string|null} [channelId] MsgChannelOpenAck channelId - * @property {string|null} [counterpartyVersion] MsgChannelOpenAck counterpartyVersion - * @property {Uint8Array|null} [proofTry] MsgChannelOpenAck proofTry - * @property {number|Long|null} [proofHeight] MsgChannelOpenAck proofHeight - * @property {Uint8Array|null} [signer] MsgChannelOpenAck signer - */ - - /** - * Constructs a new MsgChannelOpenAck. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a MsgChannelOpenAck. - * @implements IMsgChannelOpenAck - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck=} [p] Properties to set - */ - function MsgChannelOpenAck(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]]; - } - - /** - * MsgChannelOpenAck portId. - * @member {string} portId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.portId = ""; - - /** - * MsgChannelOpenAck channelId. - * @member {string} channelId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.channelId = ""; - - /** - * MsgChannelOpenAck counterpartyVersion. - * @member {string} counterpartyVersion - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.counterpartyVersion = ""; - - /** - * MsgChannelOpenAck proofTry. - * @member {Uint8Array} proofTry - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.proofTry = $util.newBuffer([]); - - /** - * MsgChannelOpenAck proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgChannelOpenAck signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @instance - */ - MsgChannelOpenAck.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgChannelOpenAck instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck instance - */ - MsgChannelOpenAck.create = function create(properties) { - return new MsgChannelOpenAck(properties); - }; - - /** - * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck} m MsgChannelOpenAck message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenAck.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) - w.uint32(10).string(m.portId); - if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) - w.uint32(18).string(m.channelId); - if (m.counterpartyVersion != null && Object.hasOwnProperty.call(m, "counterpartyVersion")) - w.uint32(26).string(m.counterpartyVersion); - if (m.proofTry != null && Object.hasOwnProperty.call(m, "proofTry")) - w.uint32(34).bytes(m.proofTry); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(40).uint64(m.proofHeight); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(50).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgChannelOpenAck message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck} MsgChannelOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenAck.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.ibc.channel.v1.MsgChannelOpenAck(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.portId = r.string(); - break; - case 2: - m.channelId = r.string(); - break; - case 3: - m.counterpartyVersion = r.string(); - break; - case 4: - m.proofTry = r.bytes(); - break; - case 5: - m.proofHeight = r.uint64(); - break; - case 6: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgChannelOpenAck; - })(); - - v1.MsgChannelOpenConfirm = (function() { - - /** - * Properties of a MsgChannelOpenConfirm. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IMsgChannelOpenConfirm - * @property {string|null} [portId] MsgChannelOpenConfirm portId - * @property {string|null} [channelId] MsgChannelOpenConfirm channelId - * @property {Uint8Array|null} [proofAck] MsgChannelOpenConfirm proofAck - * @property {number|Long|null} [proofHeight] MsgChannelOpenConfirm proofHeight - * @property {Uint8Array|null} [signer] MsgChannelOpenConfirm signer - */ - - /** - * Constructs a new MsgChannelOpenConfirm. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a MsgChannelOpenConfirm. - * @implements IMsgChannelOpenConfirm - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm=} [p] Properties to set - */ - function MsgChannelOpenConfirm(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]]; - } - - /** - * MsgChannelOpenConfirm portId. - * @member {string} portId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.portId = ""; - - /** - * MsgChannelOpenConfirm channelId. - * @member {string} channelId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.channelId = ""; - - /** - * MsgChannelOpenConfirm proofAck. - * @member {Uint8Array} proofAck - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.proofAck = $util.newBuffer([]); - - /** - * MsgChannelOpenConfirm proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgChannelOpenConfirm signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @instance - */ - MsgChannelOpenConfirm.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgChannelOpenConfirm instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm instance - */ - MsgChannelOpenConfirm.create = function create(properties) { - return new MsgChannelOpenConfirm(properties); - }; - - /** - * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm} m MsgChannelOpenConfirm message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelOpenConfirm.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) - w.uint32(10).string(m.portId); - if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) - w.uint32(18).string(m.channelId); - if (m.proofAck != null && Object.hasOwnProperty.call(m, "proofAck")) - w.uint32(26).bytes(m.proofAck); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(32).uint64(m.proofHeight); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(42).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm} MsgChannelOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelOpenConfirm.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.ibc.channel.v1.MsgChannelOpenConfirm(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.portId = r.string(); - break; - case 2: - m.channelId = r.string(); - break; - case 3: - m.proofAck = r.bytes(); - break; - case 4: - m.proofHeight = r.uint64(); - break; - case 5: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgChannelOpenConfirm; - })(); - - v1.MsgChannelCloseInit = (function() { - - /** - * Properties of a MsgChannelCloseInit. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IMsgChannelCloseInit - * @property {string|null} [portId] MsgChannelCloseInit portId - * @property {string|null} [channelId] MsgChannelCloseInit channelId - * @property {Uint8Array|null} [signer] MsgChannelCloseInit signer - */ - - /** - * Constructs a new MsgChannelCloseInit. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a MsgChannelCloseInit. - * @implements IMsgChannelCloseInit - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit=} [p] Properties to set - */ - function MsgChannelCloseInit(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]]; - } - - /** - * MsgChannelCloseInit portId. - * @member {string} portId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @instance - */ - MsgChannelCloseInit.prototype.portId = ""; - - /** - * MsgChannelCloseInit channelId. - * @member {string} channelId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @instance - */ - MsgChannelCloseInit.prototype.channelId = ""; - - /** - * MsgChannelCloseInit signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @instance - */ - MsgChannelCloseInit.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgChannelCloseInit instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit instance - */ - MsgChannelCloseInit.create = function create(properties) { - return new MsgChannelCloseInit(properties); - }; - - /** - * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit} m MsgChannelCloseInit message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseInit.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) - w.uint32(10).string(m.portId); - if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) - w.uint32(18).string(m.channelId); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(26).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgChannelCloseInit message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit} MsgChannelCloseInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseInit.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.ibc.channel.v1.MsgChannelCloseInit(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.portId = r.string(); - break; - case 2: - m.channelId = r.string(); - break; - case 3: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgChannelCloseInit; - })(); - - v1.MsgChannelCloseConfirm = (function() { - - /** - * Properties of a MsgChannelCloseConfirm. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IMsgChannelCloseConfirm - * @property {string|null} [portId] MsgChannelCloseConfirm portId - * @property {string|null} [channelId] MsgChannelCloseConfirm channelId - * @property {Uint8Array|null} [proofInit] MsgChannelCloseConfirm proofInit - * @property {number|Long|null} [proofHeight] MsgChannelCloseConfirm proofHeight - * @property {Uint8Array|null} [signer] MsgChannelCloseConfirm signer - */ - - /** - * Constructs a new MsgChannelCloseConfirm. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a MsgChannelCloseConfirm. - * @implements IMsgChannelCloseConfirm - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm=} [p] Properties to set - */ - function MsgChannelCloseConfirm(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]]; - } - - /** - * MsgChannelCloseConfirm portId. - * @member {string} portId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.portId = ""; - - /** - * MsgChannelCloseConfirm channelId. - * @member {string} channelId - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.channelId = ""; - - /** - * MsgChannelCloseConfirm proofInit. - * @member {Uint8Array} proofInit - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.proofInit = $util.newBuffer([]); - - /** - * MsgChannelCloseConfirm proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgChannelCloseConfirm signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @instance - */ - MsgChannelCloseConfirm.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgChannelCloseConfirm instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm instance - */ - MsgChannelCloseConfirm.create = function create(properties) { - return new MsgChannelCloseConfirm(properties); - }; - - /** - * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm} m MsgChannelCloseConfirm message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgChannelCloseConfirm.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) - w.uint32(10).string(m.portId); - if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) - w.uint32(18).string(m.channelId); - if (m.proofInit != null && Object.hasOwnProperty.call(m, "proofInit")) - w.uint32(26).bytes(m.proofInit); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(32).uint64(m.proofHeight); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(42).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm} MsgChannelCloseConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgChannelCloseConfirm.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.ibc.channel.v1.MsgChannelCloseConfirm(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.portId = r.string(); - break; - case 2: - m.channelId = r.string(); - break; - case 3: - m.proofInit = r.bytes(); - break; - case 4: - m.proofHeight = r.uint64(); - break; - case 5: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgChannelCloseConfirm; - })(); - - v1.MsgPacket = (function() { - - /** - * Properties of a MsgPacket. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IMsgPacket - * @property {cosmos_sdk.x.ibc.channel.v1.IPacket|null} [packet] MsgPacket packet - * @property {Uint8Array|null} [proof] MsgPacket proof - * @property {number|Long|null} [proofHeight] MsgPacket proofHeight - * @property {Uint8Array|null} [signer] MsgPacket signer - */ - - /** - * Constructs a new MsgPacket. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a MsgPacket. - * @implements IMsgPacket - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket=} [p] Properties to set - */ - function MsgPacket(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]]; - } - - /** - * MsgPacket packet. - * @member {cosmos_sdk.x.ibc.channel.v1.IPacket|null|undefined} packet - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @instance - */ - MsgPacket.prototype.packet = null; - - /** - * MsgPacket proof. - * @member {Uint8Array} proof - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @instance - */ - MsgPacket.prototype.proof = $util.newBuffer([]); - - /** - * MsgPacket proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @instance - */ - MsgPacket.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgPacket signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @instance - */ - MsgPacket.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgPacket instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgPacket} MsgPacket instance - */ - MsgPacket.create = function create(properties) { - return new MsgPacket(properties); - }; - - /** - * Encodes the specified MsgPacket message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgPacket} m MsgPacket message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgPacket.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.packet != null && Object.hasOwnProperty.call(m, "packet")) - $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(m.packet, w.uint32(10).fork()).ldelim(); - if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) - w.uint32(18).bytes(m.proof); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(24).uint64(m.proofHeight); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(34).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgPacket message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgPacket - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgPacket} MsgPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgPacket.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.ibc.channel.v1.MsgPacket(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(r, r.uint32()); - break; - case 2: - m.proof = r.bytes(); - break; - case 3: - m.proofHeight = r.uint64(); - break; - case 4: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgPacket; - })(); - - v1.MsgTimeout = (function() { - - /** - * Properties of a MsgTimeout. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IMsgTimeout - * @property {cosmos_sdk.x.ibc.channel.v1.IPacket|null} [packet] MsgTimeout packet - * @property {Uint8Array|null} [proof] MsgTimeout proof - * @property {number|Long|null} [proofHeight] MsgTimeout proofHeight - * @property {number|Long|null} [nextSequenceRecv] MsgTimeout nextSequenceRecv - * @property {Uint8Array|null} [signer] MsgTimeout signer - */ - - /** - * Constructs a new MsgTimeout. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a MsgTimeout. - * @implements IMsgTimeout - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout=} [p] Properties to set - */ - function MsgTimeout(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]]; - } - - /** - * MsgTimeout packet. - * @member {cosmos_sdk.x.ibc.channel.v1.IPacket|null|undefined} packet - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.packet = null; - - /** - * MsgTimeout proof. - * @member {Uint8Array} proof - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.proof = $util.newBuffer([]); - - /** - * MsgTimeout proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTimeout nextSequenceRecv. - * @member {number|Long} nextSequenceRecv - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.nextSequenceRecv = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgTimeout signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @instance - */ - MsgTimeout.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgTimeout instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} MsgTimeout instance - */ - MsgTimeout.create = function create(properties) { - return new MsgTimeout(properties); - }; - - /** - * Encodes the specified MsgTimeout message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgTimeout} m MsgTimeout message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgTimeout.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.packet != null && Object.hasOwnProperty.call(m, "packet")) - $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(m.packet, w.uint32(10).fork()).ldelim(); - if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) - w.uint32(18).bytes(m.proof); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(24).uint64(m.proofHeight); - if (m.nextSequenceRecv != null && Object.hasOwnProperty.call(m, "nextSequenceRecv")) - w.uint32(32).uint64(m.nextSequenceRecv); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(42).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgTimeout message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgTimeout - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgTimeout} MsgTimeout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgTimeout.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.ibc.channel.v1.MsgTimeout(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(r, r.uint32()); - break; - case 2: - m.proof = r.bytes(); - break; - case 3: - m.proofHeight = r.uint64(); - break; - case 4: - m.nextSequenceRecv = r.uint64(); - break; - case 5: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgTimeout; - })(); - - v1.MsgAcknowledgement = (function() { - - /** - * Properties of a MsgAcknowledgement. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IMsgAcknowledgement - * @property {cosmos_sdk.x.ibc.channel.v1.IPacket|null} [packet] MsgAcknowledgement packet - * @property {Uint8Array|null} [acknowledgement] MsgAcknowledgement acknowledgement - * @property {Uint8Array|null} [proof] MsgAcknowledgement proof - * @property {number|Long|null} [proofHeight] MsgAcknowledgement proofHeight - * @property {Uint8Array|null} [signer] MsgAcknowledgement signer - */ - - /** - * Constructs a new MsgAcknowledgement. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a MsgAcknowledgement. - * @implements IMsgAcknowledgement - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement=} [p] Properties to set - */ - function MsgAcknowledgement(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]]; - } - - /** - * MsgAcknowledgement packet. - * @member {cosmos_sdk.x.ibc.channel.v1.IPacket|null|undefined} packet - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.packet = null; - - /** - * MsgAcknowledgement acknowledgement. - * @member {Uint8Array} acknowledgement - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.acknowledgement = $util.newBuffer([]); - - /** - * MsgAcknowledgement proof. - * @member {Uint8Array} proof - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.proof = $util.newBuffer([]); - - /** - * MsgAcknowledgement proofHeight. - * @member {number|Long} proofHeight - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.proofHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * MsgAcknowledgement signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @instance - */ - MsgAcknowledgement.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgAcknowledgement instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} MsgAcknowledgement instance - */ - MsgAcknowledgement.create = function create(properties) { - return new MsgAcknowledgement(properties); - }; - - /** - * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement} m MsgAcknowledgement message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgAcknowledgement.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.packet != null && Object.hasOwnProperty.call(m, "packet")) - $root.cosmos_sdk.x.ibc.channel.v1.Packet.encode(m.packet, w.uint32(10).fork()).ldelim(); - if (m.acknowledgement != null && Object.hasOwnProperty.call(m, "acknowledgement")) - w.uint32(18).bytes(m.acknowledgement); - if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) - w.uint32(26).bytes(m.proof); - if (m.proofHeight != null && Object.hasOwnProperty.call(m, "proofHeight")) - w.uint32(32).uint64(m.proofHeight); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(42).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgAcknowledgement message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement} MsgAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgAcknowledgement.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.ibc.channel.v1.MsgAcknowledgement(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.packet = $root.cosmos_sdk.x.ibc.channel.v1.Packet.decode(r, r.uint32()); - break; - case 2: - m.acknowledgement = r.bytes(); - break; - case 3: - m.proof = r.bytes(); - break; - case 4: - m.proofHeight = r.uint64(); - break; - case 5: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgAcknowledgement; - })(); - - v1.Channel = (function() { - - /** - * Properties of a Channel. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IChannel - * @property {cosmos_sdk.x.ibc.channel.v1.State|null} [state] Channel state - * @property {cosmos_sdk.x.ibc.channel.v1.Order|null} [ordering] Channel ordering - * @property {cosmos_sdk.x.ibc.channel.v1.ICounterparty|null} [counterparty] Channel counterparty - * @property {Array.|null} [connectionHops] Channel connectionHops - * @property {string|null} [version] Channel version - */ - - /** - * Constructs a new Channel. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a Channel. - * @implements IChannel - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IChannel=} [p] Properties to set - */ - function Channel(p) { - this.connectionHops = []; - 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]]; - } - - /** - * Channel state. - * @member {cosmos_sdk.x.ibc.channel.v1.State} state - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @instance - */ - Channel.prototype.state = 0; - - /** - * Channel ordering. - * @member {cosmos_sdk.x.ibc.channel.v1.Order} ordering - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @instance - */ - Channel.prototype.ordering = 0; - - /** - * Channel counterparty. - * @member {cosmos_sdk.x.ibc.channel.v1.ICounterparty|null|undefined} counterparty - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @instance - */ - Channel.prototype.counterparty = null; - - /** - * Channel connectionHops. - * @member {Array.} connectionHops - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @instance - */ - Channel.prototype.connectionHops = $util.emptyArray; - - /** - * Channel version. - * @member {string} version - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @instance - */ - Channel.prototype.version = ""; - - /** - * Creates a new Channel instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IChannel=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.Channel} Channel instance - */ - Channel.create = function create(properties) { - return new Channel(properties); - }; - - /** - * Encodes the specified Channel message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IChannel} m Channel message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Channel.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.state != null && Object.hasOwnProperty.call(m, "state")) - w.uint32(8).int32(m.state); - if (m.ordering != null && Object.hasOwnProperty.call(m, "ordering")) - w.uint32(16).int32(m.ordering); - if (m.counterparty != null && Object.hasOwnProperty.call(m, "counterparty")) - $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.encode(m.counterparty, w.uint32(26).fork()).ldelim(); - if (m.connectionHops != null && m.connectionHops.length) { - for (var i = 0; i < m.connectionHops.length; ++i) - w.uint32(34).string(m.connectionHops[i]); - } - if (m.version != null && Object.hasOwnProperty.call(m, "version")) - w.uint32(42).string(m.version); - return w; - }; - - /** - * Decodes a Channel message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.Channel - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.Channel} Channel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Channel.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.ibc.channel.v1.Channel(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.state = r.int32(); - break; - case 2: - m.ordering = r.int32(); - break; - case 3: - m.counterparty = $root.cosmos_sdk.x.ibc.channel.v1.Counterparty.decode(r, r.uint32()); - break; - case 4: - if (!(m.connectionHops && m.connectionHops.length)) - m.connectionHops = []; - m.connectionHops.push(r.string()); - break; - case 5: - m.version = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Channel; - })(); - - /** - * State enum. - * @name cosmos_sdk.x.ibc.channel.v1.State - * @enum {number} - * @property {number} STATE_UNINITIALIZED_UNSPECIFIED=0 STATE_UNINITIALIZED_UNSPECIFIED value - * @property {number} STATE_INIT=1 STATE_INIT value - * @property {number} STATE_TRYOPEN=2 STATE_TRYOPEN value - * @property {number} STATE_OPEN=3 STATE_OPEN value - * @property {number} STATE_CLOSED=4 STATE_CLOSED value - */ - v1.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNINITIALIZED_UNSPECIFIED"] = 0; - values[valuesById[1] = "STATE_INIT"] = 1; - values[valuesById[2] = "STATE_TRYOPEN"] = 2; - values[valuesById[3] = "STATE_OPEN"] = 3; - values[valuesById[4] = "STATE_CLOSED"] = 4; - return values; - })(); - - /** - * Order enum. - * @name cosmos_sdk.x.ibc.channel.v1.Order - * @enum {number} - * @property {number} ORDER_NONE_UNSPECIFIED=0 ORDER_NONE_UNSPECIFIED value - * @property {number} ORDER_UNORDERED=1 ORDER_UNORDERED value - * @property {number} ORDER_ORDERED=2 ORDER_ORDERED value - */ - v1.Order = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ORDER_NONE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORDER_UNORDERED"] = 1; - values[valuesById[2] = "ORDER_ORDERED"] = 2; - return values; - })(); - - v1.Counterparty = (function() { - - /** - * Properties of a Counterparty. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface ICounterparty - * @property {string|null} [portId] Counterparty portId - * @property {string|null} [channelId] Counterparty channelId - */ - - /** - * Constructs a new Counterparty. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a Counterparty. - * @implements ICounterparty - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty=} [p] Properties to set - */ - function Counterparty(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]]; - } - - /** - * Counterparty portId. - * @member {string} portId - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @instance - */ - Counterparty.prototype.portId = ""; - - /** - * Counterparty channelId. - * @member {string} channelId - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @instance - */ - Counterparty.prototype.channelId = ""; - - /** - * Creates a new Counterparty instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.Counterparty} Counterparty instance - */ - Counterparty.create = function create(properties) { - return new Counterparty(properties); - }; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.ICounterparty} m Counterparty message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Counterparty.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.portId != null && Object.hasOwnProperty.call(m, "portId")) - w.uint32(10).string(m.portId); - if (m.channelId != null && Object.hasOwnProperty.call(m, "channelId")) - w.uint32(18).string(m.channelId); - return w; - }; - - /** - * Decodes a Counterparty message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.Counterparty - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.Counterparty} Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Counterparty.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.ibc.channel.v1.Counterparty(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.portId = r.string(); - break; - case 2: - m.channelId = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Counterparty; - })(); - - v1.Packet = (function() { - - /** - * Properties of a Packet. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @interface IPacket - * @property {number|Long|null} [sequence] Packet sequence - * @property {string|null} [sourcePort] Packet sourcePort - * @property {string|null} [sourceChannel] Packet sourceChannel - * @property {string|null} [destinationPort] Packet destinationPort - * @property {string|null} [destinationChannel] Packet destinationChannel - * @property {Uint8Array|null} [data] Packet data - * @property {number|Long|null} [timeoutHeight] Packet timeoutHeight - * @property {number|Long|null} [timeoutTimestamp] Packet timeoutTimestamp - */ - - /** - * Constructs a new Packet. - * @memberof cosmos_sdk.x.ibc.channel.v1 - * @classdesc Represents a Packet. - * @implements IPacket - * @constructor - * @param {cosmos_sdk.x.ibc.channel.v1.IPacket=} [p] Properties to set - */ - function Packet(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]]; - } - - /** - * Packet sequence. - * @member {number|Long} sequence - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @instance - */ - Packet.prototype.sequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Packet sourcePort. - * @member {string} sourcePort - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @instance - */ - Packet.prototype.sourcePort = ""; - - /** - * Packet sourceChannel. - * @member {string} sourceChannel - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @instance - */ - Packet.prototype.sourceChannel = ""; - - /** - * Packet destinationPort. - * @member {string} destinationPort - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @instance - */ - Packet.prototype.destinationPort = ""; - - /** - * Packet destinationChannel. - * @member {string} destinationChannel - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @instance - */ - Packet.prototype.destinationChannel = ""; - - /** - * Packet data. - * @member {Uint8Array} data - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @instance - */ - Packet.prototype.data = $util.newBuffer([]); - - /** - * Packet timeoutHeight. - * @member {number|Long} timeoutHeight - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @instance - */ - Packet.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Packet timeoutTimestamp. - * @member {number|Long} timeoutTimestamp - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @instance - */ - Packet.prototype.timeoutTimestamp = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new Packet instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IPacket=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.channel.v1.Packet} Packet instance - */ - Packet.create = function create(properties) { - return new Packet(properties); - }; - - /** - * Encodes the specified Packet message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @static - * @param {cosmos_sdk.x.ibc.channel.v1.IPacket} m Packet message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Packet.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.sequence != null && Object.hasOwnProperty.call(m, "sequence")) - w.uint32(8).uint64(m.sequence); - if (m.sourcePort != null && Object.hasOwnProperty.call(m, "sourcePort")) - w.uint32(18).string(m.sourcePort); - if (m.sourceChannel != null && Object.hasOwnProperty.call(m, "sourceChannel")) - w.uint32(26).string(m.sourceChannel); - if (m.destinationPort != null && Object.hasOwnProperty.call(m, "destinationPort")) - w.uint32(34).string(m.destinationPort); - if (m.destinationChannel != null && Object.hasOwnProperty.call(m, "destinationChannel")) - w.uint32(42).string(m.destinationChannel); - if (m.data != null && Object.hasOwnProperty.call(m, "data")) - w.uint32(50).bytes(m.data); - if (m.timeoutHeight != null && Object.hasOwnProperty.call(m, "timeoutHeight")) - w.uint32(56).uint64(m.timeoutHeight); - if (m.timeoutTimestamp != null && Object.hasOwnProperty.call(m, "timeoutTimestamp")) - w.uint32(64).uint64(m.timeoutTimestamp); - return w; - }; - - /** - * Decodes a Packet message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.channel.v1.Packet - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.channel.v1.Packet} Packet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Packet.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.ibc.channel.v1.Packet(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.sequence = r.uint64(); - break; - case 2: - m.sourcePort = r.string(); - break; - case 3: - m.sourceChannel = r.string(); - break; - case 4: - m.destinationPort = r.string(); - break; - case 5: - m.destinationChannel = r.string(); - break; - case 6: - m.data = r.bytes(); - break; - case 7: - m.timeoutHeight = r.uint64(); - break; - case 8: - m.timeoutTimestamp = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Packet; - })(); - - return v1; - })(); - - return channel; - })(); - - ibc.commitment = (function() { - - /** - * Namespace commitment. - * @memberof cosmos_sdk.x.ibc - * @namespace - */ - var commitment = {}; - - commitment.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.ibc.commitment - * @namespace - */ - var v1 = {}; - - v1.MerkleRoot = (function() { - - /** - * Properties of a MerkleRoot. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @interface IMerkleRoot - * @property {Uint8Array|null} [hash] MerkleRoot hash - */ - - /** - * Constructs a new MerkleRoot. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @classdesc Represents a MerkleRoot. - * @implements IMerkleRoot - * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot=} [p] Properties to set - */ - function MerkleRoot(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]]; - } - - /** - * MerkleRoot hash. - * @member {Uint8Array} hash - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @instance - */ - MerkleRoot.prototype.hash = $util.newBuffer([]); - - /** - * Creates a new MerkleRoot instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} MerkleRoot instance - */ - MerkleRoot.create = function create(properties) { - return new MerkleRoot(properties); - }; - - /** - * Encodes the specified MerkleRoot message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot} m MerkleRoot message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MerkleRoot.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); - return w; - }; - - /** - * Decodes a MerkleRoot message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleRoot - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleRoot} MerkleRoot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MerkleRoot.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.ibc.commitment.v1.MerkleRoot(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.hash = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MerkleRoot; - })(); - - v1.MerklePrefix = (function() { - - /** - * Properties of a MerklePrefix. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @interface IMerklePrefix - * @property {Uint8Array|null} [keyPrefix] MerklePrefix keyPrefix - */ - - /** - * Constructs a new MerklePrefix. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @classdesc Represents a MerklePrefix. - * @implements IMerklePrefix - * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix=} [p] Properties to set - */ - function MerklePrefix(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]]; - } - - /** - * MerklePrefix keyPrefix. - * @member {Uint8Array} keyPrefix - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @instance - */ - MerklePrefix.prototype.keyPrefix = $util.newBuffer([]); - - /** - * Creates a new MerklePrefix instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} MerklePrefix instance - */ - MerklePrefix.create = function create(properties) { - return new MerklePrefix(properties); - }; - - /** - * Encodes the specified MerklePrefix message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix} m MerklePrefix message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MerklePrefix.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyPrefix != null && Object.hasOwnProperty.call(m, "keyPrefix")) - w.uint32(10).bytes(m.keyPrefix); - return w; - }; - - /** - * Decodes a MerklePrefix message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePrefix - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePrefix} MerklePrefix - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MerklePrefix.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.ibc.commitment.v1.MerklePrefix(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.keyPrefix = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MerklePrefix; - })(); - - v1.MerklePath = (function() { - - /** - * Properties of a MerklePath. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @interface IMerklePath - * @property {cosmos_sdk.x.ibc.commitment.v1.IKeyPath|null} [keyPath] MerklePath keyPath - */ - - /** - * Constructs a new MerklePath. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @classdesc Represents a MerklePath. - * @implements IMerklePath - * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath=} [p] Properties to set - */ - function MerklePath(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]]; - } - - /** - * MerklePath keyPath. - * @member {cosmos_sdk.x.ibc.commitment.v1.IKeyPath|null|undefined} keyPath - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @instance - */ - MerklePath.prototype.keyPath = null; - - /** - * Creates a new MerklePath instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePath} MerklePath instance - */ - MerklePath.create = function create(properties) { - return new MerklePath(properties); - }; - - /** - * Encodes the specified MerklePath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerklePath} m MerklePath message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MerklePath.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keyPath != null && Object.hasOwnProperty.call(m, "keyPath")) - $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.encode(m.keyPath, w.uint32(10).fork()).ldelim(); - return w; - }; - - /** - * Decodes a MerklePath message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerklePath - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerklePath} MerklePath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MerklePath.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.ibc.commitment.v1.MerklePath(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.keyPath = $root.cosmos_sdk.x.ibc.commitment.v1.KeyPath.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MerklePath; - })(); - - v1.MerkleProof = (function() { - - /** - * Properties of a MerkleProof. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @interface IMerkleProof - * @property {tendermint.crypto.merkle.IProof|null} [proof] MerkleProof proof - */ - - /** - * Constructs a new MerkleProof. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @classdesc Represents a MerkleProof. - * @implements IMerkleProof - * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof=} [p] Properties to set - */ - function MerkleProof(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]]; - } - - /** - * MerkleProof proof. - * @member {tendermint.crypto.merkle.IProof|null|undefined} proof - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @instance - */ - MerkleProof.prototype.proof = null; - - /** - * Creates a new MerkleProof instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} MerkleProof instance - */ - MerkleProof.create = function create(properties) { - return new MerkleProof(properties); - }; - - /** - * Encodes the specified MerkleProof message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IMerkleProof} m MerkleProof message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MerkleProof.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.proof != null && Object.hasOwnProperty.call(m, "proof")) - $root.tendermint.crypto.merkle.Proof.encode(m.proof, w.uint32(10).fork()).ldelim(); - return w; - }; - - /** - * Decodes a MerkleProof message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.commitment.v1.MerkleProof - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.commitment.v1.MerkleProof} MerkleProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MerkleProof.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.ibc.commitment.v1.MerkleProof(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.proof = $root.tendermint.crypto.merkle.Proof.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MerkleProof; - })(); - - v1.KeyPath = (function() { - - /** - * Properties of a KeyPath. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @interface IKeyPath - * @property {Array.|null} [keys] KeyPath keys - */ - - /** - * Constructs a new KeyPath. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @classdesc Represents a KeyPath. - * @implements IKeyPath - * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath=} [p] Properties to set - */ - function KeyPath(p) { - this.keys = []; - 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]]; - } - - /** - * KeyPath keys. - * @member {Array.} keys - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @instance - */ - KeyPath.prototype.keys = $util.emptyArray; - - /** - * Creates a new KeyPath instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.commitment.v1.KeyPath} KeyPath instance - */ - KeyPath.create = function create(properties) { - return new KeyPath(properties); - }; - - /** - * Encodes the specified KeyPath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IKeyPath} m KeyPath message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeyPath.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.keys != null && m.keys.length) { - for (var i = 0; i < m.keys.length; ++i) - $root.cosmos_sdk.x.ibc.commitment.v1.Key.encode(m.keys[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a KeyPath message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.commitment.v1.KeyPath - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.commitment.v1.KeyPath} KeyPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeyPath.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.ibc.commitment.v1.KeyPath(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.keys && m.keys.length)) - m.keys = []; - m.keys.push($root.cosmos_sdk.x.ibc.commitment.v1.Key.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return KeyPath; - })(); - - v1.Key = (function() { - - /** - * Properties of a Key. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @interface IKey - * @property {Uint8Array|null} [name] Key name - * @property {cosmos_sdk.x.ibc.commitment.v1.KeyEncoding|null} [enc] Key enc - */ - - /** - * Constructs a new Key. - * @memberof cosmos_sdk.x.ibc.commitment.v1 - * @classdesc Represents a Key. - * @implements IKey - * @constructor - * @param {cosmos_sdk.x.ibc.commitment.v1.IKey=} [p] Properties to set - */ - function Key(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]]; - } - - /** - * Key name. - * @member {Uint8Array} name - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @instance - */ - Key.prototype.name = $util.newBuffer([]); - - /** - * Key enc. - * @member {cosmos_sdk.x.ibc.commitment.v1.KeyEncoding} enc - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @instance - */ - Key.prototype.enc = 0; - - /** - * Creates a new Key instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IKey=} [properties] Properties to set - * @returns {cosmos_sdk.x.ibc.commitment.v1.Key} Key instance - */ - Key.create = function create(properties) { - return new Key(properties); - }; - - /** - * Encodes the specified Key message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @static - * @param {cosmos_sdk.x.ibc.commitment.v1.IKey} m Key message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Key.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.name != null && Object.hasOwnProperty.call(m, "name")) - w.uint32(10).bytes(m.name); - if (m.enc != null && Object.hasOwnProperty.call(m, "enc")) - w.uint32(16).int32(m.enc); - return w; - }; - - /** - * Decodes a Key message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.ibc.commitment.v1.Key - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.ibc.commitment.v1.Key} Key - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Key.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.ibc.commitment.v1.Key(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.name = r.bytes(); - break; - case 2: - m.enc = r.int32(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Key; - })(); - - /** - * KeyEncoding enum. - * @name cosmos_sdk.x.ibc.commitment.v1.KeyEncoding - * @enum {number} - * @property {number} KEY_ENCODING_URL_UNSPECIFIED=0 KEY_ENCODING_URL_UNSPECIFIED value - * @property {number} KEY_ENCODING_HEX=1 KEY_ENCODING_HEX value - */ - v1.KeyEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KEY_ENCODING_URL_UNSPECIFIED"] = 0; - values[valuesById[1] = "KEY_ENCODING_HEX"] = 1; - return values; - })(); - - return v1; - })(); - - return commitment; - })(); - - return ibc; - })(); - - x.mint = (function() { - - /** - * Namespace mint. - * @memberof cosmos_sdk.x - * @namespace - */ - var mint = {}; - - mint.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.mint - * @namespace - */ - var v1 = {}; - - v1.Minter = (function() { - - /** - * Properties of a Minter. - * @memberof cosmos_sdk.x.mint.v1 - * @interface IMinter - * @property {string|null} [inflation] Minter inflation - * @property {string|null} [annualProvisions] Minter annualProvisions - */ - - /** - * Constructs a new Minter. - * @memberof cosmos_sdk.x.mint.v1 - * @classdesc Represents a Minter. - * @implements IMinter - * @constructor - * @param {cosmos_sdk.x.mint.v1.IMinter=} [p] Properties to set - */ - function Minter(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]]; - } - - /** - * Minter inflation. - * @member {string} inflation - * @memberof cosmos_sdk.x.mint.v1.Minter - * @instance - */ - Minter.prototype.inflation = ""; - - /** - * Minter annualProvisions. - * @member {string} annualProvisions - * @memberof cosmos_sdk.x.mint.v1.Minter - * @instance - */ - Minter.prototype.annualProvisions = ""; - - /** - * Creates a new Minter instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.mint.v1.Minter - * @static - * @param {cosmos_sdk.x.mint.v1.IMinter=} [properties] Properties to set - * @returns {cosmos_sdk.x.mint.v1.Minter} Minter instance - */ - Minter.create = function create(properties) { - return new Minter(properties); - }; - - /** - * Encodes the specified Minter message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.mint.v1.Minter - * @static - * @param {cosmos_sdk.x.mint.v1.IMinter} m Minter message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Minter.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.inflation != null && Object.hasOwnProperty.call(m, "inflation")) - w.uint32(10).string(m.inflation); - if (m.annualProvisions != null && Object.hasOwnProperty.call(m, "annualProvisions")) - w.uint32(18).string(m.annualProvisions); - return w; - }; - - /** - * Decodes a Minter message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.mint.v1.Minter - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.mint.v1.Minter} Minter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Minter.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.mint.v1.Minter(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.inflation = r.string(); - break; - case 2: - m.annualProvisions = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Minter; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof cosmos_sdk.x.mint.v1 - * @interface IParams - * @property {string|null} [mintDenom] Params mintDenom - * @property {string|null} [inflationRateChange] Params inflationRateChange - * @property {string|null} [inflationMax] Params inflationMax - * @property {string|null} [inflationMin] Params inflationMin - * @property {string|null} [goalBonded] Params goalBonded - * @property {number|Long|null} [blocksPerYear] Params blocksPerYear - */ - - /** - * Constructs a new Params. - * @memberof cosmos_sdk.x.mint.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos_sdk.x.mint.v1.IParams=} [p] Properties to set - */ - function Params(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]]; - } - - /** - * Params mintDenom. - * @member {string} mintDenom - * @memberof cosmos_sdk.x.mint.v1.Params - * @instance - */ - Params.prototype.mintDenom = ""; - - /** - * Params inflationRateChange. - * @member {string} inflationRateChange - * @memberof cosmos_sdk.x.mint.v1.Params - * @instance - */ - Params.prototype.inflationRateChange = ""; - - /** - * Params inflationMax. - * @member {string} inflationMax - * @memberof cosmos_sdk.x.mint.v1.Params - * @instance - */ - Params.prototype.inflationMax = ""; - - /** - * Params inflationMin. - * @member {string} inflationMin - * @memberof cosmos_sdk.x.mint.v1.Params - * @instance - */ - Params.prototype.inflationMin = ""; - - /** - * Params goalBonded. - * @member {string} goalBonded - * @memberof cosmos_sdk.x.mint.v1.Params - * @instance - */ - Params.prototype.goalBonded = ""; - - /** - * Params blocksPerYear. - * @member {number|Long} blocksPerYear - * @memberof cosmos_sdk.x.mint.v1.Params - * @instance - */ - Params.prototype.blocksPerYear = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new Params instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.mint.v1.Params - * @static - * @param {cosmos_sdk.x.mint.v1.IParams=} [properties] Properties to set - * @returns {cosmos_sdk.x.mint.v1.Params} Params instance - */ - Params.create = function create(properties) { - return new Params(properties); - }; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.mint.v1.Params - * @static - * @param {cosmos_sdk.x.mint.v1.IParams} m Params message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.mintDenom != null && Object.hasOwnProperty.call(m, "mintDenom")) - w.uint32(10).string(m.mintDenom); - if (m.inflationRateChange != null && Object.hasOwnProperty.call(m, "inflationRateChange")) - w.uint32(18).string(m.inflationRateChange); - if (m.inflationMax != null && Object.hasOwnProperty.call(m, "inflationMax")) - w.uint32(26).string(m.inflationMax); - if (m.inflationMin != null && Object.hasOwnProperty.call(m, "inflationMin")) - w.uint32(34).string(m.inflationMin); - if (m.goalBonded != null && Object.hasOwnProperty.call(m, "goalBonded")) - w.uint32(42).string(m.goalBonded); - if (m.blocksPerYear != null && Object.hasOwnProperty.call(m, "blocksPerYear")) - w.uint32(48).uint64(m.blocksPerYear); - return w; - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.mint.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.mint.v1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(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.mint.v1.Params(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.mintDenom = r.string(); - break; - case 2: - m.inflationRateChange = r.string(); - break; - case 3: - m.inflationMax = r.string(); - break; - case 4: - m.inflationMin = r.string(); - break; - case 5: - m.goalBonded = r.string(); - break; - case 6: - m.blocksPerYear = r.uint64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Params; - })(); - - return v1; - })(); - - return mint; - })(); - - x.params = (function() { - - /** - * Namespace params. - * @memberof cosmos_sdk.x - * @namespace - */ - var params = {}; - - params.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.params - * @namespace - */ - var v1 = {}; - - v1.ParameterChangeProposal = (function() { - - /** - * Properties of a ParameterChangeProposal. - * @memberof cosmos_sdk.x.params.v1 - * @interface IParameterChangeProposal - * @property {string|null} [title] ParameterChangeProposal title - * @property {string|null} [description] ParameterChangeProposal description - * @property {Array.|null} [changes] ParameterChangeProposal changes - */ - - /** - * Constructs a new ParameterChangeProposal. - * @memberof cosmos_sdk.x.params.v1 - * @classdesc Represents a ParameterChangeProposal. - * @implements IParameterChangeProposal - * @constructor - * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal=} [p] Properties to set - */ - function ParameterChangeProposal(p) { - this.changes = []; - 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]]; - } - - /** - * ParameterChangeProposal title. - * @member {string} title - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @instance - */ - ParameterChangeProposal.prototype.title = ""; - - /** - * ParameterChangeProposal description. - * @member {string} description - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @instance - */ - ParameterChangeProposal.prototype.description = ""; - - /** - * ParameterChangeProposal changes. - * @member {Array.} changes - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @instance - */ - ParameterChangeProposal.prototype.changes = $util.emptyArray; - - /** - * Creates a new ParameterChangeProposal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @static - * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal=} [properties] Properties to set - * @returns {cosmos_sdk.x.params.v1.ParameterChangeProposal} ParameterChangeProposal instance - */ - ParameterChangeProposal.create = function create(properties) { - return new ParameterChangeProposal(properties); - }; - - /** - * Encodes the specified ParameterChangeProposal message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @static - * @param {cosmos_sdk.x.params.v1.IParameterChangeProposal} m ParameterChangeProposal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParameterChangeProposal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.title != null && Object.hasOwnProperty.call(m, "title")) - w.uint32(10).string(m.title); - if (m.description != null && Object.hasOwnProperty.call(m, "description")) - w.uint32(18).string(m.description); - if (m.changes != null && m.changes.length) { - for (var i = 0; i < m.changes.length; ++i) - $root.cosmos_sdk.x.params.v1.ParamChange.encode(m.changes[i], w.uint32(26).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a ParameterChangeProposal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.params.v1.ParameterChangeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.params.v1.ParameterChangeProposal} ParameterChangeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParameterChangeProposal.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.params.v1.ParameterChangeProposal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.title = r.string(); - break; - case 2: - m.description = r.string(); - break; - case 3: - if (!(m.changes && m.changes.length)) - m.changes = []; - m.changes.push($root.cosmos_sdk.x.params.v1.ParamChange.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ParameterChangeProposal; - })(); - - v1.ParamChange = (function() { - - /** - * Properties of a ParamChange. - * @memberof cosmos_sdk.x.params.v1 - * @interface IParamChange - * @property {string|null} [subspace] ParamChange subspace - * @property {string|null} [key] ParamChange key - * @property {string|null} [value] ParamChange value - */ - - /** - * Constructs a new ParamChange. - * @memberof cosmos_sdk.x.params.v1 - * @classdesc Represents a ParamChange. - * @implements IParamChange - * @constructor - * @param {cosmos_sdk.x.params.v1.IParamChange=} [p] Properties to set - */ - function ParamChange(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]]; - } - - /** - * ParamChange subspace. - * @member {string} subspace - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @instance - */ - ParamChange.prototype.subspace = ""; - - /** - * ParamChange key. - * @member {string} key - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @instance - */ - ParamChange.prototype.key = ""; - - /** - * ParamChange value. - * @member {string} value - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @instance - */ - ParamChange.prototype.value = ""; - - /** - * Creates a new ParamChange instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @static - * @param {cosmos_sdk.x.params.v1.IParamChange=} [properties] Properties to set - * @returns {cosmos_sdk.x.params.v1.ParamChange} ParamChange instance - */ - ParamChange.create = function create(properties) { - return new ParamChange(properties); - }; - - /** - * Encodes the specified ParamChange message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @static - * @param {cosmos_sdk.x.params.v1.IParamChange} m ParamChange message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ParamChange.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.subspace != null && Object.hasOwnProperty.call(m, "subspace")) - w.uint32(10).string(m.subspace); - if (m.key != null && Object.hasOwnProperty.call(m, "key")) - w.uint32(18).string(m.key); - if (m.value != null && Object.hasOwnProperty.call(m, "value")) - w.uint32(26).string(m.value); - return w; - }; - - /** - * Decodes a ParamChange message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.params.v1.ParamChange - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.params.v1.ParamChange} ParamChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ParamChange.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.params.v1.ParamChange(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.subspace = r.string(); - break; - case 2: - m.key = r.string(); - break; - case 3: - m.value = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ParamChange; - })(); - - return v1; - })(); - - return params; - })(); - - x.slashing = (function() { - - /** - * Namespace slashing. - * @memberof cosmos_sdk.x - * @namespace - */ - var slashing = {}; - - slashing.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.slashing - * @namespace - */ - var v1 = {}; - - v1.MsgUnjail = (function() { - - /** - * Properties of a MsgUnjail. - * @memberof cosmos_sdk.x.slashing.v1 - * @interface IMsgUnjail - * @property {Uint8Array|null} [validatorAddr] MsgUnjail validatorAddr - */ - - /** - * Constructs a new MsgUnjail. - * @memberof cosmos_sdk.x.slashing.v1 - * @classdesc Represents a MsgUnjail. - * @implements IMsgUnjail - * @constructor - * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail=} [p] Properties to set - */ - function MsgUnjail(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]]; - } - - /** - * MsgUnjail validatorAddr. - * @member {Uint8Array} validatorAddr - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @instance - */ - MsgUnjail.prototype.validatorAddr = $util.newBuffer([]); - - /** - * Creates a new MsgUnjail instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @static - * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail=} [properties] Properties to set - * @returns {cosmos_sdk.x.slashing.v1.MsgUnjail} MsgUnjail instance - */ - MsgUnjail.create = function create(properties) { - return new MsgUnjail(properties); - }; - - /** - * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @static - * @param {cosmos_sdk.x.slashing.v1.IMsgUnjail} m MsgUnjail message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUnjail.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.validatorAddr != null && Object.hasOwnProperty.call(m, "validatorAddr")) - w.uint32(10).bytes(m.validatorAddr); - return w; - }; - - /** - * Decodes a MsgUnjail message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.slashing.v1.MsgUnjail - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.slashing.v1.MsgUnjail} MsgUnjail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUnjail.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.slashing.v1.MsgUnjail(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.validatorAddr = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgUnjail; - })(); - - v1.ValidatorSigningInfo = (function() { - - /** - * Properties of a ValidatorSigningInfo. - * @memberof cosmos_sdk.x.slashing.v1 - * @interface IValidatorSigningInfo - * @property {Uint8Array|null} [address] ValidatorSigningInfo address - * @property {number|Long|null} [startHeight] ValidatorSigningInfo startHeight - * @property {number|Long|null} [indexOffset] ValidatorSigningInfo indexOffset - * @property {google.protobuf.ITimestamp|null} [jailedUntil] ValidatorSigningInfo jailedUntil - * @property {boolean|null} [tombstoned] ValidatorSigningInfo tombstoned - * @property {number|Long|null} [missedBlocksCounter] ValidatorSigningInfo missedBlocksCounter - */ - - /** - * Constructs a new ValidatorSigningInfo. - * @memberof cosmos_sdk.x.slashing.v1 - * @classdesc Represents a ValidatorSigningInfo. - * @implements IValidatorSigningInfo - * @constructor - * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo=} [p] Properties to set - */ - function ValidatorSigningInfo(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]]; - } - - /** - * ValidatorSigningInfo address. - * @member {Uint8Array} address - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @instance - */ - ValidatorSigningInfo.prototype.address = $util.newBuffer([]); - - /** - * ValidatorSigningInfo startHeight. - * @member {number|Long} startHeight - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @instance - */ - ValidatorSigningInfo.prototype.startHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ValidatorSigningInfo indexOffset. - * @member {number|Long} indexOffset - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @instance - */ - ValidatorSigningInfo.prototype.indexOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ValidatorSigningInfo jailedUntil. - * @member {google.protobuf.ITimestamp|null|undefined} jailedUntil - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @instance - */ - ValidatorSigningInfo.prototype.jailedUntil = null; - - /** - * ValidatorSigningInfo tombstoned. - * @member {boolean} tombstoned - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @instance - */ - ValidatorSigningInfo.prototype.tombstoned = false; - - /** - * ValidatorSigningInfo missedBlocksCounter. - * @member {number|Long} missedBlocksCounter - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @instance - */ - ValidatorSigningInfo.prototype.missedBlocksCounter = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ValidatorSigningInfo instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @static - * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo=} [properties] Properties to set - * @returns {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} ValidatorSigningInfo instance - */ - ValidatorSigningInfo.create = function create(properties) { - return new ValidatorSigningInfo(properties); - }; - - /** - * Encodes the specified ValidatorSigningInfo message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @static - * @param {cosmos_sdk.x.slashing.v1.IValidatorSigningInfo} m ValidatorSigningInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidatorSigningInfo.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.startHeight != null && Object.hasOwnProperty.call(m, "startHeight")) - w.uint32(16).int64(m.startHeight); - if (m.indexOffset != null && Object.hasOwnProperty.call(m, "indexOffset")) - w.uint32(24).int64(m.indexOffset); - if (m.jailedUntil != null && Object.hasOwnProperty.call(m, "jailedUntil")) - $root.google.protobuf.Timestamp.encode(m.jailedUntil, w.uint32(34).fork()).ldelim(); - if (m.tombstoned != null && Object.hasOwnProperty.call(m, "tombstoned")) - w.uint32(40).bool(m.tombstoned); - if (m.missedBlocksCounter != null && Object.hasOwnProperty.call(m, "missedBlocksCounter")) - w.uint32(48).int64(m.missedBlocksCounter); - return w; - }; - - /** - * Decodes a ValidatorSigningInfo message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.slashing.v1.ValidatorSigningInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.slashing.v1.ValidatorSigningInfo} ValidatorSigningInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidatorSigningInfo.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.slashing.v1.ValidatorSigningInfo(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.address = r.bytes(); - break; - case 2: - m.startHeight = r.int64(); - break; - case 3: - m.indexOffset = r.int64(); - break; - case 4: - m.jailedUntil = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - case 5: - m.tombstoned = r.bool(); - break; - case 6: - m.missedBlocksCounter = r.int64(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return ValidatorSigningInfo; - })(); - - return v1; - })(); - - return slashing; - })(); - - x.staking = (function() { - - /** - * Namespace staking. - * @memberof cosmos_sdk.x - * @namespace - */ - var staking = {}; - - staking.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.staking - * @namespace - */ - var v1 = {}; - - v1.MsgCreateValidator = (function() { - - /** - * Properties of a MsgCreateValidator. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IMsgCreateValidator - * @property {cosmos_sdk.x.staking.v1.IDescription|null} [description] MsgCreateValidator description - * @property {cosmos_sdk.x.staking.v1.ICommissionRates|null} [commission] MsgCreateValidator commission - * @property {string|null} [minSelfDelegation] MsgCreateValidator minSelfDelegation - * @property {Uint8Array|null} [delegatorAddress] MsgCreateValidator delegatorAddress - * @property {Uint8Array|null} [validatorAddress] MsgCreateValidator validatorAddress - * @property {string|null} [pubkey] MsgCreateValidator pubkey - * @property {cosmos_sdk.v1.ICoin|null} [value] MsgCreateValidator value - */ - - /** - * Constructs a new MsgCreateValidator. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a MsgCreateValidator. - * @implements IMsgCreateValidator - * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator=} [p] Properties to set - */ - function MsgCreateValidator(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]]; - } - - /** - * MsgCreateValidator description. - * @member {cosmos_sdk.x.staking.v1.IDescription|null|undefined} description - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @instance - */ - MsgCreateValidator.prototype.description = null; - - /** - * MsgCreateValidator commission. - * @member {cosmos_sdk.x.staking.v1.ICommissionRates|null|undefined} commission - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @instance - */ - MsgCreateValidator.prototype.commission = null; - - /** - * MsgCreateValidator minSelfDelegation. - * @member {string} minSelfDelegation - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @instance - */ - MsgCreateValidator.prototype.minSelfDelegation = ""; - - /** - * MsgCreateValidator delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @instance - */ - MsgCreateValidator.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * MsgCreateValidator validatorAddress. - * @member {Uint8Array} validatorAddress - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @instance - */ - MsgCreateValidator.prototype.validatorAddress = $util.newBuffer([]); - - /** - * MsgCreateValidator pubkey. - * @member {string} pubkey - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @instance - */ - MsgCreateValidator.prototype.pubkey = ""; - - /** - * MsgCreateValidator value. - * @member {cosmos_sdk.v1.ICoin|null|undefined} value - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @instance - */ - MsgCreateValidator.prototype.value = null; - - /** - * Creates a new MsgCreateValidator instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.MsgCreateValidator} MsgCreateValidator instance - */ - MsgCreateValidator.create = function create(properties) { - return new MsgCreateValidator(properties); - }; - - /** - * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgCreateValidator} m MsgCreateValidator message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateValidator.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.description != null && Object.hasOwnProperty.call(m, "description")) - $root.cosmos_sdk.x.staking.v1.Description.encode(m.description, w.uint32(10).fork()).ldelim(); - if (m.commission != null && Object.hasOwnProperty.call(m, "commission")) - $root.cosmos_sdk.x.staking.v1.CommissionRates.encode(m.commission, w.uint32(18).fork()).ldelim(); - if (m.minSelfDelegation != null && Object.hasOwnProperty.call(m, "minSelfDelegation")) - w.uint32(26).string(m.minSelfDelegation); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(34).bytes(m.delegatorAddress); - if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) - w.uint32(42).bytes(m.validatorAddress); - if (m.pubkey != null && Object.hasOwnProperty.call(m, "pubkey")) - w.uint32(50).string(m.pubkey); - if (m.value != null && Object.hasOwnProperty.call(m, "value")) - $root.cosmos_sdk.v1.Coin.encode(m.value, w.uint32(58).fork()).ldelim(); - return w; - }; - - /** - * Decodes a MsgCreateValidator message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.MsgCreateValidator - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.MsgCreateValidator} MsgCreateValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateValidator.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.staking.v1.MsgCreateValidator(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.description = $root.cosmos_sdk.x.staking.v1.Description.decode(r, r.uint32()); - break; - case 2: - m.commission = $root.cosmos_sdk.x.staking.v1.CommissionRates.decode(r, r.uint32()); - break; - case 3: - m.minSelfDelegation = r.string(); - break; - case 4: - m.delegatorAddress = r.bytes(); - break; - case 5: - m.validatorAddress = r.bytes(); - break; - case 6: - m.pubkey = r.string(); - break; - case 7: - m.value = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgCreateValidator; - })(); - - v1.MsgEditValidator = (function() { - - /** - * Properties of a MsgEditValidator. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IMsgEditValidator - * @property {cosmos_sdk.x.staking.v1.IDescription|null} [description] MsgEditValidator description - * @property {Uint8Array|null} [validatorAddress] MsgEditValidator validatorAddress - * @property {string|null} [commissionRate] MsgEditValidator commissionRate - * @property {string|null} [minSelfDelegation] MsgEditValidator minSelfDelegation - */ - - /** - * Constructs a new MsgEditValidator. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a MsgEditValidator. - * @implements IMsgEditValidator - * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator=} [p] Properties to set - */ - function MsgEditValidator(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]]; - } - - /** - * MsgEditValidator description. - * @member {cosmos_sdk.x.staking.v1.IDescription|null|undefined} description - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @instance - */ - MsgEditValidator.prototype.description = null; - - /** - * MsgEditValidator validatorAddress. - * @member {Uint8Array} validatorAddress - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @instance - */ - MsgEditValidator.prototype.validatorAddress = $util.newBuffer([]); - - /** - * MsgEditValidator commissionRate. - * @member {string} commissionRate - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @instance - */ - MsgEditValidator.prototype.commissionRate = ""; - - /** - * MsgEditValidator minSelfDelegation. - * @member {string} minSelfDelegation - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @instance - */ - MsgEditValidator.prototype.minSelfDelegation = ""; - - /** - * Creates a new MsgEditValidator instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.MsgEditValidator} MsgEditValidator instance - */ - MsgEditValidator.create = function create(properties) { - return new MsgEditValidator(properties); - }; - - /** - * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgEditValidator} m MsgEditValidator message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgEditValidator.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.description != null && Object.hasOwnProperty.call(m, "description")) - $root.cosmos_sdk.x.staking.v1.Description.encode(m.description, w.uint32(10).fork()).ldelim(); - if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) - w.uint32(18).bytes(m.validatorAddress); - if (m.commissionRate != null && Object.hasOwnProperty.call(m, "commissionRate")) - w.uint32(26).string(m.commissionRate); - if (m.minSelfDelegation != null && Object.hasOwnProperty.call(m, "minSelfDelegation")) - w.uint32(34).string(m.minSelfDelegation); - return w; - }; - - /** - * Decodes a MsgEditValidator message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.MsgEditValidator - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.MsgEditValidator} MsgEditValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgEditValidator.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.staking.v1.MsgEditValidator(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.description = $root.cosmos_sdk.x.staking.v1.Description.decode(r, r.uint32()); - break; - case 2: - m.validatorAddress = r.bytes(); - break; - case 3: - m.commissionRate = r.string(); - break; - case 4: - m.minSelfDelegation = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgEditValidator; - })(); - - v1.MsgDelegate = (function() { - - /** - * Properties of a MsgDelegate. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IMsgDelegate - * @property {Uint8Array|null} [delegatorAddress] MsgDelegate delegatorAddress - * @property {Uint8Array|null} [validatorAddress] MsgDelegate validatorAddress - * @property {cosmos_sdk.v1.ICoin|null} [amount] MsgDelegate amount - */ - - /** - * Constructs a new MsgDelegate. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a MsgDelegate. - * @implements IMsgDelegate - * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgDelegate=} [p] Properties to set - */ - function MsgDelegate(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]]; - } - - /** - * MsgDelegate delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @instance - */ - MsgDelegate.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * MsgDelegate validatorAddress. - * @member {Uint8Array} validatorAddress - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @instance - */ - MsgDelegate.prototype.validatorAddress = $util.newBuffer([]); - - /** - * MsgDelegate amount. - * @member {cosmos_sdk.v1.ICoin|null|undefined} amount - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @instance - */ - MsgDelegate.prototype.amount = null; - - /** - * Creates a new MsgDelegate instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgDelegate=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.MsgDelegate} MsgDelegate instance - */ - MsgDelegate.create = function create(properties) { - return new MsgDelegate(properties); - }; - - /** - * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgDelegate} m MsgDelegate message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgDelegate.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) - w.uint32(18).bytes(m.validatorAddress); - if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) - $root.cosmos_sdk.v1.Coin.encode(m.amount, w.uint32(26).fork()).ldelim(); - return w; - }; - - /** - * Decodes a MsgDelegate message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.MsgDelegate - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.MsgDelegate} MsgDelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgDelegate.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.staking.v1.MsgDelegate(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.validatorAddress = r.bytes(); - break; - case 3: - m.amount = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgDelegate; - })(); - - v1.MsgBeginRedelegate = (function() { - - /** - * Properties of a MsgBeginRedelegate. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IMsgBeginRedelegate - * @property {Uint8Array|null} [delegatorAddress] MsgBeginRedelegate delegatorAddress - * @property {Uint8Array|null} [validatorSrcAddress] MsgBeginRedelegate validatorSrcAddress - * @property {Uint8Array|null} [validatorDstAddress] MsgBeginRedelegate validatorDstAddress - * @property {cosmos_sdk.v1.ICoin|null} [amount] MsgBeginRedelegate amount - */ - - /** - * Constructs a new MsgBeginRedelegate. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a MsgBeginRedelegate. - * @implements IMsgBeginRedelegate - * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate=} [p] Properties to set - */ - function MsgBeginRedelegate(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]]; - } - - /** - * MsgBeginRedelegate delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @instance - */ - MsgBeginRedelegate.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * MsgBeginRedelegate validatorSrcAddress. - * @member {Uint8Array} validatorSrcAddress - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @instance - */ - MsgBeginRedelegate.prototype.validatorSrcAddress = $util.newBuffer([]); - - /** - * MsgBeginRedelegate validatorDstAddress. - * @member {Uint8Array} validatorDstAddress - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @instance - */ - MsgBeginRedelegate.prototype.validatorDstAddress = $util.newBuffer([]); - - /** - * MsgBeginRedelegate amount. - * @member {cosmos_sdk.v1.ICoin|null|undefined} amount - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @instance - */ - MsgBeginRedelegate.prototype.amount = null; - - /** - * Creates a new MsgBeginRedelegate instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} MsgBeginRedelegate instance - */ - MsgBeginRedelegate.create = function create(properties) { - return new MsgBeginRedelegate(properties); - }; - - /** - * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgBeginRedelegate} m MsgBeginRedelegate message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgBeginRedelegate.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.validatorSrcAddress != null && Object.hasOwnProperty.call(m, "validatorSrcAddress")) - w.uint32(18).bytes(m.validatorSrcAddress); - if (m.validatorDstAddress != null && Object.hasOwnProperty.call(m, "validatorDstAddress")) - w.uint32(26).bytes(m.validatorDstAddress); - if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) - $root.cosmos_sdk.v1.Coin.encode(m.amount, w.uint32(34).fork()).ldelim(); - return w; - }; - - /** - * Decodes a MsgBeginRedelegate message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.MsgBeginRedelegate - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.MsgBeginRedelegate} MsgBeginRedelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgBeginRedelegate.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.staking.v1.MsgBeginRedelegate(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.validatorSrcAddress = r.bytes(); - break; - case 3: - m.validatorDstAddress = r.bytes(); - break; - case 4: - m.amount = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgBeginRedelegate; - })(); - - v1.MsgUndelegate = (function() { - - /** - * Properties of a MsgUndelegate. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IMsgUndelegate - * @property {Uint8Array|null} [delegatorAddress] MsgUndelegate delegatorAddress - * @property {Uint8Array|null} [validatorAddress] MsgUndelegate validatorAddress - * @property {cosmos_sdk.v1.ICoin|null} [amount] MsgUndelegate amount - */ - - /** - * Constructs a new MsgUndelegate. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a MsgUndelegate. - * @implements IMsgUndelegate - * @constructor - * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate=} [p] Properties to set - */ - function MsgUndelegate(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]]; - } - - /** - * MsgUndelegate delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @instance - */ - MsgUndelegate.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * MsgUndelegate validatorAddress. - * @member {Uint8Array} validatorAddress - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @instance - */ - MsgUndelegate.prototype.validatorAddress = $util.newBuffer([]); - - /** - * MsgUndelegate amount. - * @member {cosmos_sdk.v1.ICoin|null|undefined} amount - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @instance - */ - MsgUndelegate.prototype.amount = null; - - /** - * Creates a new MsgUndelegate instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.MsgUndelegate} MsgUndelegate instance - */ - MsgUndelegate.create = function create(properties) { - return new MsgUndelegate(properties); - }; - - /** - * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @static - * @param {cosmos_sdk.x.staking.v1.IMsgUndelegate} m MsgUndelegate message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgUndelegate.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) - w.uint32(18).bytes(m.validatorAddress); - if (m.amount != null && Object.hasOwnProperty.call(m, "amount")) - $root.cosmos_sdk.v1.Coin.encode(m.amount, w.uint32(26).fork()).ldelim(); - return w; - }; - - /** - * Decodes a MsgUndelegate message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.MsgUndelegate - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.MsgUndelegate} MsgUndelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgUndelegate.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.staking.v1.MsgUndelegate(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.validatorAddress = r.bytes(); - break; - case 3: - m.amount = $root.cosmos_sdk.v1.Coin.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgUndelegate; - })(); - - v1.HistoricalInfo = (function() { - - /** - * Properties of a HistoricalInfo. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IHistoricalInfo - * @property {tendermint.abci.types.IHeader|null} [header] HistoricalInfo header - * @property {Array.|null} [valset] HistoricalInfo valset - */ - - /** - * Constructs a new HistoricalInfo. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a HistoricalInfo. - * @implements IHistoricalInfo - * @constructor - * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo=} [p] Properties to set - */ - function HistoricalInfo(p) { - this.valset = []; - 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]]; - } - - /** - * HistoricalInfo header. - * @member {tendermint.abci.types.IHeader|null|undefined} header - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @instance - */ - HistoricalInfo.prototype.header = null; - - /** - * HistoricalInfo valset. - * @member {Array.} valset - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @instance - */ - HistoricalInfo.prototype.valset = $util.emptyArray; - - /** - * Creates a new HistoricalInfo instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @static - * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.HistoricalInfo} HistoricalInfo instance - */ - HistoricalInfo.create = function create(properties) { - return new HistoricalInfo(properties); - }; - - /** - * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @static - * @param {cosmos_sdk.x.staking.v1.IHistoricalInfo} m HistoricalInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HistoricalInfo.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.header != null && Object.hasOwnProperty.call(m, "header")) - $root.tendermint.abci.types.Header.encode(m.header, w.uint32(10).fork()).ldelim(); - if (m.valset != null && m.valset.length) { - for (var i = 0; i < m.valset.length; ++i) - $root.cosmos_sdk.x.staking.v1.Validator.encode(m.valset[i], w.uint32(18).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a HistoricalInfo message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.HistoricalInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.HistoricalInfo} HistoricalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HistoricalInfo.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.staking.v1.HistoricalInfo(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.header = $root.tendermint.abci.types.Header.decode(r, r.uint32()); - break; - case 2: - if (!(m.valset && m.valset.length)) - m.valset = []; - m.valset.push($root.cosmos_sdk.x.staking.v1.Validator.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return HistoricalInfo; - })(); - - v1.CommissionRates = (function() { - - /** - * Properties of a CommissionRates. - * @memberof cosmos_sdk.x.staking.v1 - * @interface ICommissionRates - * @property {string|null} [rate] CommissionRates rate - * @property {string|null} [maxRate] CommissionRates maxRate - * @property {string|null} [maxChangeRate] CommissionRates maxChangeRate - */ - - /** - * Constructs a new CommissionRates. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a CommissionRates. - * @implements ICommissionRates - * @constructor - * @param {cosmos_sdk.x.staking.v1.ICommissionRates=} [p] Properties to set - */ - function CommissionRates(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]]; - } - - /** - * CommissionRates rate. - * @member {string} rate - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @instance - */ - CommissionRates.prototype.rate = ""; - - /** - * CommissionRates maxRate. - * @member {string} maxRate - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @instance - */ - CommissionRates.prototype.maxRate = ""; - - /** - * CommissionRates maxChangeRate. - * @member {string} maxChangeRate - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @instance - */ - CommissionRates.prototype.maxChangeRate = ""; - - /** - * Creates a new CommissionRates instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @static - * @param {cosmos_sdk.x.staking.v1.ICommissionRates=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.CommissionRates} CommissionRates instance - */ - CommissionRates.create = function create(properties) { - return new CommissionRates(properties); - }; - - /** - * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @static - * @param {cosmos_sdk.x.staking.v1.ICommissionRates} m CommissionRates message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommissionRates.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.rate != null && Object.hasOwnProperty.call(m, "rate")) - w.uint32(10).string(m.rate); - if (m.maxRate != null && Object.hasOwnProperty.call(m, "maxRate")) - w.uint32(18).string(m.maxRate); - if (m.maxChangeRate != null && Object.hasOwnProperty.call(m, "maxChangeRate")) - w.uint32(26).string(m.maxChangeRate); - return w; - }; - - /** - * Decodes a CommissionRates message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.CommissionRates - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.CommissionRates} CommissionRates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommissionRates.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.staking.v1.CommissionRates(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.rate = r.string(); - break; - case 2: - m.maxRate = r.string(); - break; - case 3: - m.maxChangeRate = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return CommissionRates; - })(); - - v1.Commission = (function() { - - /** - * Properties of a Commission. - * @memberof cosmos_sdk.x.staking.v1 - * @interface ICommission - * @property {cosmos_sdk.x.staking.v1.ICommissionRates|null} [commissionRates] Commission commissionRates - * @property {google.protobuf.ITimestamp|null} [updateTime] Commission updateTime - */ - - /** - * Constructs a new Commission. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a Commission. - * @implements ICommission - * @constructor - * @param {cosmos_sdk.x.staking.v1.ICommission=} [p] Properties to set - */ - function Commission(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]]; - } - - /** - * Commission commissionRates. - * @member {cosmos_sdk.x.staking.v1.ICommissionRates|null|undefined} commissionRates - * @memberof cosmos_sdk.x.staking.v1.Commission - * @instance - */ - Commission.prototype.commissionRates = null; - - /** - * Commission updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof cosmos_sdk.x.staking.v1.Commission - * @instance - */ - Commission.prototype.updateTime = null; - - /** - * Creates a new Commission instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.Commission - * @static - * @param {cosmos_sdk.x.staking.v1.ICommission=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.Commission} Commission instance - */ - Commission.create = function create(properties) { - return new Commission(properties); - }; - - /** - * Encodes the specified Commission message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.Commission - * @static - * @param {cosmos_sdk.x.staking.v1.ICommission} m Commission message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Commission.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.commissionRates != null && Object.hasOwnProperty.call(m, "commissionRates")) - $root.cosmos_sdk.x.staking.v1.CommissionRates.encode(m.commissionRates, w.uint32(10).fork()).ldelim(); - if (m.updateTime != null && Object.hasOwnProperty.call(m, "updateTime")) - $root.google.protobuf.Timestamp.encode(m.updateTime, w.uint32(18).fork()).ldelim(); - return w; - }; - - /** - * Decodes a Commission message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.Commission - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.Commission} Commission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Commission.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.staking.v1.Commission(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.commissionRates = $root.cosmos_sdk.x.staking.v1.CommissionRates.decode(r, r.uint32()); - break; - case 2: - m.updateTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Commission; - })(); - - v1.Description = (function() { - - /** - * Properties of a Description. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IDescription - * @property {string|null} [moniker] Description moniker - * @property {string|null} [identity] Description identity - * @property {string|null} [website] Description website - * @property {string|null} [securityContact] Description securityContact - * @property {string|null} [details] Description details - */ - - /** - * Constructs a new Description. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a Description. - * @implements IDescription - * @constructor - * @param {cosmos_sdk.x.staking.v1.IDescription=} [p] Properties to set - */ - function Description(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]]; - } - - /** - * Description moniker. - * @member {string} moniker - * @memberof cosmos_sdk.x.staking.v1.Description - * @instance - */ - Description.prototype.moniker = ""; - - /** - * Description identity. - * @member {string} identity - * @memberof cosmos_sdk.x.staking.v1.Description - * @instance - */ - Description.prototype.identity = ""; - - /** - * Description website. - * @member {string} website - * @memberof cosmos_sdk.x.staking.v1.Description - * @instance - */ - Description.prototype.website = ""; - - /** - * Description securityContact. - * @member {string} securityContact - * @memberof cosmos_sdk.x.staking.v1.Description - * @instance - */ - Description.prototype.securityContact = ""; - - /** - * Description details. - * @member {string} details - * @memberof cosmos_sdk.x.staking.v1.Description - * @instance - */ - Description.prototype.details = ""; - - /** - * Creates a new Description instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.Description - * @static - * @param {cosmos_sdk.x.staking.v1.IDescription=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.Description} Description instance - */ - Description.create = function create(properties) { - return new Description(properties); - }; - - /** - * Encodes the specified Description message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.Description - * @static - * @param {cosmos_sdk.x.staking.v1.IDescription} m Description message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Description.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.moniker != null && Object.hasOwnProperty.call(m, "moniker")) - w.uint32(10).string(m.moniker); - if (m.identity != null && Object.hasOwnProperty.call(m, "identity")) - w.uint32(18).string(m.identity); - if (m.website != null && Object.hasOwnProperty.call(m, "website")) - w.uint32(26).string(m.website); - if (m.securityContact != null && Object.hasOwnProperty.call(m, "securityContact")) - w.uint32(34).string(m.securityContact); - if (m.details != null && Object.hasOwnProperty.call(m, "details")) - w.uint32(42).string(m.details); - return w; - }; - - /** - * Decodes a Description message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.Description - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.Description} Description - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Description.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.staking.v1.Description(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.moniker = r.string(); - break; - case 2: - m.identity = r.string(); - break; - case 3: - m.website = r.string(); - break; - case 4: - m.securityContact = r.string(); - break; - case 5: - m.details = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Description; - })(); - - v1.Validator = (function() { - - /** - * Properties of a Validator. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IValidator - * @property {Uint8Array|null} [operatorAddress] Validator operatorAddress - * @property {string|null} [consensusPubkey] Validator consensusPubkey - * @property {boolean|null} [jailed] Validator jailed - * @property {number|null} [status] Validator status - * @property {string|null} [tokens] Validator tokens - * @property {string|null} [delegatorShares] Validator delegatorShares - * @property {cosmos_sdk.x.staking.v1.IDescription|null} [description] Validator description - * @property {number|Long|null} [unbondingHeight] Validator unbondingHeight - * @property {google.protobuf.ITimestamp|null} [unbondingTime] Validator unbondingTime - * @property {cosmos_sdk.x.staking.v1.ICommission|null} [commission] Validator commission - * @property {string|null} [minSelfDelegation] Validator minSelfDelegation - */ - - /** - * Constructs a new Validator. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a Validator. - * @implements IValidator - * @constructor - * @param {cosmos_sdk.x.staking.v1.IValidator=} [p] Properties to set - */ - 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 operatorAddress. - * @member {Uint8Array} operatorAddress - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.operatorAddress = $util.newBuffer([]); - - /** - * Validator consensusPubkey. - * @member {string} consensusPubkey - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.consensusPubkey = ""; - - /** - * Validator jailed. - * @member {boolean} jailed - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.jailed = false; - - /** - * Validator status. - * @member {number} status - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.status = 0; - - /** - * Validator tokens. - * @member {string} tokens - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.tokens = ""; - - /** - * Validator delegatorShares. - * @member {string} delegatorShares - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.delegatorShares = ""; - - /** - * Validator description. - * @member {cosmos_sdk.x.staking.v1.IDescription|null|undefined} description - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.description = null; - - /** - * Validator unbondingHeight. - * @member {number|Long} unbondingHeight - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.unbondingHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Validator unbondingTime. - * @member {google.protobuf.ITimestamp|null|undefined} unbondingTime - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.unbondingTime = null; - - /** - * Validator commission. - * @member {cosmos_sdk.x.staking.v1.ICommission|null|undefined} commission - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.commission = null; - - /** - * Validator minSelfDelegation. - * @member {string} minSelfDelegation - * @memberof cosmos_sdk.x.staking.v1.Validator - * @instance - */ - Validator.prototype.minSelfDelegation = ""; - - /** - * Creates a new Validator instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.Validator - * @static - * @param {cosmos_sdk.x.staking.v1.IValidator=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.Validator} Validator instance - */ - Validator.create = function create(properties) { - return new Validator(properties); - }; - - /** - * Encodes the specified Validator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.Validator - * @static - * @param {cosmos_sdk.x.staking.v1.IValidator} m Validator message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Validator.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.operatorAddress != null && Object.hasOwnProperty.call(m, "operatorAddress")) - w.uint32(10).bytes(m.operatorAddress); - if (m.consensusPubkey != null && Object.hasOwnProperty.call(m, "consensusPubkey")) - w.uint32(18).string(m.consensusPubkey); - if (m.jailed != null && Object.hasOwnProperty.call(m, "jailed")) - w.uint32(24).bool(m.jailed); - if (m.status != null && Object.hasOwnProperty.call(m, "status")) - w.uint32(32).int32(m.status); - if (m.tokens != null && Object.hasOwnProperty.call(m, "tokens")) - w.uint32(42).string(m.tokens); - if (m.delegatorShares != null && Object.hasOwnProperty.call(m, "delegatorShares")) - w.uint32(50).string(m.delegatorShares); - if (m.description != null && Object.hasOwnProperty.call(m, "description")) - $root.cosmos_sdk.x.staking.v1.Description.encode(m.description, w.uint32(58).fork()).ldelim(); - if (m.unbondingHeight != null && Object.hasOwnProperty.call(m, "unbondingHeight")) - w.uint32(64).int64(m.unbondingHeight); - if (m.unbondingTime != null && Object.hasOwnProperty.call(m, "unbondingTime")) - $root.google.protobuf.Timestamp.encode(m.unbondingTime, w.uint32(74).fork()).ldelim(); - if (m.commission != null && Object.hasOwnProperty.call(m, "commission")) - $root.cosmos_sdk.x.staking.v1.Commission.encode(m.commission, w.uint32(82).fork()).ldelim(); - if (m.minSelfDelegation != null && Object.hasOwnProperty.call(m, "minSelfDelegation")) - w.uint32(90).string(m.minSelfDelegation); - return w; - }; - - /** - * Decodes a Validator message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.Validator} Validator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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.cosmos_sdk.x.staking.v1.Validator(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.operatorAddress = r.bytes(); - break; - case 2: - m.consensusPubkey = r.string(); - break; - case 3: - m.jailed = r.bool(); - break; - case 4: - m.status = r.int32(); - break; - case 5: - m.tokens = r.string(); - break; - case 6: - m.delegatorShares = r.string(); - break; - case 7: - m.description = $root.cosmos_sdk.x.staking.v1.Description.decode(r, r.uint32()); - break; - case 8: - m.unbondingHeight = r.int64(); - break; - case 9: - m.unbondingTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - case 10: - m.commission = $root.cosmos_sdk.x.staking.v1.Commission.decode(r, r.uint32()); - break; - case 11: - m.minSelfDelegation = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Validator; - })(); - - v1.DVPair = (function() { - - /** - * Properties of a DVPair. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IDVPair - * @property {Uint8Array|null} [delegatorAddress] DVPair delegatorAddress - * @property {Uint8Array|null} [validatorAddress] DVPair validatorAddress - */ - - /** - * Constructs a new DVPair. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a DVPair. - * @implements IDVPair - * @constructor - * @param {cosmos_sdk.x.staking.v1.IDVPair=} [p] Properties to set - */ - function DVPair(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]]; - } - - /** - * DVPair delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @instance - */ - DVPair.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * DVPair validatorAddress. - * @member {Uint8Array} validatorAddress - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @instance - */ - DVPair.prototype.validatorAddress = $util.newBuffer([]); - - /** - * Creates a new DVPair instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @static - * @param {cosmos_sdk.x.staking.v1.IDVPair=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.DVPair} DVPair instance - */ - DVPair.create = function create(properties) { - return new DVPair(properties); - }; - - /** - * Encodes the specified DVPair message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @static - * @param {cosmos_sdk.x.staking.v1.IDVPair} m DVPair message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DVPair.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) - w.uint32(18).bytes(m.validatorAddress); - return w; - }; - - /** - * Decodes a DVPair message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.DVPair - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.DVPair} DVPair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DVPair.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.staking.v1.DVPair(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.validatorAddress = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return DVPair; - })(); - - v1.DVPairs = (function() { - - /** - * Properties of a DVPairs. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IDVPairs - * @property {Array.|null} [pairs] DVPairs pairs - */ - - /** - * Constructs a new DVPairs. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a DVPairs. - * @implements IDVPairs - * @constructor - * @param {cosmos_sdk.x.staking.v1.IDVPairs=} [p] Properties to set - */ - function DVPairs(p) { - this.pairs = []; - 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]]; - } - - /** - * DVPairs pairs. - * @member {Array.} pairs - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @instance - */ - DVPairs.prototype.pairs = $util.emptyArray; - - /** - * Creates a new DVPairs instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @static - * @param {cosmos_sdk.x.staking.v1.IDVPairs=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.DVPairs} DVPairs instance - */ - DVPairs.create = function create(properties) { - return new DVPairs(properties); - }; - - /** - * Encodes the specified DVPairs message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @static - * @param {cosmos_sdk.x.staking.v1.IDVPairs} m DVPairs message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DVPairs.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.pairs != null && m.pairs.length) { - for (var i = 0; i < m.pairs.length; ++i) - $root.cosmos_sdk.x.staking.v1.DVPair.encode(m.pairs[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a DVPairs message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.DVPairs - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.DVPairs} DVPairs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DVPairs.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.staking.v1.DVPairs(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.pairs && m.pairs.length)) - m.pairs = []; - m.pairs.push($root.cosmos_sdk.x.staking.v1.DVPair.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return DVPairs; - })(); - - v1.DVVTriplet = (function() { - - /** - * Properties of a DVVTriplet. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IDVVTriplet - * @property {Uint8Array|null} [delegatorAddress] DVVTriplet delegatorAddress - * @property {Uint8Array|null} [validatorSrcAddress] DVVTriplet validatorSrcAddress - * @property {Uint8Array|null} [validatorDstAddress] DVVTriplet validatorDstAddress - */ - - /** - * Constructs a new DVVTriplet. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a DVVTriplet. - * @implements IDVVTriplet - * @constructor - * @param {cosmos_sdk.x.staking.v1.IDVVTriplet=} [p] Properties to set - */ - function DVVTriplet(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]]; - } - - /** - * DVVTriplet delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @instance - */ - DVVTriplet.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * DVVTriplet validatorSrcAddress. - * @member {Uint8Array} validatorSrcAddress - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @instance - */ - DVVTriplet.prototype.validatorSrcAddress = $util.newBuffer([]); - - /** - * DVVTriplet validatorDstAddress. - * @member {Uint8Array} validatorDstAddress - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @instance - */ - DVVTriplet.prototype.validatorDstAddress = $util.newBuffer([]); - - /** - * Creates a new DVVTriplet instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @static - * @param {cosmos_sdk.x.staking.v1.IDVVTriplet=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.DVVTriplet} DVVTriplet instance - */ - DVVTriplet.create = function create(properties) { - return new DVVTriplet(properties); - }; - - /** - * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @static - * @param {cosmos_sdk.x.staking.v1.IDVVTriplet} m DVVTriplet message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DVVTriplet.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.validatorSrcAddress != null && Object.hasOwnProperty.call(m, "validatorSrcAddress")) - w.uint32(18).bytes(m.validatorSrcAddress); - if (m.validatorDstAddress != null && Object.hasOwnProperty.call(m, "validatorDstAddress")) - w.uint32(26).bytes(m.validatorDstAddress); - return w; - }; - - /** - * Decodes a DVVTriplet message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.DVVTriplet - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.DVVTriplet} DVVTriplet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DVVTriplet.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.staking.v1.DVVTriplet(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.validatorSrcAddress = r.bytes(); - break; - case 3: - m.validatorDstAddress = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return DVVTriplet; - })(); - - v1.DVVTriplets = (function() { - - /** - * Properties of a DVVTriplets. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IDVVTriplets - * @property {Array.|null} [triplets] DVVTriplets triplets - */ - - /** - * Constructs a new DVVTriplets. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a DVVTriplets. - * @implements IDVVTriplets - * @constructor - * @param {cosmos_sdk.x.staking.v1.IDVVTriplets=} [p] Properties to set - */ - function DVVTriplets(p) { - this.triplets = []; - 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]]; - } - - /** - * DVVTriplets triplets. - * @member {Array.} triplets - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @instance - */ - DVVTriplets.prototype.triplets = $util.emptyArray; - - /** - * Creates a new DVVTriplets instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @static - * @param {cosmos_sdk.x.staking.v1.IDVVTriplets=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.DVVTriplets} DVVTriplets instance - */ - DVVTriplets.create = function create(properties) { - return new DVVTriplets(properties); - }; - - /** - * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @static - * @param {cosmos_sdk.x.staking.v1.IDVVTriplets} m DVVTriplets message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DVVTriplets.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.triplets != null && m.triplets.length) { - for (var i = 0; i < m.triplets.length; ++i) - $root.cosmos_sdk.x.staking.v1.DVVTriplet.encode(m.triplets[i], w.uint32(10).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a DVVTriplets message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.DVVTriplets - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.DVVTriplets} DVVTriplets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DVVTriplets.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.staking.v1.DVVTriplets(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - if (!(m.triplets && m.triplets.length)) - m.triplets = []; - m.triplets.push($root.cosmos_sdk.x.staking.v1.DVVTriplet.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return DVVTriplets; - })(); - - v1.Delegation = (function() { - - /** - * Properties of a Delegation. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IDelegation - * @property {Uint8Array|null} [delegatorAddress] Delegation delegatorAddress - * @property {Uint8Array|null} [validatorAddress] Delegation validatorAddress - * @property {string|null} [shares] Delegation shares - */ - - /** - * Constructs a new Delegation. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a Delegation. - * @implements IDelegation - * @constructor - * @param {cosmos_sdk.x.staking.v1.IDelegation=} [p] Properties to set - */ - function Delegation(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]]; - } - - /** - * Delegation delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @instance - */ - Delegation.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * Delegation validatorAddress. - * @member {Uint8Array} validatorAddress - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @instance - */ - Delegation.prototype.validatorAddress = $util.newBuffer([]); - - /** - * Delegation shares. - * @member {string} shares - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @instance - */ - Delegation.prototype.shares = ""; - - /** - * Creates a new Delegation instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @static - * @param {cosmos_sdk.x.staking.v1.IDelegation=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.Delegation} Delegation instance - */ - Delegation.create = function create(properties) { - return new Delegation(properties); - }; - - /** - * Encodes the specified Delegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @static - * @param {cosmos_sdk.x.staking.v1.IDelegation} m Delegation message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Delegation.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) - w.uint32(18).bytes(m.validatorAddress); - if (m.shares != null && Object.hasOwnProperty.call(m, "shares")) - w.uint32(26).string(m.shares); - return w; - }; - - /** - * Decodes a Delegation message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.Delegation - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.Delegation} Delegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Delegation.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.staking.v1.Delegation(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.validatorAddress = r.bytes(); - break; - case 3: - m.shares = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Delegation; - })(); - - v1.UnbondingDelegation = (function() { - - /** - * Properties of an UnbondingDelegation. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IUnbondingDelegation - * @property {Uint8Array|null} [delegatorAddress] UnbondingDelegation delegatorAddress - * @property {Uint8Array|null} [validatorAddress] UnbondingDelegation validatorAddress - * @property {Array.|null} [entries] UnbondingDelegation entries - */ - - /** - * Constructs a new UnbondingDelegation. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents an UnbondingDelegation. - * @implements IUnbondingDelegation - * @constructor - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation=} [p] Properties to set - */ - function UnbondingDelegation(p) { - this.entries = []; - 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]]; - } - - /** - * UnbondingDelegation delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @instance - */ - UnbondingDelegation.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * UnbondingDelegation validatorAddress. - * @member {Uint8Array} validatorAddress - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @instance - */ - UnbondingDelegation.prototype.validatorAddress = $util.newBuffer([]); - - /** - * UnbondingDelegation entries. - * @member {Array.} entries - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @instance - */ - UnbondingDelegation.prototype.entries = $util.emptyArray; - - /** - * Creates a new UnbondingDelegation instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @static - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegation} UnbondingDelegation instance - */ - UnbondingDelegation.create = function create(properties) { - return new UnbondingDelegation(properties); - }; - - /** - * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @static - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegation} m UnbondingDelegation message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnbondingDelegation.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.validatorAddress != null && Object.hasOwnProperty.call(m, "validatorAddress")) - w.uint32(18).bytes(m.validatorAddress); - if (m.entries != null && m.entries.length) { - for (var i = 0; i < m.entries.length; ++i) - $root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.encode(m.entries[i], w.uint32(26).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes an UnbondingDelegation message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegation - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegation} UnbondingDelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnbondingDelegation.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.staking.v1.UnbondingDelegation(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.validatorAddress = r.bytes(); - break; - case 3: - if (!(m.entries && m.entries.length)) - m.entries = []; - m.entries.push($root.cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return UnbondingDelegation; - })(); - - v1.UnbondingDelegationEntry = (function() { - - /** - * Properties of an UnbondingDelegationEntry. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IUnbondingDelegationEntry - * @property {number|Long|null} [creationHeight] UnbondingDelegationEntry creationHeight - * @property {google.protobuf.ITimestamp|null} [completionTime] UnbondingDelegationEntry completionTime - * @property {string|null} [initialBalance] UnbondingDelegationEntry initialBalance - * @property {string|null} [balance] UnbondingDelegationEntry balance - */ - - /** - * Constructs a new UnbondingDelegationEntry. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents an UnbondingDelegationEntry. - * @implements IUnbondingDelegationEntry - * @constructor - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry=} [p] Properties to set - */ - function UnbondingDelegationEntry(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]]; - } - - /** - * UnbondingDelegationEntry creationHeight. - * @member {number|Long} creationHeight - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @instance - */ - UnbondingDelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UnbondingDelegationEntry completionTime. - * @member {google.protobuf.ITimestamp|null|undefined} completionTime - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @instance - */ - UnbondingDelegationEntry.prototype.completionTime = null; - - /** - * UnbondingDelegationEntry initialBalance. - * @member {string} initialBalance - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @instance - */ - UnbondingDelegationEntry.prototype.initialBalance = ""; - - /** - * UnbondingDelegationEntry balance. - * @member {string} balance - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @instance - */ - UnbondingDelegationEntry.prototype.balance = ""; - - /** - * Creates a new UnbondingDelegationEntry instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @static - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} UnbondingDelegationEntry instance - */ - UnbondingDelegationEntry.create = function create(properties) { - return new UnbondingDelegationEntry(properties); - }; - - /** - * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @static - * @param {cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry} m UnbondingDelegationEntry message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnbondingDelegationEntry.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.creationHeight != null && Object.hasOwnProperty.call(m, "creationHeight")) - w.uint32(8).int64(m.creationHeight); - if (m.completionTime != null && Object.hasOwnProperty.call(m, "completionTime")) - $root.google.protobuf.Timestamp.encode(m.completionTime, w.uint32(18).fork()).ldelim(); - if (m.initialBalance != null && Object.hasOwnProperty.call(m, "initialBalance")) - w.uint32(26).string(m.initialBalance); - if (m.balance != null && Object.hasOwnProperty.call(m, "balance")) - w.uint32(34).string(m.balance); - return w; - }; - - /** - * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.UnbondingDelegationEntry - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.UnbondingDelegationEntry} UnbondingDelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnbondingDelegationEntry.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.staking.v1.UnbondingDelegationEntry(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.creationHeight = r.int64(); - break; - case 2: - m.completionTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - case 3: - m.initialBalance = r.string(); - break; - case 4: - m.balance = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return UnbondingDelegationEntry; - })(); - - v1.RedelegationEntry = (function() { - - /** - * Properties of a RedelegationEntry. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IRedelegationEntry - * @property {number|Long|null} [creationHeight] RedelegationEntry creationHeight - * @property {google.protobuf.ITimestamp|null} [completionTime] RedelegationEntry completionTime - * @property {string|null} [initialBalance] RedelegationEntry initialBalance - * @property {string|null} [sharesDst] RedelegationEntry sharesDst - */ - - /** - * Constructs a new RedelegationEntry. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a RedelegationEntry. - * @implements IRedelegationEntry - * @constructor - * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry=} [p] Properties to set - */ - function RedelegationEntry(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]]; - } - - /** - * RedelegationEntry creationHeight. - * @member {number|Long} creationHeight - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @instance - */ - RedelegationEntry.prototype.creationHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RedelegationEntry completionTime. - * @member {google.protobuf.ITimestamp|null|undefined} completionTime - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @instance - */ - RedelegationEntry.prototype.completionTime = null; - - /** - * RedelegationEntry initialBalance. - * @member {string} initialBalance - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @instance - */ - RedelegationEntry.prototype.initialBalance = ""; - - /** - * RedelegationEntry sharesDst. - * @member {string} sharesDst - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @instance - */ - RedelegationEntry.prototype.sharesDst = ""; - - /** - * Creates a new RedelegationEntry instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @static - * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.RedelegationEntry} RedelegationEntry instance - */ - RedelegationEntry.create = function create(properties) { - return new RedelegationEntry(properties); - }; - - /** - * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @static - * @param {cosmos_sdk.x.staking.v1.IRedelegationEntry} m RedelegationEntry message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RedelegationEntry.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.creationHeight != null && Object.hasOwnProperty.call(m, "creationHeight")) - w.uint32(8).int64(m.creationHeight); - if (m.completionTime != null && Object.hasOwnProperty.call(m, "completionTime")) - $root.google.protobuf.Timestamp.encode(m.completionTime, w.uint32(18).fork()).ldelim(); - if (m.initialBalance != null && Object.hasOwnProperty.call(m, "initialBalance")) - w.uint32(26).string(m.initialBalance); - if (m.sharesDst != null && Object.hasOwnProperty.call(m, "sharesDst")) - w.uint32(34).string(m.sharesDst); - return w; - }; - - /** - * Decodes a RedelegationEntry message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.RedelegationEntry - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.RedelegationEntry} RedelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RedelegationEntry.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.staking.v1.RedelegationEntry(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.creationHeight = r.int64(); - break; - case 2: - m.completionTime = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - case 3: - m.initialBalance = r.string(); - break; - case 4: - m.sharesDst = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return RedelegationEntry; - })(); - - v1.Redelegation = (function() { - - /** - * Properties of a Redelegation. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IRedelegation - * @property {Uint8Array|null} [delegatorAddress] Redelegation delegatorAddress - * @property {Uint8Array|null} [validatorSrcAddress] Redelegation validatorSrcAddress - * @property {Uint8Array|null} [validatorDstAddress] Redelegation validatorDstAddress - * @property {Array.|null} [entries] Redelegation entries - */ - - /** - * Constructs a new Redelegation. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a Redelegation. - * @implements IRedelegation - * @constructor - * @param {cosmos_sdk.x.staking.v1.IRedelegation=} [p] Properties to set - */ - function Redelegation(p) { - this.entries = []; - 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]]; - } - - /** - * Redelegation delegatorAddress. - * @member {Uint8Array} delegatorAddress - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @instance - */ - Redelegation.prototype.delegatorAddress = $util.newBuffer([]); - - /** - * Redelegation validatorSrcAddress. - * @member {Uint8Array} validatorSrcAddress - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @instance - */ - Redelegation.prototype.validatorSrcAddress = $util.newBuffer([]); - - /** - * Redelegation validatorDstAddress. - * @member {Uint8Array} validatorDstAddress - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @instance - */ - Redelegation.prototype.validatorDstAddress = $util.newBuffer([]); - - /** - * Redelegation entries. - * @member {Array.} entries - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @instance - */ - Redelegation.prototype.entries = $util.emptyArray; - - /** - * Creates a new Redelegation instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @static - * @param {cosmos_sdk.x.staking.v1.IRedelegation=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.Redelegation} Redelegation instance - */ - Redelegation.create = function create(properties) { - return new Redelegation(properties); - }; - - /** - * Encodes the specified Redelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @static - * @param {cosmos_sdk.x.staking.v1.IRedelegation} m Redelegation message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Redelegation.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.delegatorAddress != null && Object.hasOwnProperty.call(m, "delegatorAddress")) - w.uint32(10).bytes(m.delegatorAddress); - if (m.validatorSrcAddress != null && Object.hasOwnProperty.call(m, "validatorSrcAddress")) - w.uint32(18).bytes(m.validatorSrcAddress); - if (m.validatorDstAddress != null && Object.hasOwnProperty.call(m, "validatorDstAddress")) - w.uint32(26).bytes(m.validatorDstAddress); - if (m.entries != null && m.entries.length) { - for (var i = 0; i < m.entries.length; ++i) - $root.cosmos_sdk.x.staking.v1.RedelegationEntry.encode(m.entries[i], w.uint32(34).fork()).ldelim(); - } - return w; - }; - - /** - * Decodes a Redelegation message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.Redelegation - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.Redelegation} Redelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Redelegation.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.staking.v1.Redelegation(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.delegatorAddress = r.bytes(); - break; - case 2: - m.validatorSrcAddress = r.bytes(); - break; - case 3: - m.validatorDstAddress = r.bytes(); - break; - case 4: - if (!(m.entries && m.entries.length)) - m.entries = []; - m.entries.push($root.cosmos_sdk.x.staking.v1.RedelegationEntry.decode(r, r.uint32())); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Redelegation; - })(); - - v1.Params = (function() { - - /** - * Properties of a Params. - * @memberof cosmos_sdk.x.staking.v1 - * @interface IParams - * @property {google.protobuf.IDuration|null} [unbondingTime] Params unbondingTime - * @property {number|null} [maxValidators] Params maxValidators - * @property {number|null} [maxEntries] Params maxEntries - * @property {number|null} [historicalEntries] Params historicalEntries - * @property {string|null} [bondDenom] Params bondDenom - */ - - /** - * Constructs a new Params. - * @memberof cosmos_sdk.x.staking.v1 - * @classdesc Represents a Params. - * @implements IParams - * @constructor - * @param {cosmos_sdk.x.staking.v1.IParams=} [p] Properties to set - */ - function Params(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]]; - } - - /** - * Params unbondingTime. - * @member {google.protobuf.IDuration|null|undefined} unbondingTime - * @memberof cosmos_sdk.x.staking.v1.Params - * @instance - */ - Params.prototype.unbondingTime = null; - - /** - * Params maxValidators. - * @member {number} maxValidators - * @memberof cosmos_sdk.x.staking.v1.Params - * @instance - */ - Params.prototype.maxValidators = 0; - - /** - * Params maxEntries. - * @member {number} maxEntries - * @memberof cosmos_sdk.x.staking.v1.Params - * @instance - */ - Params.prototype.maxEntries = 0; - - /** - * Params historicalEntries. - * @member {number} historicalEntries - * @memberof cosmos_sdk.x.staking.v1.Params - * @instance - */ - Params.prototype.historicalEntries = 0; - - /** - * Params bondDenom. - * @member {string} bondDenom - * @memberof cosmos_sdk.x.staking.v1.Params - * @instance - */ - Params.prototype.bondDenom = ""; - - /** - * Creates a new Params instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.staking.v1.Params - * @static - * @param {cosmos_sdk.x.staking.v1.IParams=} [properties] Properties to set - * @returns {cosmos_sdk.x.staking.v1.Params} Params instance - */ - Params.create = function create(properties) { - return new Params(properties); - }; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.staking.v1.Params - * @static - * @param {cosmos_sdk.x.staking.v1.IParams} m Params message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Params.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.unbondingTime != null && Object.hasOwnProperty.call(m, "unbondingTime")) - $root.google.protobuf.Duration.encode(m.unbondingTime, w.uint32(10).fork()).ldelim(); - if (m.maxValidators != null && Object.hasOwnProperty.call(m, "maxValidators")) - w.uint32(16).uint32(m.maxValidators); - if (m.maxEntries != null && Object.hasOwnProperty.call(m, "maxEntries")) - w.uint32(24).uint32(m.maxEntries); - if (m.historicalEntries != null && Object.hasOwnProperty.call(m, "historicalEntries")) - w.uint32(32).uint32(m.historicalEntries); - if (m.bondDenom != null && Object.hasOwnProperty.call(m, "bondDenom")) - w.uint32(42).string(m.bondDenom); - return w; - }; - - /** - * Decodes a Params message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.staking.v1.Params - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.staking.v1.Params} Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Params.decode = function decode(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.staking.v1.Params(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.unbondingTime = $root.google.protobuf.Duration.decode(r, r.uint32()); - break; - case 2: - m.maxValidators = r.uint32(); - break; - case 3: - m.maxEntries = r.uint32(); - break; - case 4: - m.historicalEntries = r.uint32(); - break; - case 5: - m.bondDenom = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Params; - })(); - - return v1; - })(); - - return staking; - })(); - - x.upgrade = (function() { - - /** - * Namespace upgrade. - * @memberof cosmos_sdk.x - * @namespace - */ - var upgrade = {}; - - upgrade.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.upgrade - * @namespace - */ - var v1 = {}; - - v1.Plan = (function() { - - /** - * Properties of a Plan. - * @memberof cosmos_sdk.x.upgrade.v1 - * @interface IPlan - * @property {string|null} [name] Plan name - * @property {google.protobuf.ITimestamp|null} [time] Plan time - * @property {number|Long|null} [height] Plan height - * @property {string|null} [info] Plan info - */ - - /** - * Constructs a new Plan. - * @memberof cosmos_sdk.x.upgrade.v1 - * @classdesc Represents a Plan. - * @implements IPlan - * @constructor - * @param {cosmos_sdk.x.upgrade.v1.IPlan=} [p] Properties to set - */ - function Plan(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]]; - } - - /** - * Plan name. - * @member {string} name - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @instance - */ - Plan.prototype.name = ""; - - /** - * Plan time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @instance - */ - Plan.prototype.time = null; - - /** - * Plan height. - * @member {number|Long} height - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @instance - */ - Plan.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Plan info. - * @member {string} info - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @instance - */ - Plan.prototype.info = ""; - - /** - * Creates a new Plan instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @static - * @param {cosmos_sdk.x.upgrade.v1.IPlan=} [properties] Properties to set - * @returns {cosmos_sdk.x.upgrade.v1.Plan} Plan instance - */ - Plan.create = function create(properties) { - return new Plan(properties); - }; - - /** - * Encodes the specified Plan message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @static - * @param {cosmos_sdk.x.upgrade.v1.IPlan} m Plan message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Plan.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.name != null && Object.hasOwnProperty.call(m, "name")) - w.uint32(10).string(m.name); - if (m.time != null && Object.hasOwnProperty.call(m, "time")) - $root.google.protobuf.Timestamp.encode(m.time, w.uint32(18).fork()).ldelim(); - if (m.height != null && Object.hasOwnProperty.call(m, "height")) - w.uint32(24).int64(m.height); - if (m.info != null && Object.hasOwnProperty.call(m, "info")) - w.uint32(34).string(m.info); - return w; - }; - - /** - * Decodes a Plan message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.upgrade.v1.Plan - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.upgrade.v1.Plan} Plan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Plan.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.upgrade.v1.Plan(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.name = r.string(); - break; - case 2: - m.time = $root.google.protobuf.Timestamp.decode(r, r.uint32()); - break; - case 3: - m.height = r.int64(); - break; - case 4: - m.info = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return Plan; - })(); - - v1.SoftwareUpgradeProposal = (function() { - - /** - * Properties of a SoftwareUpgradeProposal. - * @memberof cosmos_sdk.x.upgrade.v1 - * @interface ISoftwareUpgradeProposal - * @property {string|null} [title] SoftwareUpgradeProposal title - * @property {string|null} [description] SoftwareUpgradeProposal description - * @property {cosmos_sdk.x.upgrade.v1.IPlan|null} [plan] SoftwareUpgradeProposal plan - */ - - /** - * Constructs a new SoftwareUpgradeProposal. - * @memberof cosmos_sdk.x.upgrade.v1 - * @classdesc Represents a SoftwareUpgradeProposal. - * @implements ISoftwareUpgradeProposal - * @constructor - * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal=} [p] Properties to set - */ - function SoftwareUpgradeProposal(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]]; - } - - /** - * SoftwareUpgradeProposal title. - * @member {string} title - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.title = ""; - - /** - * SoftwareUpgradeProposal description. - * @member {string} description - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.description = ""; - - /** - * SoftwareUpgradeProposal plan. - * @member {cosmos_sdk.x.upgrade.v1.IPlan|null|undefined} plan - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @instance - */ - SoftwareUpgradeProposal.prototype.plan = null; - - /** - * Creates a new SoftwareUpgradeProposal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @static - * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal=} [properties] Properties to set - * @returns {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} SoftwareUpgradeProposal instance - */ - SoftwareUpgradeProposal.create = function create(properties) { - return new SoftwareUpgradeProposal(properties); - }; - - /** - * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @static - * @param {cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal} m SoftwareUpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwareUpgradeProposal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.title != null && Object.hasOwnProperty.call(m, "title")) - w.uint32(10).string(m.title); - if (m.description != null && Object.hasOwnProperty.call(m, "description")) - w.uint32(18).string(m.description); - if (m.plan != null && Object.hasOwnProperty.call(m, "plan")) - $root.cosmos_sdk.x.upgrade.v1.Plan.encode(m.plan, w.uint32(26).fork()).ldelim(); - return w; - }; - - /** - * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal} SoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwareUpgradeProposal.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.upgrade.v1.SoftwareUpgradeProposal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.title = r.string(); - break; - case 2: - m.description = r.string(); - break; - case 3: - m.plan = $root.cosmos_sdk.x.upgrade.v1.Plan.decode(r, r.uint32()); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return SoftwareUpgradeProposal; - })(); - - v1.CancelSoftwareUpgradeProposal = (function() { - - /** - * Properties of a CancelSoftwareUpgradeProposal. - * @memberof cosmos_sdk.x.upgrade.v1 - * @interface ICancelSoftwareUpgradeProposal - * @property {string|null} [title] CancelSoftwareUpgradeProposal title - * @property {string|null} [description] CancelSoftwareUpgradeProposal description - */ - - /** - * Constructs a new CancelSoftwareUpgradeProposal. - * @memberof cosmos_sdk.x.upgrade.v1 - * @classdesc Represents a CancelSoftwareUpgradeProposal. - * @implements ICancelSoftwareUpgradeProposal - * @constructor - * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal=} [p] Properties to set - */ - function CancelSoftwareUpgradeProposal(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]]; - } - - /** - * CancelSoftwareUpgradeProposal title. - * @member {string} title - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @instance - */ - CancelSoftwareUpgradeProposal.prototype.title = ""; - - /** - * CancelSoftwareUpgradeProposal description. - * @member {string} description - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @instance - */ - CancelSoftwareUpgradeProposal.prototype.description = ""; - - /** - * Creates a new CancelSoftwareUpgradeProposal instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal=} [properties] Properties to set - * @returns {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal instance - */ - CancelSoftwareUpgradeProposal.create = function create(properties) { - return new CancelSoftwareUpgradeProposal(properties); - }; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @static - * @param {cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal} m CancelSoftwareUpgradeProposal message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CancelSoftwareUpgradeProposal.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.title != null && Object.hasOwnProperty.call(m, "title")) - w.uint32(10).string(m.title); - if (m.description != null && Object.hasOwnProperty.call(m, "description")) - w.uint32(18).string(m.description); - return w; - }; - - /** - * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal} CancelSoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CancelSoftwareUpgradeProposal.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.upgrade.v1.CancelSoftwareUpgradeProposal(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.title = r.string(); - break; - case 2: - m.description = r.string(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return CancelSoftwareUpgradeProposal; - })(); - - return v1; - })(); - - return upgrade; - })(); - - return x; - })(); - - cosmos_sdk.ibc = (function() { - - /** - * Namespace ibc. - * @memberof cosmos_sdk - * @namespace - */ - var ibc = {}; - - ibc.localhost = (function() { - - /** - * Namespace localhost. - * @memberof cosmos_sdk.ibc - * @namespace - */ - var localhost = {}; - - localhost.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.ibc.localhost - * @namespace - */ - var v1 = {}; - - v1.MsgCreateClient = (function() { - - /** - * Properties of a MsgCreateClient. - * @memberof cosmos_sdk.ibc.localhost.v1 - * @interface IMsgCreateClient - * @property {Uint8Array|null} [signer] MsgCreateClient signer - */ - - /** - * Constructs a new MsgCreateClient. - * @memberof cosmos_sdk.ibc.localhost.v1 - * @classdesc Represents a MsgCreateClient. - * @implements IMsgCreateClient - * @constructor - * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient=} [p] Properties to set - */ - function MsgCreateClient(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]]; - } - - /** - * MsgCreateClient signer. - * @member {Uint8Array} signer - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @instance - */ - MsgCreateClient.prototype.signer = $util.newBuffer([]); - - /** - * Creates a new MsgCreateClient instance using the specified properties. - * @function create - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @static - * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient=} [properties] Properties to set - * @returns {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} MsgCreateClient instance - */ - MsgCreateClient.create = function create(properties) { - return new MsgCreateClient(properties); - }; - - /** - * Encodes the specified MsgCreateClient message. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @static - * @param {cosmos_sdk.ibc.localhost.v1.IMsgCreateClient} m MsgCreateClient message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MsgCreateClient.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - if (m.signer != null && Object.hasOwnProperty.call(m, "signer")) - w.uint32(10).bytes(m.signer); - return w; - }; - - /** - * Decodes a MsgCreateClient message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.ibc.localhost.v1.MsgCreateClient - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.ibc.localhost.v1.MsgCreateClient} MsgCreateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgCreateClient.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.ibc.localhost.v1.MsgCreateClient(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - case 1: - m.signer = r.bytes(); - break; - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MsgCreateClient; - })(); - - return v1; - })(); - - return localhost; - })(); - - return ibc; + return crypto; })(); return cosmos_sdk; })(); -$root.cosmos_proto = (function() { - - /** - * Namespace cosmos_proto. - * @exports cosmos_proto - * @namespace - */ - var cosmos_proto = {}; - - return cosmos_proto; -})(); - -$root.gogoproto = (function() { - - /** - * Namespace gogoproto. - * @exports gogoproto - * @namespace - */ - var gogoproto = {}; - - return gogoproto; -})(); - $root.tendermint = (function() { /** @@ -23961,401 +9516,6 @@ $root.google = (function() { return Any; })(); - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [p] Properties to set - */ - function FileOptions(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]]; - } - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} m FileOptions message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.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.FileOptions(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [p] Properties to set - */ - function MessageOptions(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]]; - } - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} m MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.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.MessageOptions(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [p] Properties to set - */ - function FieldOptions(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]]; - } - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} m FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.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.FieldOptions(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return FieldOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [p] Properties to set - */ - function EnumOptions(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]]; - } - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} m EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.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.EnumOptions(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [p] Properties to set - */ - function EnumValueOptions(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]]; - } - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} m EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.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.EnumValueOptions(); - while (r.pos < c) { - var t = r.uint32(); - switch (t >>> 3) { - default: - r.skipType(t & 7); - break; - } - } - return m; - }; - - return EnumValueOptions; - })(); - protobuf.Timestamp = (function() { /** diff --git a/packages/demo-protobuf/types/generated/codecimpl.d.ts b/packages/demo-protobuf/types/generated/codecimpl.d.ts index 15ba3fec..8ae30088 100644 --- a/packages/demo-protobuf/types/generated/codecimpl.d.ts +++ b/packages/demo-protobuf/types/generated/codecimpl.d.ts @@ -1,1013 +1,1245 @@ import * as $protobuf from "protobufjs"; /** Namespace cosmos_sdk. */ export namespace cosmos_sdk { - /** Namespace codec. */ - namespace codec { + /** 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 Dog. */ - interface IDog { - /** Dog size */ - size?: string | null; + /** Properties of a Tx. */ + interface ITx { + /** Tx body */ + body?: cosmos_sdk.tx.v1.ITxBody | null; - /** Dog name */ - name?: string | null; + /** Tx authInfo */ + authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; + + /** Tx signatures */ + signatures?: Uint8Array[] | null; } - /** Represents a Dog. */ - class Dog implements IDog { + /** Represents a Tx. */ + class Tx implements ITx { /** - * Constructs a new Dog. - * @param [properties] Properties to set + * Constructs a new Tx. + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.IDog); + constructor(p?: cosmos_sdk.tx.v1.ITx); - /** Dog size. */ - public size: string; + /** Tx body. */ + public body?: cosmos_sdk.tx.v1.ITxBody | null; - /** Dog name. */ - public name: string; + /** Tx authInfo. */ + public authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; + + /** Tx signatures. */ + public signatures: Uint8Array[]; /** - * Creates a new Dog instance using the specified properties. + * Creates a new Tx instance using the specified properties. * @param [properties] Properties to set - * @returns Dog instance + * @returns Tx instance */ - public static create(properties?: cosmos_sdk.codec.v1.IDog): cosmos_sdk.codec.v1.Dog; + public static create(properties?: cosmos_sdk.tx.v1.ITx): cosmos_sdk.tx.v1.Tx; /** - * Encodes the specified Dog message. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. - * @param message Dog message or plain object to encode - * @param [writer] Writer to encode to + * 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(message: cosmos_sdk.codec.v1.IDog, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.tx.v1.ITx, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Dog message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Dog.verify|verify} messages. - * @param message Dog message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.codec.v1.IDog, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Dog message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Dog + * 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.codec.v1.Dog; - - /** - * Decodes a Dog message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Dog - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.codec.v1.Dog; - - /** - * Verifies a Dog message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Dog message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Dog - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.Dog; - - /** - * Creates a plain object from a Dog message. Also converts values to other types if specified. - * @param message Dog - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.codec.v1.Dog, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Dog to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.Tx; } - /** Properties of a Cat. */ - interface ICat { - /** Cat moniker */ - moniker?: string | null; + /** Properties of a SignDoc. */ + interface ISignDoc { + /** SignDoc body */ + body?: cosmos_sdk.tx.v1.ITxBody | null; - /** Cat lives */ - lives?: number | 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 Cat. */ - class Cat implements ICat { + /** Represents a SignDoc. */ + class SignDoc implements ISignDoc { /** - * Constructs a new Cat. - * @param [properties] Properties to set + * Constructs a new SignDoc. + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.codec.v1.ICat); + constructor(p?: cosmos_sdk.tx.v1.ISignDoc); - /** Cat moniker. */ - public moniker: string; + /** SignDoc body. */ + public body?: cosmos_sdk.tx.v1.ITxBody | null; - /** Cat lives. */ - public lives: number; + /** 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 Cat instance using the specified properties. + * Creates a new SignDoc instance using the specified properties. * @param [properties] Properties to set - * @returns Cat instance + * @returns SignDoc instance */ - public static create(properties?: cosmos_sdk.codec.v1.ICat): cosmos_sdk.codec.v1.Cat; + public static create(properties?: cosmos_sdk.tx.v1.ISignDoc): cosmos_sdk.tx.v1.SignDoc; /** - * Encodes the specified Cat message. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. - * @param message Cat message or plain object to encode - * @param [writer] Writer to encode to + * 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(message: cosmos_sdk.codec.v1.ICat, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(m: cosmos_sdk.tx.v1.ISignDoc, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Cat message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.Cat.verify|verify} messages. - * @param message Cat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.codec.v1.ICat, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Cat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Cat + * 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.codec.v1.Cat; - - /** - * Decodes a Cat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Cat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.codec.v1.Cat; - - /** - * Verifies a Cat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Cat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Cat - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.Cat; - - /** - * Creates a plain object from a Cat message. Also converts values to other types if specified. - * @param message Cat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.codec.v1.Cat, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Cat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.SignDoc; } - /** Properties of a HasAnimal. */ - interface IHasAnimal { - /** HasAnimal animal */ - animal?: google.protobuf.IAny | null; + /** Properties of a TxBody. */ + interface ITxBody { + /** TxBody messages */ + messages?: google.protobuf.IAny[] | null; - /** HasAnimal x */ - x?: number | Long | 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 HasAnimal. */ - class HasAnimal implements IHasAnimal { + /** Represents a TxBody. */ + class TxBody implements ITxBody { /** - * Constructs a new HasAnimal. + * 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 */ - constructor(properties?: cosmos_sdk.codec.v1.IHasAnimal); - - /** HasAnimal animal. */ - public animal?: google.protobuf.IAny | null; - - /** HasAnimal x. */ - public x: number | Long; + public static create(properties?: cosmos_sdk.tx.v1.ITxBody): cosmos_sdk.tx.v1.TxBody; /** - * Creates a new HasAnimal instance using the specified properties. + * 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 HasAnimal instance + * @returns AuthInfo instance */ - public static create(properties?: cosmos_sdk.codec.v1.IHasAnimal): cosmos_sdk.codec.v1.HasAnimal; + public static create(properties?: cosmos_sdk.tx.v1.IAuthInfo): cosmos_sdk.tx.v1.AuthInfo; /** - * Encodes the specified HasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. - * @param message HasAnimal message or plain object to encode - * @param [writer] Writer to encode to + * 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( - message: cosmos_sdk.codec.v1.IHasAnimal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; + public static encode(m: cosmos_sdk.tx.v1.IAuthInfo, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasAnimal.verify|verify} messages. - * @param message HasAnimal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.codec.v1.IHasAnimal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a HasAnimal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HasAnimal + * 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.codec.v1.HasAnimal; - - /** - * Decodes a HasAnimal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.codec.v1.HasAnimal; - - /** - * Verifies a HasAnimal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a HasAnimal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HasAnimal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasAnimal; - - /** - * Creates a plain object from a HasAnimal message. Also converts values to other types if specified. - * @param message HasAnimal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.codec.v1.HasAnimal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this HasAnimal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.AuthInfo; } - /** Properties of a HasHasAnimal. */ - interface IHasHasAnimal { - /** HasHasAnimal hasAnimal */ - hasAnimal?: google.protobuf.IAny | null; + /** Properties of a SignerInfo. */ + interface ISignerInfo { + /** SignerInfo publicKey */ + publicKey?: google.protobuf.IAny | null; + + /** SignerInfo modeInfo */ + modeInfo?: cosmos_sdk.tx.v1.IModeInfo | null; } - /** Represents a HasHasAnimal. */ - class HasHasAnimal implements IHasHasAnimal { + /** Represents a SignerInfo. */ + class SignerInfo implements ISignerInfo { /** - * Constructs a new HasHasAnimal. + * 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 */ - constructor(properties?: cosmos_sdk.codec.v1.IHasHasAnimal); - - /** HasHasAnimal hasAnimal. */ - public hasAnimal?: google.protobuf.IAny | null; + public static create(properties?: cosmos_sdk.tx.v1.ISignerInfo): cosmos_sdk.tx.v1.SignerInfo; /** - * Creates a new HasHasAnimal instance using the specified properties. + * 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 HasHasAnimal instance + * @returns ModeInfo instance */ - public static create( - properties?: cosmos_sdk.codec.v1.IHasHasAnimal, - ): cosmos_sdk.codec.v1.HasHasAnimal; + public static create(properties?: cosmos_sdk.tx.v1.IModeInfo): cosmos_sdk.tx.v1.ModeInfo; /** - * Encodes the specified HasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. - * @param message HasHasAnimal message or plain object to encode - * @param [writer] Writer to encode to + * 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( - message: cosmos_sdk.codec.v1.IHasHasAnimal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; + public static encode(m: cosmos_sdk.tx.v1.IModeInfo, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasAnimal.verify|verify} messages. - * @param message HasHasAnimal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.codec.v1.IHasHasAnimal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a HasHasAnimal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HasHasAnimal + * 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.codec.v1.HasHasAnimal; - - /** - * Decodes a HasHasAnimal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HasHasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.codec.v1.HasHasAnimal; - - /** - * Verifies a HasHasAnimal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a HasHasAnimal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HasHasAnimal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasHasAnimal; - - /** - * Creates a plain object from a HasHasAnimal message. Also converts values to other types if specified. - * @param message HasHasAnimal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.codec.v1.HasHasAnimal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this HasHasAnimal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.ModeInfo; } - /** Properties of a HasHasHasAnimal. */ - interface IHasHasHasAnimal { - /** HasHasHasAnimal hasHasAnimal */ - hasHasAnimal?: google.protobuf.IAny | null; + 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; + } } - /** Represents a HasHasHasAnimal. */ - class HasHasHasAnimal implements IHasHasHasAnimal { + /** 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 HasHasHasAnimal. + * 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 */ - constructor(properties?: cosmos_sdk.codec.v1.IHasHasHasAnimal); - - /** HasHasHasAnimal hasHasAnimal. */ - public hasHasAnimal?: google.protobuf.IAny | null; + public static create(properties?: cosmos_sdk.tx.v1.IFee): cosmos_sdk.tx.v1.Fee; /** - * Creates a new HasHasHasAnimal instance using the specified properties. - * @param [properties] Properties to set - * @returns HasHasHasAnimal instance - */ - public static create( - properties?: cosmos_sdk.codec.v1.IHasHasHasAnimal, - ): cosmos_sdk.codec.v1.HasHasHasAnimal; - - /** - * Encodes the specified HasHasHasAnimal message. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. - * @param message HasHasHasAnimal message or plain object to encode - * @param [writer] Writer to encode to + * 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( - message: cosmos_sdk.codec.v1.IHasHasHasAnimal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; + public static encode(m: cosmos_sdk.tx.v1.IFee, w?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified HasHasHasAnimal message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.HasHasHasAnimal.verify|verify} messages. - * @param message HasHasHasAnimal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.codec.v1.IHasHasHasAnimal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a HasHasHasAnimal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HasHasHasAnimal + * 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.codec.v1.HasHasHasAnimal; - - /** - * Decodes a HasHasHasAnimal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HasHasHasAnimal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.codec.v1.HasHasHasAnimal; - - /** - * Verifies a HasHasHasAnimal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a HasHasHasAnimal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HasHasHasAnimal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.HasHasHasAnimal; - - /** - * Creates a plain object from a HasHasHasAnimal message. Also converts values to other types if specified. - * @param message HasHasHasAnimal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.codec.v1.HasHasHasAnimal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this HasHasHasAnimal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.tx.v1.Fee; } + } - /** Represents a TestService */ - class TestService extends $protobuf.rpc.Service { - /** - * Constructs a new TestService 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 TestService 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, - ): TestService; - - /** - * Calls Echo. - * @param request EchoRequest message or plain object - * @param callback Node-style callback called with the error, if any, and EchoResponse - */ - public echo( - request: cosmos_sdk.codec.v1.IEchoRequest, - callback: cosmos_sdk.codec.v1.TestService.EchoCallback, - ): void; - - /** - * Calls Echo. - * @param request EchoRequest message or plain object - * @returns Promise - */ - public echo(request: cosmos_sdk.codec.v1.IEchoRequest): Promise; - - /** - * Calls SayHello. - * @param request SayHelloRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SayHelloResponse - */ - public sayHello( - request: cosmos_sdk.codec.v1.ISayHelloRequest, - callback: cosmos_sdk.codec.v1.TestService.SayHelloCallback, - ): void; - - /** - * Calls SayHello. - * @param request SayHelloRequest message or plain object - * @returns Promise - */ - public sayHello( - request: cosmos_sdk.codec.v1.ISayHelloRequest, - ): Promise; - } - - namespace TestService { - /** - * Callback as used by {@link cosmos_sdk.codec.v1.TestService#echo}. - * @param error Error, if any - * @param [response] EchoResponse - */ - type EchoCallback = (error: Error | null, response?: cosmos_sdk.codec.v1.EchoResponse) => void; - - /** - * Callback as used by {@link cosmos_sdk.codec.v1.TestService#sayHello}. - * @param error Error, if any - * @param [response] SayHelloResponse - */ - type SayHelloCallback = ( - error: Error | null, - response?: cosmos_sdk.codec.v1.SayHelloResponse, - ) => void; - } - - /** Properties of an EchoRequest. */ - interface IEchoRequest { - /** EchoRequest message */ - message?: string | null; - } - - /** Represents an EchoRequest. */ - class EchoRequest implements IEchoRequest { - /** - * Constructs a new EchoRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.codec.v1.IEchoRequest); - - /** EchoRequest message. */ - public message: string; - - /** - * Creates a new EchoRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns EchoRequest instance - */ - public static create(properties?: cosmos_sdk.codec.v1.IEchoRequest): cosmos_sdk.codec.v1.EchoRequest; - - /** - * Encodes the specified EchoRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. - * @param message EchoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.codec.v1.IEchoRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified EchoRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoRequest.verify|verify} messages. - * @param message EchoRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.codec.v1.IEchoRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an EchoRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EchoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.codec.v1.EchoRequest; - - /** - * Decodes an EchoRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EchoRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.codec.v1.EchoRequest; - - /** - * Verifies an EchoRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an EchoRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EchoRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.EchoRequest; - - /** - * Creates a plain object from an EchoRequest message. Also converts values to other types if specified. - * @param message EchoRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.codec.v1.EchoRequest, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this EchoRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EchoResponse. */ - interface IEchoResponse { - /** EchoResponse message */ - message?: string | null; - } - - /** Represents an EchoResponse. */ - class EchoResponse implements IEchoResponse { - /** - * Constructs a new EchoResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.codec.v1.IEchoResponse); - - /** EchoResponse message. */ - public message: string; - - /** - * Creates a new EchoResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns EchoResponse instance - */ - public static create( - properties?: cosmos_sdk.codec.v1.IEchoResponse, - ): cosmos_sdk.codec.v1.EchoResponse; - - /** - * Encodes the specified EchoResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. - * @param message EchoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.codec.v1.IEchoResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified EchoResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.EchoResponse.verify|verify} messages. - * @param message EchoResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.codec.v1.IEchoResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an EchoResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EchoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.codec.v1.EchoResponse; - - /** - * Decodes an EchoResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EchoResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.codec.v1.EchoResponse; - - /** - * Verifies an EchoResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an EchoResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EchoResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.EchoResponse; - - /** - * Creates a plain object from an EchoResponse message. Also converts values to other types if specified. - * @param message EchoResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.codec.v1.EchoResponse, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this EchoResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SayHelloRequest. */ - interface ISayHelloRequest { - /** SayHelloRequest name */ - name?: string | null; - } - - /** Represents a SayHelloRequest. */ - class SayHelloRequest implements ISayHelloRequest { - /** - * Constructs a new SayHelloRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.codec.v1.ISayHelloRequest); - - /** SayHelloRequest name. */ - public name: string; - - /** - * Creates a new SayHelloRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SayHelloRequest instance - */ - public static create( - properties?: cosmos_sdk.codec.v1.ISayHelloRequest, - ): cosmos_sdk.codec.v1.SayHelloRequest; - - /** - * Encodes the specified SayHelloRequest message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. - * @param message SayHelloRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.codec.v1.ISayHelloRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SayHelloRequest message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloRequest.verify|verify} messages. - * @param message SayHelloRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.codec.v1.ISayHelloRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SayHelloRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SayHelloRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.codec.v1.SayHelloRequest; - - /** - * Decodes a SayHelloRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SayHelloRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.codec.v1.SayHelloRequest; - - /** - * Verifies a SayHelloRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a SayHelloRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SayHelloRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.SayHelloRequest; - - /** - * Creates a plain object from a SayHelloRequest message. Also converts values to other types if specified. - * @param message SayHelloRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.codec.v1.SayHelloRequest, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SayHelloRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SayHelloResponse. */ - interface ISayHelloResponse { - /** SayHelloResponse greeting */ - greeting?: string | null; - } - - /** Represents a SayHelloResponse. */ - class SayHelloResponse implements ISayHelloResponse { - /** - * Constructs a new SayHelloResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.codec.v1.ISayHelloResponse); - - /** SayHelloResponse greeting. */ - public greeting: string; - - /** - * Creates a new SayHelloResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SayHelloResponse instance - */ - public static create( - properties?: cosmos_sdk.codec.v1.ISayHelloResponse, - ): cosmos_sdk.codec.v1.SayHelloResponse; - - /** - * Encodes the specified SayHelloResponse message. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. - * @param message SayHelloResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.codec.v1.ISayHelloResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SayHelloResponse message, length delimited. Does not implicitly {@link cosmos_sdk.codec.v1.SayHelloResponse.verify|verify} messages. - * @param message SayHelloResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.codec.v1.ISayHelloResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SayHelloResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SayHelloResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.codec.v1.SayHelloResponse; - - /** - * Decodes a SayHelloResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SayHelloResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.codec.v1.SayHelloResponse; - - /** - * Verifies a SayHelloResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a SayHelloResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SayHelloResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.codec.v1.SayHelloResponse; - - /** - * Creates a plain object from a SayHelloResponse message. Also converts values to other types if specified. - * @param message SayHelloResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.codec.v1.SayHelloResponse, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SayHelloResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** 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, + } } } } @@ -1041,9 +1273,9 @@ export namespace cosmos_sdk { class PublicKey implements IPublicKey { /** * Constructs a new PublicKey. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.crypto.v1.IPublicKey); + constructor(p?: cosmos_sdk.crypto.v1.IPublicKey); /** PublicKey secp256k1. */ public secp256k1: Uint8Array; @@ -1075,78 +1307,21 @@ export namespace cosmos_sdk { /** * Encodes the specified PublicKey message. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. - * @param message PublicKey message or plain object to encode - * @param [writer] Writer to encode to + * @param m PublicKey message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: cosmos_sdk.crypto.v1.IPublicKey, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified PublicKey message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. - * @param message PublicKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.crypto.v1.IPublicKey, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.crypto.v1.PublicKey; - - /** - * Decodes a PublicKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.crypto.v1.PublicKey; - - /** - * Verifies a PublicKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a PublicKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublicKey - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.PublicKey; - - /** - * Creates a plain object from a PublicKey message. Also converts values to other types if specified. - * @param message PublicKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.crypto.v1.PublicKey, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this PublicKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): cosmos_sdk.crypto.v1.PublicKey; } /** Properties of a PubKeyMultisigThreshold. */ @@ -1154,23 +1329,23 @@ export namespace cosmos_sdk { /** PubKeyMultisigThreshold threshold */ threshold?: number | null; - /** PubKeyMultisigThreshold pubkeys */ - pubkeys?: cosmos_sdk.crypto.v1.IPublicKey[] | null; + /** PubKeyMultisigThreshold publicKeys */ + publicKeys?: cosmos_sdk.crypto.v1.IPublicKey[] | null; } /** Represents a PubKeyMultisigThreshold. */ class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { /** * Constructs a new PubKeyMultisigThreshold. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + constructor(p?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); /** PubKeyMultisigThreshold threshold. */ public threshold: number; - /** PubKeyMultisigThreshold pubkeys. */ - public pubkeys: cosmos_sdk.crypto.v1.IPublicKey[]; + /** PubKeyMultisigThreshold publicKeys. */ + public publicKeys: cosmos_sdk.crypto.v1.IPublicKey[]; /** * Creates a new PubKeyMultisigThreshold instance using the specified properties. @@ -1183,98 +1358,45 @@ export namespace cosmos_sdk { /** * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. - * @param message PubKeyMultisigThreshold message or plain object to encode - * @param [writer] Writer to encode to + * @param m PubKeyMultisigThreshold message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified PubKeyMultisigThreshold message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. - * @param message PubKeyMultisigThreshold message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, - writer?: $protobuf.Writer, + m: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; - - /** - * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; - - /** - * Verifies a PubKeyMultisigThreshold message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a PubKeyMultisigThreshold message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubKeyMultisigThreshold - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.PubKeyMultisigThreshold; - - /** - * Creates a plain object from a PubKeyMultisigThreshold message. Also converts values to other types if specified. - * @param message PubKeyMultisigThreshold - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.crypto.v1.PubKeyMultisigThreshold, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this PubKeyMultisigThreshold to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a MultiSignature. */ interface IMultiSignature { - /** MultiSignature sigs */ - sigs?: Uint8Array[] | null; + /** MultiSignature signatures */ + signatures?: Uint8Array[] | null; } /** Represents a MultiSignature. */ class MultiSignature implements IMultiSignature { /** * Constructs a new MultiSignature. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.crypto.v1.IMultiSignature); + constructor(p?: cosmos_sdk.crypto.v1.IMultiSignature); - /** MultiSignature sigs. */ - public sigs: Uint8Array[]; + /** MultiSignature signatures. */ + public signatures: Uint8Array[]; /** * Creates a new MultiSignature instance using the specified properties. @@ -1287,80 +1409,24 @@ export namespace cosmos_sdk { /** * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. - * @param message MultiSignature message or plain object to encode - * @param [writer] Writer to encode to + * @param m MultiSignature message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: cosmos_sdk.crypto.v1.IMultiSignature, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MultiSignature message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. - * @param message MultiSignature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.crypto.v1.IMultiSignature, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): cosmos_sdk.crypto.v1.MultiSignature; - - /** - * Decodes a MultiSignature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.crypto.v1.MultiSignature; - - /** - * Verifies a MultiSignature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MultiSignature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MultiSignature - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.MultiSignature; - - /** - * Creates a plain object from a MultiSignature message. Also converts values to other types if specified. - * @param message MultiSignature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.crypto.v1.MultiSignature, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MultiSignature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a CompactBitArray. */ @@ -1376,9 +1442,9 @@ export namespace cosmos_sdk { class CompactBitArray implements ICompactBitArray { /** * Constructs a new CompactBitArray. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: cosmos_sdk.crypto.v1.ICompactBitArray); + constructor(p?: cosmos_sdk.crypto.v1.ICompactBitArray); /** CompactBitArray extraBitsStored. */ public extraBitsStored: number; @@ -1397,14876 +1463,27 @@ export namespace cosmos_sdk { /** * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. - * @param message CompactBitArray message or plain object to encode - * @param [writer] Writer to encode to + * @param m CompactBitArray message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: cosmos_sdk.crypto.v1.ICompactBitArray, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified CompactBitArray message, length delimited. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. - * @param message CompactBitArray message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.crypto.v1.ICompactBitArray, - writer?: $protobuf.Writer, + m: cosmos_sdk.crypto.v1.ICompactBitArray, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a CompactBitArray message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): cosmos_sdk.crypto.v1.CompactBitArray; - - /** - * Decodes a CompactBitArray message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.crypto.v1.CompactBitArray; - - /** - * Verifies a CompactBitArray message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a CompactBitArray message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CompactBitArray - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.crypto.v1.CompactBitArray; - - /** - * Creates a plain object from a CompactBitArray message. Also converts values to other types if specified. - * @param message CompactBitArray - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.crypto.v1.CompactBitArray, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this CompactBitArray to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message Tx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.tx.v1.ITx, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Tx message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. - * @param message Tx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.tx.v1.ITx, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Tx message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.tx.v1.Tx; - - /** - * Decodes a Tx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.Tx; - - /** - * Verifies a Tx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Tx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Tx - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.Tx; - - /** - * Creates a plain object from a Tx message. Also converts values to other types if specified. - * @param message Tx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.tx.v1.Tx, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Tx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message SignDoc message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.tx.v1.ISignDoc, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SignDoc message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. - * @param message SignDoc message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.tx.v1.ISignDoc, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SignDoc message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.tx.v1.SignDoc; - - /** - * Decodes a SignDoc message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.SignDoc; - - /** - * Verifies a SignDoc message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a SignDoc message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignDoc - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.SignDoc; - - /** - * Creates a plain object from a SignDoc message. Also converts values to other types if specified. - * @param message SignDoc - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.tx.v1.SignDoc, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SignDoc to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message TxBody message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.tx.v1.ITxBody, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TxBody message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. - * @param message TxBody message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.tx.v1.ITxBody, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a TxBody message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.tx.v1.TxBody; - - /** - * Decodes a TxBody message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.TxBody; - - /** - * Verifies a TxBody message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a TxBody message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TxBody - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.TxBody; - - /** - * Creates a plain object from a TxBody message. Also converts values to other types if specified. - * @param message TxBody - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.tx.v1.TxBody, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this TxBody to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message AuthInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.tx.v1.IAuthInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified AuthInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. - * @param message AuthInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.tx.v1.IAuthInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an AuthInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.tx.v1.AuthInfo; - - /** - * Decodes an AuthInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.AuthInfo; - - /** - * Verifies an AuthInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an AuthInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AuthInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.AuthInfo; - - /** - * Creates a plain object from an AuthInfo message. Also converts values to other types if specified. - * @param message AuthInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.tx.v1.AuthInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this AuthInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message SignerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.tx.v1.ISignerInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SignerInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. - * @param message SignerInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.tx.v1.ISignerInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SignerInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.tx.v1.SignerInfo; - - /** - * Decodes a SignerInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.SignerInfo; - - /** - * Verifies a SignerInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a SignerInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SignerInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.SignerInfo; - - /** - * Creates a plain object from a SignerInfo message. Also converts values to other types if specified. - * @param message SignerInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.tx.v1.SignerInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SignerInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message ModeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.tx.v1.IModeInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ModeInfo message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. - * @param message ModeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.tx.v1.IModeInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ModeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.tx.v1.ModeInfo; - - /** - * Decodes a ModeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.ModeInfo; - - /** - * Verifies a ModeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ModeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModeInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo; - - /** - * Creates a plain object from a ModeInfo message. Also converts values to other types if specified. - * @param message ModeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.tx.v1.ModeInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ModeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace ModeInfo { - /** Properties of a Single. */ - interface ISingle { - /** Single mode */ - mode?: cosmos_sdk.tx.v1.SignMode | null; - } - - /** Represents a Single. */ - class Single implements ISingle { - /** - * Constructs a new Single. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.tx.v1.ModeInfo.ISingle); - - /** Single mode. */ - public mode: cosmos_sdk.tx.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 message Single message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.tx.v1.ModeInfo.ISingle, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Single message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. - * @param message Single message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.tx.v1.ModeInfo.ISingle, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Single message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.tx.v1.ModeInfo.Single; - - /** - * Decodes a Single message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.tx.v1.ModeInfo.Single; - - /** - * Verifies a Single message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Single message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Single - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo.Single; - - /** - * Creates a plain object from a Single message. Also converts values to other types if specified. - * @param message Single - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.tx.v1.ModeInfo.Single, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Single to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message Multi message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.tx.v1.ModeInfo.IMulti, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Multi message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. - * @param message Multi message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.tx.v1.ModeInfo.IMulti, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Multi message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.tx.v1.ModeInfo.Multi; - - /** - * Decodes a Multi message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.tx.v1.ModeInfo.Multi; - - /** - * Verifies a Multi message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Multi message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Multi - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.ModeInfo.Multi; - - /** - * Creates a plain object from a Multi message. Also converts values to other types if specified. - * @param message Multi - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.tx.v1.ModeInfo.Multi, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Multi to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** SignMode enum. */ - enum SignMode { - SIGN_MODE_UNSPECIFIED = 0, - SIGN_MODE_DIRECT = 1, - SIGN_MODE_TEXTUAL = 2, - SIGN_MODE_LEGACY_AMINO_JSON = 127, - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message Fee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.tx.v1.IFee, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Fee message, length delimited. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. - * @param message Fee message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.tx.v1.IFee, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Fee message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.tx.v1.Fee; - - /** - * Decodes a Fee message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.tx.v1.Fee; - - /** - * Verifies a Fee message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Fee message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Fee - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.tx.v1.Fee; - - /** - * Creates a plain object from a Fee message. Also converts values to other types if specified. - * @param message Fee - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.tx.v1.Fee, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Fee to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message Coin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.v1.ICoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Coin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. - * @param message Coin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.ICoin, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Coin message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.Coin; - - /** - * Decodes a Coin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.Coin; - - /** - * Verifies a Coin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Coin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Coin - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.Coin; - - /** - * Creates a plain object from a Coin message. Also converts values to other types if specified. - * @param message Coin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.Coin, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Coin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message DecCoin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.v1.IDecCoin, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecCoin message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. - * @param message DecCoin message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.IDecCoin, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DecCoin message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.DecCoin; - - /** - * Decodes a DecCoin message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.DecCoin; - - /** - * Verifies a DecCoin message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a DecCoin message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DecCoin - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.DecCoin; - - /** - * Creates a plain object from a DecCoin message. Also converts values to other types if specified. - * @param message DecCoin - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.DecCoin, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DecCoin to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an IntProto. */ - interface IIntProto { - /** IntProto int */ - int?: string | null; - } - - /** Represents an IntProto. */ - class IntProto implements IIntProto { - /** - * Constructs a new IntProto. - * @param [properties] Properties to set - */ - constructor(properties?: 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 message IntProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.v1.IIntProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IntProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. - * @param message IntProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.IIntProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an IntProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.IntProto; - - /** - * Decodes an IntProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.IntProto; - - /** - * Verifies an IntProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an IntProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IntProto - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.IntProto; - - /** - * Creates a plain object from an IntProto message. Also converts values to other types if specified. - * @param message IntProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.IntProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this IntProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DecProto. */ - interface IDecProto { - /** DecProto dec */ - dec?: string | null; - } - - /** Represents a DecProto. */ - class DecProto implements IDecProto { - /** - * Constructs a new DecProto. - * @param [properties] Properties to set - */ - constructor(properties?: 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 message DecProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.v1.IDecProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DecProto message, length delimited. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. - * @param message DecProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.IDecProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DecProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.DecProto; - - /** - * Decodes a DecProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.DecProto; - - /** - * Verifies a DecProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a DecProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DecProto - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.DecProto; - - /** - * Creates a plain object from a DecProto message. Also converts values to other types if specified. - * @param message DecProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.DecProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DecProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValAddresses. */ - interface IValAddresses { - /** ValAddresses addresses */ - addresses?: Uint8Array[] | null; - } - - /** Represents a ValAddresses. */ - class ValAddresses implements IValAddresses { - /** - * Constructs a new ValAddresses. - * @param [properties] Properties to set - */ - constructor(properties?: 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 message ValAddresses message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.v1.IValAddresses, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValAddresses message, length delimited. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. - * @param message ValAddresses message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.IValAddresses, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ValAddresses message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.v1.ValAddresses; - - /** - * Decodes a ValAddresses message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.ValAddresses; - - /** - * Verifies a ValAddresses message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValAddresses message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValAddresses - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.ValAddresses; - - /** - * Creates a plain object from a ValAddresses message. Also converts values to other types if specified. - * @param message ValAddresses - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.ValAddresses, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValAddresses to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message GasInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.v1.IGasInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GasInfo message, length delimited. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. - * @param message GasInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.IGasInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GasInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.GasInfo; - - /** - * Decodes a GasInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.GasInfo; - - /** - * Verifies a GasInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a GasInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GasInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.GasInfo; - - /** - * Creates a plain object from a GasInfo message. Also converts values to other types if specified. - * @param message GasInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.GasInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GasInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message Result message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.v1.IResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Result message, length delimited. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. - * @param message Result message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.IResult, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Result message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.Result; - - /** - * Decodes a Result message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.Result; - - /** - * Verifies a Result message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Result message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Result - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.Result; - - /** - * Creates a plain object from a Result message. Also converts values to other types if specified. - * @param message Result - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.Result, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Result to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message SimulationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.v1.ISimulationResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SimulationResponse message, length delimited. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. - * @param message SimulationResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.ISimulationResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.v1.SimulationResponse; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.SimulationResponse; - - /** - * Verifies a SimulationResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a SimulationResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SimulationResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.SimulationResponse; - - /** - * Creates a plain object from a SimulationResponse message. Also converts values to other types if specified. - * @param message SimulationResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.SimulationResponse, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SimulationResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message MsgData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.v1.IMsgData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MsgData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. - * @param message MsgData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.IMsgData, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.MsgData; - - /** - * Decodes a MsgData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.MsgData; - - /** - * Verifies a MsgData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgData - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.MsgData; - - /** - * Creates a plain object from a MsgData message. Also converts values to other types if specified. - * @param message MsgData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.MsgData, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message TxData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: cosmos_sdk.v1.ITxData, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TxData message, length delimited. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. - * @param message TxData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.v1.ITxData, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a TxData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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(reader: $protobuf.Reader | Uint8Array, length?: number): cosmos_sdk.v1.TxData; - - /** - * Decodes a TxData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.v1.TxData; - - /** - * Verifies a TxData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a TxData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TxData - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.v1.TxData; - - /** - * Creates a plain object from a TxData message. Also converts values to other types if specified. - * @param message TxData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.v1.TxData, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this TxData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace x. */ - namespace x { - /** Namespace auth. */ - namespace auth { - /** Namespace v1. */ - namespace v1 { - /** Properties of a BaseAccount. */ - interface IBaseAccount { - /** BaseAccount address */ - address?: Uint8Array | null; - - /** BaseAccount pubKey */ - pubKey?: Uint8Array | null; - - /** BaseAccount accountNumber */ - accountNumber?: number | Long | null; - - /** BaseAccount sequence */ - sequence?: number | Long | null; - } - - /** Represents a BaseAccount. */ - class BaseAccount implements IBaseAccount { - /** - * Constructs a new BaseAccount. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.auth.v1.IBaseAccount); - - /** BaseAccount address. */ - public address: Uint8Array; - - /** BaseAccount pubKey. */ - public pubKey: Uint8Array; - - /** BaseAccount accountNumber. */ - public accountNumber: number | Long; - - /** BaseAccount sequence. */ - public sequence: number | Long; - - /** - * Creates a new BaseAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns BaseAccount instance - */ - public static create( - properties?: cosmos_sdk.x.auth.v1.IBaseAccount, - ): cosmos_sdk.x.auth.v1.BaseAccount; - - /** - * Encodes the specified BaseAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. - * @param message BaseAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.auth.v1.IBaseAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified BaseAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.BaseAccount.verify|verify} messages. - * @param message BaseAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.auth.v1.IBaseAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a BaseAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.auth.v1.BaseAccount; - - /** - * Decodes a BaseAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BaseAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.auth.v1.BaseAccount; - - /** - * Verifies a BaseAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a BaseAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BaseAccount - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.BaseAccount; - - /** - * Creates a plain object from a BaseAccount message. Also converts values to other types if specified. - * @param message BaseAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.auth.v1.BaseAccount, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this BaseAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ModuleAccount. */ - interface IModuleAccount { - /** ModuleAccount baseAccount */ - baseAccount?: cosmos_sdk.x.auth.v1.IBaseAccount | null; - - /** ModuleAccount name */ - name?: string | null; - - /** ModuleAccount permissions */ - permissions?: string[] | null; - } - - /** Represents a ModuleAccount. */ - class ModuleAccount implements IModuleAccount { - /** - * Constructs a new ModuleAccount. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.auth.v1.IModuleAccount); - - /** ModuleAccount baseAccount. */ - public baseAccount?: cosmos_sdk.x.auth.v1.IBaseAccount | null; - - /** ModuleAccount name. */ - public name: string; - - /** ModuleAccount permissions. */ - public permissions: string[]; - - /** - * Creates a new ModuleAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns ModuleAccount instance - */ - public static create( - properties?: cosmos_sdk.x.auth.v1.IModuleAccount, - ): cosmos_sdk.x.auth.v1.ModuleAccount; - - /** - * Encodes the specified ModuleAccount message. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. - * @param message ModuleAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.auth.v1.IModuleAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ModuleAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.ModuleAccount.verify|verify} messages. - * @param message ModuleAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.auth.v1.IModuleAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.auth.v1.ModuleAccount; - - /** - * Decodes a ModuleAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModuleAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.auth.v1.ModuleAccount; - - /** - * Verifies a ModuleAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ModuleAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModuleAccount - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.ModuleAccount; - - /** - * Creates a plain object from a ModuleAccount message. Also converts values to other types if specified. - * @param message ModuleAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.auth.v1.ModuleAccount, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ModuleAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - /** Params maxMemoCharacters */ - maxMemoCharacters?: number | Long | null; - - /** Params txSigLimit */ - txSigLimit?: number | Long | null; - - /** Params txSizeCostPerByte */ - txSizeCostPerByte?: number | Long | null; - - /** Params sigVerifyCostEd25519 */ - sigVerifyCostEd25519?: number | Long | null; - - /** Params sigVerifyCostSecp256k1 */ - sigVerifyCostSecp256k1?: number | Long | null; - } - - /** Represents a Params. */ - class Params implements IParams { - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.auth.v1.IParams); - - /** Params maxMemoCharacters. */ - public maxMemoCharacters: number | Long; - - /** Params txSigLimit. */ - public txSigLimit: number | Long; - - /** Params txSizeCostPerByte. */ - public txSizeCostPerByte: number | Long; - - /** Params sigVerifyCostEd25519. */ - public sigVerifyCostEd25519: number | Long; - - /** Params sigVerifyCostSecp256k1. */ - public sigVerifyCostSecp256k1: number | Long; - - /** - * Creates a new Params instance using the specified properties. - * @param [properties] Properties to set - * @returns Params instance - */ - public static create(properties?: cosmos_sdk.x.auth.v1.IParams): cosmos_sdk.x.auth.v1.Params; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.auth.v1.IParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.auth.v1.IParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Params message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.auth.v1.Params; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.auth.v1.Params; - - /** - * Verifies a Params message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Params - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.v1.Params; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @param message Params - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.auth.v1.Params, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace vesting. */ - namespace vesting { - /** Namespace v1. */ - namespace v1 { - /** Properties of a BaseVestingAccount. */ - interface IBaseVestingAccount { - /** BaseVestingAccount baseAccount */ - baseAccount?: cosmos_sdk.x.auth.v1.IBaseAccount | null; - - /** BaseVestingAccount originalVesting */ - originalVesting?: cosmos_sdk.v1.ICoin[] | null; - - /** BaseVestingAccount delegatedFree */ - delegatedFree?: cosmos_sdk.v1.ICoin[] | null; - - /** BaseVestingAccount delegatedVesting */ - delegatedVesting?: cosmos_sdk.v1.ICoin[] | null; - - /** BaseVestingAccount endTime */ - endTime?: number | Long | null; - } - - /** Represents a BaseVestingAccount. */ - class BaseVestingAccount implements IBaseVestingAccount { - /** - * Constructs a new BaseVestingAccount. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount); - - /** BaseVestingAccount baseAccount. */ - public baseAccount?: cosmos_sdk.x.auth.v1.IBaseAccount | null; - - /** BaseVestingAccount originalVesting. */ - public originalVesting: cosmos_sdk.v1.ICoin[]; - - /** BaseVestingAccount delegatedFree. */ - public delegatedFree: cosmos_sdk.v1.ICoin[]; - - /** BaseVestingAccount delegatedVesting. */ - public delegatedVesting: cosmos_sdk.v1.ICoin[]; - - /** BaseVestingAccount endTime. */ - public endTime: number | Long; - - /** - * Creates a new BaseVestingAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns BaseVestingAccount instance - */ - public static create( - properties?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, - ): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; - - /** - * Encodes the specified BaseVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. - * @param message BaseVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified BaseVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount.verify|verify} messages. - * @param message BaseVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a BaseVestingAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BaseVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; - - /** - * Decodes a BaseVestingAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BaseVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; - - /** - * Verifies a BaseVestingAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a BaseVestingAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BaseVestingAccount - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount; - - /** - * Creates a plain object from a BaseVestingAccount message. Also converts values to other types if specified. - * @param message BaseVestingAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.auth.vesting.v1.BaseVestingAccount, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this BaseVestingAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ContinuousVestingAccount. */ - interface IContinuousVestingAccount { - /** ContinuousVestingAccount baseVestingAccount */ - baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; - - /** ContinuousVestingAccount startTime */ - startTime?: number | Long | null; - } - - /** Represents a ContinuousVestingAccount. */ - class ContinuousVestingAccount implements IContinuousVestingAccount { - /** - * Constructs a new ContinuousVestingAccount. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount); - - /** ContinuousVestingAccount baseVestingAccount. */ - public baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; - - /** ContinuousVestingAccount startTime. */ - public startTime: number | Long; - - /** - * Creates a new ContinuousVestingAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns ContinuousVestingAccount instance - */ - public static create( - properties?: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, - ): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; - - /** - * Encodes the specified ContinuousVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. - * @param message ContinuousVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ContinuousVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount.verify|verify} messages. - * @param message ContinuousVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.auth.vesting.v1.IContinuousVestingAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ContinuousVestingAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ContinuousVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; - - /** - * Decodes a ContinuousVestingAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ContinuousVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; - - /** - * Verifies a ContinuousVestingAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ContinuousVestingAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ContinuousVestingAccount - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount; - - /** - * Creates a plain object from a ContinuousVestingAccount message. Also converts values to other types if specified. - * @param message ContinuousVestingAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.auth.vesting.v1.ContinuousVestingAccount, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ContinuousVestingAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DelayedVestingAccount. */ - interface IDelayedVestingAccount { - /** DelayedVestingAccount baseVestingAccount */ - baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; - } - - /** Represents a DelayedVestingAccount. */ - class DelayedVestingAccount implements IDelayedVestingAccount { - /** - * Constructs a new DelayedVestingAccount. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount); - - /** DelayedVestingAccount baseVestingAccount. */ - public baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; - - /** - * Creates a new DelayedVestingAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns DelayedVestingAccount instance - */ - public static create( - properties?: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, - ): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; - - /** - * Encodes the specified DelayedVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. - * @param message DelayedVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DelayedVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount.verify|verify} messages. - * @param message DelayedVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.auth.vesting.v1.IDelayedVestingAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DelayedVestingAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DelayedVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; - - /** - * Decodes a DelayedVestingAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DelayedVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; - - /** - * Verifies a DelayedVestingAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a DelayedVestingAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DelayedVestingAccount - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount; - - /** - * Creates a plain object from a DelayedVestingAccount message. Also converts values to other types if specified. - * @param message DelayedVestingAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.auth.vesting.v1.DelayedVestingAccount, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DelayedVestingAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Period. */ - interface IPeriod { - /** Period length */ - length?: number | Long | null; - - /** Period amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a Period. */ - class Period implements IPeriod { - /** - * Constructs a new Period. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriod); - - /** Period length. */ - public length: number | Long; - - /** Period amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Period instance using the specified properties. - * @param [properties] Properties to set - * @returns Period instance - */ - public static create( - properties?: cosmos_sdk.x.auth.vesting.v1.IPeriod, - ): cosmos_sdk.x.auth.vesting.v1.Period; - - /** - * Encodes the specified Period message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. - * @param message Period message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.auth.vesting.v1.IPeriod, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Period message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.Period.verify|verify} messages. - * @param message Period message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.auth.vesting.v1.IPeriod, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Period message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.auth.vesting.v1.Period; - - /** - * Decodes a Period message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Period - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.auth.vesting.v1.Period; - - /** - * Verifies a Period message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Period message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Period - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.auth.vesting.v1.Period; - - /** - * Creates a plain object from a Period message. Also converts values to other types if specified. - * @param message Period - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.auth.vesting.v1.Period, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Period to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a PeriodicVestingAccount. */ - interface IPeriodicVestingAccount { - /** PeriodicVestingAccount baseVestingAccount */ - baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; - - /** PeriodicVestingAccount startTime */ - startTime?: number | Long | null; - - /** PeriodicVestingAccount vestingPeriods */ - vestingPeriods?: cosmos_sdk.x.auth.vesting.v1.IPeriod[] | null; - } - - /** Represents a PeriodicVestingAccount. */ - class PeriodicVestingAccount implements IPeriodicVestingAccount { - /** - * Constructs a new PeriodicVestingAccount. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount); - - /** PeriodicVestingAccount baseVestingAccount. */ - public baseVestingAccount?: cosmos_sdk.x.auth.vesting.v1.IBaseVestingAccount | null; - - /** PeriodicVestingAccount startTime. */ - public startTime: number | Long; - - /** PeriodicVestingAccount vestingPeriods. */ - public vestingPeriods: cosmos_sdk.x.auth.vesting.v1.IPeriod[]; - - /** - * Creates a new PeriodicVestingAccount instance using the specified properties. - * @param [properties] Properties to set - * @returns PeriodicVestingAccount instance - */ - public static create( - properties?: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, - ): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; - - /** - * Encodes the specified PeriodicVestingAccount message. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. - * @param message PeriodicVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified PeriodicVestingAccount message, length delimited. Does not implicitly {@link cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount.verify|verify} messages. - * @param message PeriodicVestingAccount message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.auth.vesting.v1.IPeriodicVestingAccount, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a PeriodicVestingAccount message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PeriodicVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; - - /** - * Decodes a PeriodicVestingAccount message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PeriodicVestingAccount - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; - - /** - * Verifies a PeriodicVestingAccount message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a PeriodicVestingAccount message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PeriodicVestingAccount - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount; - - /** - * Creates a plain object from a PeriodicVestingAccount message. Also converts values to other types if specified. - * @param message PeriodicVestingAccount - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.auth.vesting.v1.PeriodicVestingAccount, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this PeriodicVestingAccount to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace bank. */ - namespace bank { - /** Namespace v1. */ - namespace v1 { - /** Represents a Query */ - class Query extends $protobuf.rpc.Service { - /** - * Constructs a new Query 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 Query 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, - ): Query; - - /** - * Calls Balance. - * @param request QueryBalanceRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryBalanceResponse - */ - public balance( - request: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, - callback: cosmos_sdk.x.bank.v1.Query.BalanceCallback, - ): void; - - /** - * Calls Balance. - * @param request QueryBalanceRequest message or plain object - * @returns Promise - */ - public balance( - request: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, - ): Promise; - - /** - * Calls AllBalances. - * @param request QueryAllBalancesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryAllBalancesResponse - */ - public allBalances( - request: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, - callback: cosmos_sdk.x.bank.v1.Query.AllBalancesCallback, - ): void; - - /** - * Calls AllBalances. - * @param request QueryAllBalancesRequest message or plain object - * @returns Promise - */ - public allBalances( - request: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, - ): Promise; - - /** - * Calls TotalSupply. - * @param request QueryTotalSupplyRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QueryTotalSupplyResponse - */ - public totalSupply( - request: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, - callback: cosmos_sdk.x.bank.v1.Query.TotalSupplyCallback, - ): void; - - /** - * Calls TotalSupply. - * @param request QueryTotalSupplyRequest message or plain object - * @returns Promise - */ - public totalSupply( - request: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, - ): Promise; - - /** - * Calls SupplyOf. - * @param request QuerySupplyOfRequest message or plain object - * @param callback Node-style callback called with the error, if any, and QuerySupplyOfResponse - */ - public supplyOf( - request: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, - callback: cosmos_sdk.x.bank.v1.Query.SupplyOfCallback, - ): void; - - /** - * Calls SupplyOf. - * @param request QuerySupplyOfRequest message or plain object - * @returns Promise - */ - public supplyOf( - request: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, - ): Promise; - } - - namespace Query { - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#balance}. - * @param error Error, if any - * @param [response] QueryBalanceResponse - */ - type BalanceCallback = ( - error: Error | null, - response?: cosmos_sdk.x.bank.v1.QueryBalanceResponse, - ) => void; - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#allBalances}. - * @param error Error, if any - * @param [response] QueryAllBalancesResponse - */ - type AllBalancesCallback = ( - error: Error | null, - response?: cosmos_sdk.x.bank.v1.QueryAllBalancesResponse, - ) => void; - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#totalSupply}. - * @param error Error, if any - * @param [response] QueryTotalSupplyResponse - */ - type TotalSupplyCallback = ( - error: Error | null, - response?: cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse, - ) => void; - - /** - * Callback as used by {@link cosmos_sdk.x.bank.v1.Query#supplyOf}. - * @param error Error, if any - * @param [response] QuerySupplyOfResponse - */ - type SupplyOfCallback = ( - error: Error | null, - response?: cosmos_sdk.x.bank.v1.QuerySupplyOfResponse, - ) => void; - } - - /** Properties of a QueryBalanceRequest. */ - interface IQueryBalanceRequest { - /** QueryBalanceRequest address */ - address?: Uint8Array | null; - - /** QueryBalanceRequest denom */ - denom?: string | null; - } - - /** Represents a QueryBalanceRequest. */ - class QueryBalanceRequest implements IQueryBalanceRequest { - /** - * Constructs a new QueryBalanceRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest); - - /** QueryBalanceRequest address. */ - public address: Uint8Array; - - /** QueryBalanceRequest denom. */ - public denom: string; - - /** - * Creates a new QueryBalanceRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryBalanceRequest instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, - ): cosmos_sdk.x.bank.v1.QueryBalanceRequest; - - /** - * Encodes the specified QueryBalanceRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. - * @param message QueryBalanceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified QueryBalanceRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceRequest.verify|verify} messages. - * @param message QueryBalanceRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IQueryBalanceRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a QueryBalanceRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryBalanceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.QueryBalanceRequest; - - /** - * Decodes a QueryBalanceRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryBalanceRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.bank.v1.QueryBalanceRequest; - - /** - * Verifies a QueryBalanceRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a QueryBalanceRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryBalanceRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryBalanceRequest; - - /** - * Creates a plain object from a QueryBalanceRequest message. Also converts values to other types if specified. - * @param message QueryBalanceRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.QueryBalanceRequest, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this QueryBalanceRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryBalanceResponse. */ - interface IQueryBalanceResponse { - /** QueryBalanceResponse balance */ - balance?: cosmos_sdk.v1.ICoin | null; - } - - /** Represents a QueryBalanceResponse. */ - class QueryBalanceResponse implements IQueryBalanceResponse { - /** - * Constructs a new QueryBalanceResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse); - - /** QueryBalanceResponse balance. */ - public balance?: cosmos_sdk.v1.ICoin | null; - - /** - * Creates a new QueryBalanceResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryBalanceResponse instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, - ): cosmos_sdk.x.bank.v1.QueryBalanceResponse; - - /** - * Encodes the specified QueryBalanceResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. - * @param message QueryBalanceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified QueryBalanceResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryBalanceResponse.verify|verify} messages. - * @param message QueryBalanceResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IQueryBalanceResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a QueryBalanceResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryBalanceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.QueryBalanceResponse; - - /** - * Decodes a QueryBalanceResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryBalanceResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.bank.v1.QueryBalanceResponse; - - /** - * Verifies a QueryBalanceResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a QueryBalanceResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryBalanceResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QueryBalanceResponse; - - /** - * Creates a plain object from a QueryBalanceResponse message. Also converts values to other types if specified. - * @param message QueryBalanceResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.QueryBalanceResponse, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this QueryBalanceResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryAllBalancesRequest. */ - interface IQueryAllBalancesRequest { - /** QueryAllBalancesRequest address */ - address?: Uint8Array | null; - } - - /** Represents a QueryAllBalancesRequest. */ - class QueryAllBalancesRequest implements IQueryAllBalancesRequest { - /** - * Constructs a new QueryAllBalancesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest); - - /** QueryAllBalancesRequest address. */ - public address: Uint8Array; - - /** - * Creates a new QueryAllBalancesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryAllBalancesRequest instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, - ): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; - - /** - * Encodes the specified QueryAllBalancesRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. - * @param message QueryAllBalancesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified QueryAllBalancesRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesRequest.verify|verify} messages. - * @param message QueryAllBalancesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IQueryAllBalancesRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a QueryAllBalancesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAllBalancesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; - - /** - * Decodes a QueryAllBalancesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAllBalancesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; - - /** - * Verifies a QueryAllBalancesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a QueryAllBalancesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAllBalancesRequest - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.bank.v1.QueryAllBalancesRequest; - - /** - * Creates a plain object from a QueryAllBalancesRequest message. Also converts values to other types if specified. - * @param message QueryAllBalancesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.QueryAllBalancesRequest, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this QueryAllBalancesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryAllBalancesResponse. */ - interface IQueryAllBalancesResponse { - /** QueryAllBalancesResponse balances */ - balances?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a QueryAllBalancesResponse. */ - class QueryAllBalancesResponse implements IQueryAllBalancesResponse { - /** - * Constructs a new QueryAllBalancesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse); - - /** QueryAllBalancesResponse balances. */ - public balances: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new QueryAllBalancesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryAllBalancesResponse instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, - ): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; - - /** - * Encodes the specified QueryAllBalancesResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. - * @param message QueryAllBalancesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified QueryAllBalancesResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryAllBalancesResponse.verify|verify} messages. - * @param message QueryAllBalancesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IQueryAllBalancesResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a QueryAllBalancesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryAllBalancesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; - - /** - * Decodes a QueryAllBalancesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryAllBalancesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; - - /** - * Verifies a QueryAllBalancesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a QueryAllBalancesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryAllBalancesResponse - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.bank.v1.QueryAllBalancesResponse; - - /** - * Creates a plain object from a QueryAllBalancesResponse message. Also converts values to other types if specified. - * @param message QueryAllBalancesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.QueryAllBalancesResponse, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this QueryAllBalancesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalSupplyRequest. */ - interface IQueryTotalSupplyRequest {} - - /** Represents a QueryTotalSupplyRequest. */ - class QueryTotalSupplyRequest implements IQueryTotalSupplyRequest { - /** - * Constructs a new QueryTotalSupplyRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest); - - /** - * Creates a new QueryTotalSupplyRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryTotalSupplyRequest instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, - ): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; - - /** - * Encodes the specified QueryTotalSupplyRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. - * @param message QueryTotalSupplyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalSupplyRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest.verify|verify} messages. - * @param message QueryTotalSupplyRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalSupplyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; - - /** - * Decodes a QueryTotalSupplyRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalSupplyRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; - - /** - * Verifies a QueryTotalSupplyRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a QueryTotalSupplyRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalSupplyRequest - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest; - - /** - * Creates a plain object from a QueryTotalSupplyRequest message. Also converts values to other types if specified. - * @param message QueryTotalSupplyRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.QueryTotalSupplyRequest, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this QueryTotalSupplyRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QueryTotalSupplyResponse. */ - interface IQueryTotalSupplyResponse { - /** QueryTotalSupplyResponse supply */ - supply?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a QueryTotalSupplyResponse. */ - class QueryTotalSupplyResponse implements IQueryTotalSupplyResponse { - /** - * Constructs a new QueryTotalSupplyResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse); - - /** QueryTotalSupplyResponse supply. */ - public supply: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new QueryTotalSupplyResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QueryTotalSupplyResponse instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, - ): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; - - /** - * Encodes the specified QueryTotalSupplyResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. - * @param message QueryTotalSupplyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified QueryTotalSupplyResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse.verify|verify} messages. - * @param message QueryTotalSupplyResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IQueryTotalSupplyResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QueryTotalSupplyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; - - /** - * Decodes a QueryTotalSupplyResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QueryTotalSupplyResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; - - /** - * Verifies a QueryTotalSupplyResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a QueryTotalSupplyResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QueryTotalSupplyResponse - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse; - - /** - * Creates a plain object from a QueryTotalSupplyResponse message. Also converts values to other types if specified. - * @param message QueryTotalSupplyResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.QueryTotalSupplyResponse, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this QueryTotalSupplyResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QuerySupplyOfRequest. */ - interface IQuerySupplyOfRequest { - /** QuerySupplyOfRequest denom */ - denom?: string | null; - } - - /** Represents a QuerySupplyOfRequest. */ - class QuerySupplyOfRequest implements IQuerySupplyOfRequest { - /** - * Constructs a new QuerySupplyOfRequest. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest); - - /** QuerySupplyOfRequest denom. */ - public denom: string; - - /** - * Creates a new QuerySupplyOfRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns QuerySupplyOfRequest instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, - ): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; - - /** - * Encodes the specified QuerySupplyOfRequest message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. - * @param message QuerySupplyOfRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified QuerySupplyOfRequest message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfRequest.verify|verify} messages. - * @param message QuerySupplyOfRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IQuerySupplyOfRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a QuerySupplyOfRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuerySupplyOfRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; - - /** - * Decodes a QuerySupplyOfRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuerySupplyOfRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; - - /** - * Verifies a QuerySupplyOfRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a QuerySupplyOfRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuerySupplyOfRequest - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QuerySupplyOfRequest; - - /** - * Creates a plain object from a QuerySupplyOfRequest message. Also converts values to other types if specified. - * @param message QuerySupplyOfRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.QuerySupplyOfRequest, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this QuerySupplyOfRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a QuerySupplyOfResponse. */ - interface IQuerySupplyOfResponse { - /** QuerySupplyOfResponse amount */ - amount?: string | null; - } - - /** Represents a QuerySupplyOfResponse. */ - class QuerySupplyOfResponse implements IQuerySupplyOfResponse { - /** - * Constructs a new QuerySupplyOfResponse. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse); - - /** QuerySupplyOfResponse amount. */ - public amount: string; - - /** - * Creates a new QuerySupplyOfResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns QuerySupplyOfResponse instance - */ - public static create( - properties?: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, - ): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; - - /** - * Encodes the specified QuerySupplyOfResponse message. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. - * @param message QuerySupplyOfResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified QuerySupplyOfResponse message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.QuerySupplyOfResponse.verify|verify} messages. - * @param message QuerySupplyOfResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IQuerySupplyOfResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a QuerySupplyOfResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuerySupplyOfResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; - - /** - * Decodes a QuerySupplyOfResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuerySupplyOfResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; - - /** - * Verifies a QuerySupplyOfResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a QuerySupplyOfResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuerySupplyOfResponse - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.QuerySupplyOfResponse; - - /** - * Creates a plain object from a QuerySupplyOfResponse message. Also converts values to other types if specified. - * @param message QuerySupplyOfResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.QuerySupplyOfResponse, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this QuerySupplyOfResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message MsgSend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IMsgSend, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. - * @param message MsgSend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IMsgSend, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgSend message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.MsgSend; - - /** - * Decodes a MsgSend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.bank.v1.MsgSend; - - /** - * Verifies a MsgSend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgSend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSend - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.MsgSend; - - /** - * Creates a plain object from a MsgSend message. Also converts values to other types if specified. - * @param message MsgSend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.MsgSend, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgSend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message Input message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IInput, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Input message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. - * @param message Input message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IInput, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an Input message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.Input; - - /** - * Decodes an Input message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.bank.v1.Input; - - /** - * Verifies an Input message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an Input message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Input - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Input; - - /** - * Creates a plain object from an Input message. Also converts values to other types if specified. - * @param message Input - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.Input, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Input to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message Output message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IOutput, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Output message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. - * @param message Output message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IOutput, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an Output message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.Output; - - /** - * Decodes an Output message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.bank.v1.Output; - - /** - * Verifies an Output message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an Output message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Output - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Output; - - /** - * Creates a plain object from an Output message. Also converts values to other types if specified. - * @param message Output - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.Output, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Output to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message MsgMultiSend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.IMsgMultiSend, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgMultiSend message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. - * @param message MsgMultiSend message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.IMsgMultiSend, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.MsgMultiSend; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.bank.v1.MsgMultiSend; - - /** - * Verifies a MsgMultiSend message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgMultiSend message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgMultiSend - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.MsgMultiSend; - - /** - * Creates a plain object from a MsgMultiSend message. Also converts values to other types if specified. - * @param message MsgMultiSend - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.MsgMultiSend, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgMultiSend to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** 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 [properties] Properties to set - */ - constructor(properties?: 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 message Supply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.bank.v1.ISupply, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Supply message, length delimited. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. - * @param message Supply message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.bank.v1.ISupply, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Supply message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.bank.v1.Supply; - - /** - * Decodes a Supply message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.bank.v1.Supply; - - /** - * Verifies a Supply message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Supply message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Supply - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.bank.v1.Supply; - - /** - * Creates a plain object from a Supply message. Also converts values to other types if specified. - * @param message Supply - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.bank.v1.Supply, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Supply to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace capability. */ - namespace capability { - /** Namespace v1. */ - namespace v1 { - /** Properties of a Capability. */ - interface ICapability { - /** Capability index */ - index?: number | Long | null; - } - - /** Represents a Capability. */ - class Capability implements ICapability { - /** - * Constructs a new Capability. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.capability.v1.ICapability); - - /** Capability index. */ - public index: number | Long; - - /** - * Creates a new Capability instance using the specified properties. - * @param [properties] Properties to set - * @returns Capability instance - */ - public static create( - properties?: cosmos_sdk.x.capability.v1.ICapability, - ): cosmos_sdk.x.capability.v1.Capability; - - /** - * Encodes the specified Capability message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. - * @param message Capability message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.capability.v1.ICapability, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Capability message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Capability.verify|verify} messages. - * @param message Capability message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.capability.v1.ICapability, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Capability message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Capability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.capability.v1.Capability; - - /** - * Decodes a Capability message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Capability - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.capability.v1.Capability; - - /** - * Verifies a Capability message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Capability message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Capability - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.Capability; - - /** - * Creates a plain object from a Capability message. Also converts values to other types if specified. - * @param message Capability - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.capability.v1.Capability, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Capability to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Owner. */ - interface IOwner { - /** Owner module */ - module?: string | null; - - /** Owner name */ - name?: string | null; - } - - /** Represents an Owner. */ - class Owner implements IOwner { - /** - * Constructs a new Owner. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.capability.v1.IOwner); - - /** Owner module. */ - public module: string; - - /** Owner name. */ - public name: string; - - /** - * Creates a new Owner instance using the specified properties. - * @param [properties] Properties to set - * @returns Owner instance - */ - public static create( - properties?: cosmos_sdk.x.capability.v1.IOwner, - ): cosmos_sdk.x.capability.v1.Owner; - - /** - * Encodes the specified Owner message. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. - * @param message Owner message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.capability.v1.IOwner, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Owner message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.Owner.verify|verify} messages. - * @param message Owner message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.capability.v1.IOwner, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an Owner message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Owner - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.capability.v1.Owner; - - /** - * Decodes an Owner message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Owner - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.capability.v1.Owner; - - /** - * Verifies an Owner message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an Owner message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Owner - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.Owner; - - /** - * Creates a plain object from an Owner message. Also converts values to other types if specified. - * @param message Owner - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.capability.v1.Owner, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Owner to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CapabilityOwners. */ - interface ICapabilityOwners { - /** CapabilityOwners owners */ - owners?: cosmos_sdk.x.capability.v1.IOwner[] | null; - } - - /** Represents a CapabilityOwners. */ - class CapabilityOwners implements ICapabilityOwners { - /** - * Constructs a new CapabilityOwners. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.capability.v1.ICapabilityOwners); - - /** CapabilityOwners owners. */ - public owners: cosmos_sdk.x.capability.v1.IOwner[]; - - /** - * Creates a new CapabilityOwners instance using the specified properties. - * @param [properties] Properties to set - * @returns CapabilityOwners instance - */ - public static create( - properties?: cosmos_sdk.x.capability.v1.ICapabilityOwners, - ): cosmos_sdk.x.capability.v1.CapabilityOwners; - - /** - * Encodes the specified CapabilityOwners message. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. - * @param message CapabilityOwners message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.capability.v1.ICapabilityOwners, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified CapabilityOwners message, length delimited. Does not implicitly {@link cosmos_sdk.x.capability.v1.CapabilityOwners.verify|verify} messages. - * @param message CapabilityOwners message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.capability.v1.ICapabilityOwners, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a CapabilityOwners message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CapabilityOwners - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.capability.v1.CapabilityOwners; - - /** - * Decodes a CapabilityOwners message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CapabilityOwners - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.capability.v1.CapabilityOwners; - - /** - * Verifies a CapabilityOwners message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a CapabilityOwners message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CapabilityOwners - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.capability.v1.CapabilityOwners; - - /** - * Creates a plain object from a CapabilityOwners message. Also converts values to other types if specified. - * @param message CapabilityOwners - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.capability.v1.CapabilityOwners, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this CapabilityOwners to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace crisis. */ - namespace crisis { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgVerifyInvariant. */ - interface IMsgVerifyInvariant { - /** MsgVerifyInvariant sender */ - sender?: Uint8Array | null; - - /** MsgVerifyInvariant invariantModuleName */ - invariantModuleName?: string | null; - - /** MsgVerifyInvariant invariantRoute */ - invariantRoute?: string | null; - } - - /** Represents a MsgVerifyInvariant. */ - class MsgVerifyInvariant implements IMsgVerifyInvariant { - /** - * Constructs a new MsgVerifyInvariant. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant); - - /** MsgVerifyInvariant sender. */ - public sender: Uint8Array; - - /** MsgVerifyInvariant invariantModuleName. */ - public invariantModuleName: string; - - /** MsgVerifyInvariant invariantRoute. */ - public invariantRoute: string; - - /** - * Creates a new MsgVerifyInvariant instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgVerifyInvariant instance - */ - public static create( - properties?: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, - ): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; - - /** - * Encodes the specified MsgVerifyInvariant message. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. - * @param message MsgVerifyInvariant message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgVerifyInvariant message, length delimited. Does not implicitly {@link cosmos_sdk.x.crisis.v1.MsgVerifyInvariant.verify|verify} messages. - * @param message MsgVerifyInvariant message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.crisis.v1.IMsgVerifyInvariant, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgVerifyInvariant message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgVerifyInvariant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; - - /** - * Decodes a MsgVerifyInvariant message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgVerifyInvariant - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; - - /** - * Verifies a MsgVerifyInvariant message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgVerifyInvariant message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgVerifyInvariant - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.crisis.v1.MsgVerifyInvariant; - - /** - * Creates a plain object from a MsgVerifyInvariant message. Also converts values to other types if specified. - * @param message MsgVerifyInvariant - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.crisis.v1.MsgVerifyInvariant, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgVerifyInvariant to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace distribution. */ - namespace distribution { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgSetWithdrawAddress. */ - interface IMsgSetWithdrawAddress { - /** MsgSetWithdrawAddress delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** MsgSetWithdrawAddress withdrawAddress */ - withdrawAddress?: Uint8Array | null; - } - - /** Represents a MsgSetWithdrawAddress. */ - class MsgSetWithdrawAddress implements IMsgSetWithdrawAddress { - /** - * Constructs a new MsgSetWithdrawAddress. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress); - - /** MsgSetWithdrawAddress delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgSetWithdrawAddress withdrawAddress. */ - public withdrawAddress: Uint8Array; - - /** - * Creates a new MsgSetWithdrawAddress instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSetWithdrawAddress instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, - ): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; - - /** - * Encodes the specified MsgSetWithdrawAddress message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. - * @param message MsgSetWithdrawAddress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgSetWithdrawAddress message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress.verify|verify} messages. - * @param message MsgSetWithdrawAddress message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IMsgSetWithdrawAddress, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSetWithdrawAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; - - /** - * Decodes a MsgSetWithdrawAddress message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSetWithdrawAddress - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; - - /** - * Verifies a MsgSetWithdrawAddress message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgSetWithdrawAddress message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSetWithdrawAddress - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress; - - /** - * Creates a plain object from a MsgSetWithdrawAddress message. Also converts values to other types if specified. - * @param message MsgSetWithdrawAddress - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.MsgSetWithdrawAddress, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgSetWithdrawAddress to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgWithdrawDelegatorReward. */ - interface IMsgWithdrawDelegatorReward { - /** MsgWithdrawDelegatorReward delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** MsgWithdrawDelegatorReward validatorAddress */ - validatorAddress?: Uint8Array | null; - } - - /** Represents a MsgWithdrawDelegatorReward. */ - class MsgWithdrawDelegatorReward implements IMsgWithdrawDelegatorReward { - /** - * Constructs a new MsgWithdrawDelegatorReward. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward); - - /** MsgWithdrawDelegatorReward delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgWithdrawDelegatorReward validatorAddress. */ - public validatorAddress: Uint8Array; - - /** - * Creates a new MsgWithdrawDelegatorReward instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgWithdrawDelegatorReward instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, - ): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; - - /** - * Encodes the specified MsgWithdrawDelegatorReward message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. - * @param message MsgWithdrawDelegatorReward message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgWithdrawDelegatorReward message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward.verify|verify} messages. - * @param message MsgWithdrawDelegatorReward message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IMsgWithdrawDelegatorReward, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgWithdrawDelegatorReward - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; - - /** - * Decodes a MsgWithdrawDelegatorReward message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgWithdrawDelegatorReward - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; - - /** - * Verifies a MsgWithdrawDelegatorReward message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgWithdrawDelegatorReward message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgWithdrawDelegatorReward - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward; - - /** - * Creates a plain object from a MsgWithdrawDelegatorReward message. Also converts values to other types if specified. - * @param message MsgWithdrawDelegatorReward - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.MsgWithdrawDelegatorReward, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgWithdrawDelegatorReward to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgWithdrawValidatorCommission. */ - interface IMsgWithdrawValidatorCommission { - /** MsgWithdrawValidatorCommission validatorAddress */ - validatorAddress?: Uint8Array | null; - } - - /** Represents a MsgWithdrawValidatorCommission. */ - class MsgWithdrawValidatorCommission implements IMsgWithdrawValidatorCommission { - /** - * Constructs a new MsgWithdrawValidatorCommission. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission); - - /** MsgWithdrawValidatorCommission validatorAddress. */ - public validatorAddress: Uint8Array; - - /** - * Creates a new MsgWithdrawValidatorCommission instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgWithdrawValidatorCommission instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, - ): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; - - /** - * Encodes the specified MsgWithdrawValidatorCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. - * @param message MsgWithdrawValidatorCommission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgWithdrawValidatorCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission.verify|verify} messages. - * @param message MsgWithdrawValidatorCommission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IMsgWithdrawValidatorCommission, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgWithdrawValidatorCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; - - /** - * Decodes a MsgWithdrawValidatorCommission message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgWithdrawValidatorCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; - - /** - * Verifies a MsgWithdrawValidatorCommission message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgWithdrawValidatorCommission message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgWithdrawValidatorCommission - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission; - - /** - * Creates a plain object from a MsgWithdrawValidatorCommission message. Also converts values to other types if specified. - * @param message MsgWithdrawValidatorCommission - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.MsgWithdrawValidatorCommission, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgWithdrawValidatorCommission to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgFundCommunityPool. */ - interface IMsgFundCommunityPool { - /** MsgFundCommunityPool amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - - /** MsgFundCommunityPool depositor */ - depositor?: Uint8Array | null; - } - - /** Represents a MsgFundCommunityPool. */ - class MsgFundCommunityPool implements IMsgFundCommunityPool { - /** - * Constructs a new MsgFundCommunityPool. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool); - - /** MsgFundCommunityPool amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** MsgFundCommunityPool depositor. */ - public depositor: Uint8Array; - - /** - * Creates a new MsgFundCommunityPool instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgFundCommunityPool instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, - ): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; - - /** - * Encodes the specified MsgFundCommunityPool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. - * @param message MsgFundCommunityPool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgFundCommunityPool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.MsgFundCommunityPool.verify|verify} messages. - * @param message MsgFundCommunityPool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IMsgFundCommunityPool, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgFundCommunityPool message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgFundCommunityPool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; - - /** - * Decodes a MsgFundCommunityPool message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgFundCommunityPool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; - - /** - * Verifies a MsgFundCommunityPool message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgFundCommunityPool message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgFundCommunityPool - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.MsgFundCommunityPool; - - /** - * Creates a plain object from a MsgFundCommunityPool message. Also converts values to other types if specified. - * @param message MsgFundCommunityPool - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.MsgFundCommunityPool, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgFundCommunityPool to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - /** Params communityTax */ - communityTax?: string | null; - - /** Params baseProposerReward */ - baseProposerReward?: string | null; - - /** Params bonusProposerReward */ - bonusProposerReward?: string | null; - - /** Params withdrawAddrEnabled */ - withdrawAddrEnabled?: boolean | null; - } - - /** Represents a Params. */ - class Params implements IParams { - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IParams); - - /** Params communityTax. */ - public communityTax: string; - - /** Params baseProposerReward. */ - public baseProposerReward: string; - - /** Params bonusProposerReward. */ - public bonusProposerReward: string; - - /** Params withdrawAddrEnabled. */ - public withdrawAddrEnabled: boolean; - - /** - * Creates a new Params instance using the specified properties. - * @param [properties] Properties to set - * @returns Params instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IParams, - ): cosmos_sdk.x.distribution.v1.Params; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Params message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.Params; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.Params; - - /** - * Verifies a Params message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Params - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.Params; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @param message Params - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.Params, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValidatorHistoricalRewards. */ - interface IValidatorHistoricalRewards { - /** ValidatorHistoricalRewards cumulativeRewardRatio */ - cumulativeRewardRatio?: cosmos_sdk.v1.IDecCoin[] | null; - - /** ValidatorHistoricalRewards referenceCount */ - referenceCount?: number | null; - } - - /** Represents a ValidatorHistoricalRewards. */ - class ValidatorHistoricalRewards implements IValidatorHistoricalRewards { - /** - * Constructs a new ValidatorHistoricalRewards. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards); - - /** ValidatorHistoricalRewards cumulativeRewardRatio. */ - public cumulativeRewardRatio: cosmos_sdk.v1.IDecCoin[]; - - /** ValidatorHistoricalRewards referenceCount. */ - public referenceCount: number; - - /** - * Creates a new ValidatorHistoricalRewards instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorHistoricalRewards instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, - ): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; - - /** - * Encodes the specified ValidatorHistoricalRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. - * @param message ValidatorHistoricalRewards message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ValidatorHistoricalRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards.verify|verify} messages. - * @param message ValidatorHistoricalRewards message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IValidatorHistoricalRewards, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidatorHistoricalRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; - - /** - * Decodes a ValidatorHistoricalRewards message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorHistoricalRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; - - /** - * Verifies a ValidatorHistoricalRewards message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValidatorHistoricalRewards message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorHistoricalRewards - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards; - - /** - * Creates a plain object from a ValidatorHistoricalRewards message. Also converts values to other types if specified. - * @param message ValidatorHistoricalRewards - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.ValidatorHistoricalRewards, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValidatorHistoricalRewards to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValidatorCurrentRewards. */ - interface IValidatorCurrentRewards { - /** ValidatorCurrentRewards rewards */ - rewards?: cosmos_sdk.v1.IDecCoin[] | null; - - /** ValidatorCurrentRewards period */ - period?: number | Long | null; - } - - /** Represents a ValidatorCurrentRewards. */ - class ValidatorCurrentRewards implements IValidatorCurrentRewards { - /** - * Constructs a new ValidatorCurrentRewards. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards); - - /** ValidatorCurrentRewards rewards. */ - public rewards: cosmos_sdk.v1.IDecCoin[]; - - /** ValidatorCurrentRewards period. */ - public period: number | Long; - - /** - * Creates a new ValidatorCurrentRewards instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorCurrentRewards instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, - ): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; - - /** - * Encodes the specified ValidatorCurrentRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. - * @param message ValidatorCurrentRewards message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ValidatorCurrentRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards.verify|verify} messages. - * @param message ValidatorCurrentRewards message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IValidatorCurrentRewards, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ValidatorCurrentRewards message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidatorCurrentRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; - - /** - * Decodes a ValidatorCurrentRewards message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorCurrentRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; - - /** - * Verifies a ValidatorCurrentRewards message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValidatorCurrentRewards message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorCurrentRewards - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards; - - /** - * Creates a plain object from a ValidatorCurrentRewards message. Also converts values to other types if specified. - * @param message ValidatorCurrentRewards - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.ValidatorCurrentRewards, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValidatorCurrentRewards to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValidatorAccumulatedCommission. */ - interface IValidatorAccumulatedCommission { - /** ValidatorAccumulatedCommission commission */ - commission?: cosmos_sdk.v1.IDecCoin[] | null; - } - - /** Represents a ValidatorAccumulatedCommission. */ - class ValidatorAccumulatedCommission implements IValidatorAccumulatedCommission { - /** - * Constructs a new ValidatorAccumulatedCommission. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission); - - /** ValidatorAccumulatedCommission commission. */ - public commission: cosmos_sdk.v1.IDecCoin[]; - - /** - * Creates a new ValidatorAccumulatedCommission instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorAccumulatedCommission instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, - ): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; - - /** - * Encodes the specified ValidatorAccumulatedCommission message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. - * @param message ValidatorAccumulatedCommission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ValidatorAccumulatedCommission message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission.verify|verify} messages. - * @param message ValidatorAccumulatedCommission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IValidatorAccumulatedCommission, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidatorAccumulatedCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; - - /** - * Decodes a ValidatorAccumulatedCommission message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorAccumulatedCommission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; - - /** - * Verifies a ValidatorAccumulatedCommission message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValidatorAccumulatedCommission message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorAccumulatedCommission - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission; - - /** - * Creates a plain object from a ValidatorAccumulatedCommission message. Also converts values to other types if specified. - * @param message ValidatorAccumulatedCommission - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.ValidatorAccumulatedCommission, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValidatorAccumulatedCommission to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValidatorOutstandingRewards. */ - interface IValidatorOutstandingRewards { - /** ValidatorOutstandingRewards rewards */ - rewards?: cosmos_sdk.v1.IDecCoin[] | null; - } - - /** Represents a ValidatorOutstandingRewards. */ - class ValidatorOutstandingRewards implements IValidatorOutstandingRewards { - /** - * Constructs a new ValidatorOutstandingRewards. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards); - - /** ValidatorOutstandingRewards rewards. */ - public rewards: cosmos_sdk.v1.IDecCoin[]; - - /** - * Creates a new ValidatorOutstandingRewards instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorOutstandingRewards instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, - ): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; - - /** - * Encodes the specified ValidatorOutstandingRewards message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. - * @param message ValidatorOutstandingRewards message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ValidatorOutstandingRewards message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards.verify|verify} messages. - * @param message ValidatorOutstandingRewards message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IValidatorOutstandingRewards, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidatorOutstandingRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; - - /** - * Decodes a ValidatorOutstandingRewards message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorOutstandingRewards - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; - - /** - * Verifies a ValidatorOutstandingRewards message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValidatorOutstandingRewards message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorOutstandingRewards - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards; - - /** - * Creates a plain object from a ValidatorOutstandingRewards message. Also converts values to other types if specified. - * @param message ValidatorOutstandingRewards - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.ValidatorOutstandingRewards, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValidatorOutstandingRewards to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValidatorSlashEvent. */ - interface IValidatorSlashEvent { - /** ValidatorSlashEvent validatorPeriod */ - validatorPeriod?: number | Long | null; - - /** ValidatorSlashEvent fraction */ - fraction?: string | null; - } - - /** Represents a ValidatorSlashEvent. */ - class ValidatorSlashEvent implements IValidatorSlashEvent { - /** - * Constructs a new ValidatorSlashEvent. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent); - - /** ValidatorSlashEvent validatorPeriod. */ - public validatorPeriod: number | Long; - - /** ValidatorSlashEvent fraction. */ - public fraction: string; - - /** - * Creates a new ValidatorSlashEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorSlashEvent instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, - ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; - - /** - * Encodes the specified ValidatorSlashEvent message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. - * @param message ValidatorSlashEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ValidatorSlashEvent message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvent.verify|verify} messages. - * @param message ValidatorSlashEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ValidatorSlashEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidatorSlashEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; - - /** - * Decodes a ValidatorSlashEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorSlashEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; - - /** - * Verifies a ValidatorSlashEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValidatorSlashEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorSlashEvent - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.ValidatorSlashEvent; - - /** - * Creates a plain object from a ValidatorSlashEvent message. Also converts values to other types if specified. - * @param message ValidatorSlashEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.ValidatorSlashEvent, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValidatorSlashEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValidatorSlashEvents. */ - interface IValidatorSlashEvents { - /** ValidatorSlashEvents validatorSlashEvents */ - validatorSlashEvents?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent[] | null; - } - - /** Represents a ValidatorSlashEvents. */ - class ValidatorSlashEvents implements IValidatorSlashEvents { - /** - * Constructs a new ValidatorSlashEvents. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents); - - /** ValidatorSlashEvents validatorSlashEvents. */ - public validatorSlashEvents: cosmos_sdk.x.distribution.v1.IValidatorSlashEvent[]; - - /** - * Creates a new ValidatorSlashEvents instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorSlashEvents instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, - ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; - - /** - * Encodes the specified ValidatorSlashEvents message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. - * @param message ValidatorSlashEvents message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ValidatorSlashEvents message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.ValidatorSlashEvents.verify|verify} messages. - * @param message ValidatorSlashEvents message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IValidatorSlashEvents, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ValidatorSlashEvents message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidatorSlashEvents - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; - - /** - * Decodes a ValidatorSlashEvents message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorSlashEvents - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; - - /** - * Verifies a ValidatorSlashEvents message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValidatorSlashEvents message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorSlashEvents - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.ValidatorSlashEvents; - - /** - * Creates a plain object from a ValidatorSlashEvents message. Also converts values to other types if specified. - * @param message ValidatorSlashEvents - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.ValidatorSlashEvents, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValidatorSlashEvents to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FeePool. */ - interface IFeePool { - /** FeePool communityPool */ - communityPool?: cosmos_sdk.v1.IDecCoin[] | null; - } - - /** Represents a FeePool. */ - class FeePool implements IFeePool { - /** - * Constructs a new FeePool. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IFeePool); - - /** FeePool communityPool. */ - public communityPool: cosmos_sdk.v1.IDecCoin[]; - - /** - * Creates a new FeePool instance using the specified properties. - * @param [properties] Properties to set - * @returns FeePool instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IFeePool, - ): cosmos_sdk.x.distribution.v1.FeePool; - - /** - * Encodes the specified FeePool message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. - * @param message FeePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IFeePool, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified FeePool message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.FeePool.verify|verify} messages. - * @param message FeePool message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IFeePool, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a FeePool message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.FeePool; - - /** - * Decodes a FeePool message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeePool - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.FeePool; - - /** - * Verifies a FeePool message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a FeePool message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeePool - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.distribution.v1.FeePool; - - /** - * Creates a plain object from a FeePool message. Also converts values to other types if specified. - * @param message FeePool - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.FeePool, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this FeePool to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CommunityPoolSpendProposal. */ - interface ICommunityPoolSpendProposal { - /** CommunityPoolSpendProposal title */ - title?: string | null; - - /** CommunityPoolSpendProposal description */ - description?: string | null; - - /** CommunityPoolSpendProposal recipient */ - recipient?: Uint8Array | null; - - /** CommunityPoolSpendProposal amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a CommunityPoolSpendProposal. */ - class CommunityPoolSpendProposal implements ICommunityPoolSpendProposal { - /** - * Constructs a new CommunityPoolSpendProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal); - - /** CommunityPoolSpendProposal title. */ - public title: string; - - /** CommunityPoolSpendProposal description. */ - public description: string; - - /** CommunityPoolSpendProposal recipient. */ - public recipient: Uint8Array; - - /** CommunityPoolSpendProposal amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new CommunityPoolSpendProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns CommunityPoolSpendProposal instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, - ): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; - - /** - * Encodes the specified CommunityPoolSpendProposal message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. - * @param message CommunityPoolSpendProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified CommunityPoolSpendProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal.verify|verify} messages. - * @param message CommunityPoolSpendProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.ICommunityPoolSpendProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommunityPoolSpendProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; - - /** - * Decodes a CommunityPoolSpendProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommunityPoolSpendProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; - - /** - * Verifies a CommunityPoolSpendProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a CommunityPoolSpendProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommunityPoolSpendProposal - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal; - - /** - * Creates a plain object from a CommunityPoolSpendProposal message. Also converts values to other types if specified. - * @param message CommunityPoolSpendProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.CommunityPoolSpendProposal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this CommunityPoolSpendProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DelegatorStartingInfo. */ - interface IDelegatorStartingInfo { - /** DelegatorStartingInfo previousPeriod */ - previousPeriod?: number | Long | null; - - /** DelegatorStartingInfo stake */ - stake?: string | null; - - /** DelegatorStartingInfo height */ - height?: number | Long | null; - } - - /** Represents a DelegatorStartingInfo. */ - class DelegatorStartingInfo implements IDelegatorStartingInfo { - /** - * Constructs a new DelegatorStartingInfo. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo); - - /** DelegatorStartingInfo previousPeriod. */ - public previousPeriod: number | Long; - - /** DelegatorStartingInfo stake. */ - public stake: string; - - /** DelegatorStartingInfo height. */ - public height: number | Long; - - /** - * Creates a new DelegatorStartingInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DelegatorStartingInfo instance - */ - public static create( - properties?: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, - ): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; - - /** - * Encodes the specified DelegatorStartingInfo message. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. - * @param message DelegatorStartingInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DelegatorStartingInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.distribution.v1.DelegatorStartingInfo.verify|verify} messages. - * @param message DelegatorStartingInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.distribution.v1.IDelegatorStartingInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DelegatorStartingInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DelegatorStartingInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; - - /** - * Decodes a DelegatorStartingInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DelegatorStartingInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; - - /** - * Verifies a DelegatorStartingInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a DelegatorStartingInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DelegatorStartingInfo - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.distribution.v1.DelegatorStartingInfo; - - /** - * Creates a plain object from a DelegatorStartingInfo message. Also converts values to other types if specified. - * @param message DelegatorStartingInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.distribution.v1.DelegatorStartingInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DelegatorStartingInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace evidence. */ - namespace evidence { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgSubmitEvidence. */ - interface IMsgSubmitEvidence { - /** MsgSubmitEvidence submitter */ - submitter?: Uint8Array | null; - - /** MsgSubmitEvidence evidence */ - evidence?: google.protobuf.IAny | null; - } - - /** Represents a MsgSubmitEvidence. */ - class MsgSubmitEvidence implements IMsgSubmitEvidence { - /** - * Constructs a new MsgSubmitEvidence. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence); - - /** MsgSubmitEvidence submitter. */ - public submitter: Uint8Array; - - /** MsgSubmitEvidence evidence. */ - public evidence?: google.protobuf.IAny | null; - - /** - * Creates a new MsgSubmitEvidence instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSubmitEvidence instance - */ - public static create( - properties?: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, - ): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; - - /** - * Encodes the specified MsgSubmitEvidence message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. - * @param message MsgSubmitEvidence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitEvidence message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.MsgSubmitEvidence.verify|verify} messages. - * @param message MsgSubmitEvidence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.evidence.v1.IMsgSubmitEvidence, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgSubmitEvidence message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitEvidence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; - - /** - * Decodes a MsgSubmitEvidence message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitEvidence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; - - /** - * Verifies a MsgSubmitEvidence message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgSubmitEvidence message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitEvidence - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.evidence.v1.MsgSubmitEvidence; - - /** - * Creates a plain object from a MsgSubmitEvidence message. Also converts values to other types if specified. - * @param message MsgSubmitEvidence - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.evidence.v1.MsgSubmitEvidence, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgSubmitEvidence to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an Equivocation. */ - interface IEquivocation { - /** Equivocation height */ - height?: number | Long | null; - - /** Equivocation time */ - time?: google.protobuf.ITimestamp | null; - - /** Equivocation power */ - power?: number | Long | null; - - /** Equivocation consensusAddress */ - consensusAddress?: Uint8Array | null; - } - - /** Represents an Equivocation. */ - class Equivocation implements IEquivocation { - /** - * Constructs a new Equivocation. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.evidence.v1.IEquivocation); - - /** Equivocation height. */ - public height: number | Long; - - /** Equivocation time. */ - public time?: google.protobuf.ITimestamp | null; - - /** Equivocation power. */ - public power: number | Long; - - /** Equivocation consensusAddress. */ - public consensusAddress: Uint8Array; - - /** - * Creates a new Equivocation instance using the specified properties. - * @param [properties] Properties to set - * @returns Equivocation instance - */ - public static create( - properties?: cosmos_sdk.x.evidence.v1.IEquivocation, - ): cosmos_sdk.x.evidence.v1.Equivocation; - - /** - * Encodes the specified Equivocation message. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. - * @param message Equivocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.evidence.v1.IEquivocation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Equivocation message, length delimited. Does not implicitly {@link cosmos_sdk.x.evidence.v1.Equivocation.verify|verify} messages. - * @param message Equivocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.evidence.v1.IEquivocation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an Equivocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Equivocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.evidence.v1.Equivocation; - - /** - * Decodes an Equivocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Equivocation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.evidence.v1.Equivocation; - - /** - * Verifies an Equivocation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an Equivocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Equivocation - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.evidence.v1.Equivocation; - - /** - * Creates a plain object from an Equivocation message. Also converts values to other types if specified. - * @param message Equivocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.evidence.v1.Equivocation, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Equivocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace gov. */ - namespace gov { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgSubmitProposal. */ - interface IMsgSubmitProposal { - /** MsgSubmitProposal content */ - content?: google.protobuf.IAny | null; - - /** MsgSubmitProposal initialDeposit */ - initialDeposit?: cosmos_sdk.v1.ICoin[] | null; - - /** MsgSubmitProposal proposer */ - proposer?: Uint8Array | null; - } - - /** Represents a MsgSubmitProposal. */ - class MsgSubmitProposal implements IMsgSubmitProposal { - /** - * Constructs a new MsgSubmitProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal); - - /** MsgSubmitProposal content. */ - public content?: google.protobuf.IAny | null; - - /** MsgSubmitProposal initialDeposit. */ - public initialDeposit: cosmos_sdk.v1.ICoin[]; - - /** MsgSubmitProposal proposer. */ - public proposer: Uint8Array; - - /** - * Creates a new MsgSubmitProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgSubmitProposal instance - */ - public static create( - properties?: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, - ): cosmos_sdk.x.gov.v1.MsgSubmitProposal; - - /** - * Encodes the specified MsgSubmitProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. - * @param message MsgSubmitProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgSubmitProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgSubmitProposal.verify|verify} messages. - * @param message MsgSubmitProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.gov.v1.IMsgSubmitProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgSubmitProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgSubmitProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.gov.v1.MsgSubmitProposal; - - /** - * Decodes a MsgSubmitProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgSubmitProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.gov.v1.MsgSubmitProposal; - - /** - * Verifies a MsgSubmitProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgSubmitProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgSubmitProposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgSubmitProposal; - - /** - * Creates a plain object from a MsgSubmitProposal message. Also converts values to other types if specified. - * @param message MsgSubmitProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.gov.v1.MsgSubmitProposal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgSubmitProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgVote. */ - interface IMsgVote { - /** MsgVote proposalId */ - proposalId?: number | Long | null; - - /** MsgVote voter */ - voter?: Uint8Array | null; - - /** MsgVote option */ - option?: cosmos_sdk.x.gov.v1.VoteOption | null; - } - - /** Represents a MsgVote. */ - class MsgVote implements IMsgVote { - /** - * Constructs a new MsgVote. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.gov.v1.IMsgVote); - - /** MsgVote proposalId. */ - public proposalId: number | Long; - - /** MsgVote voter. */ - public voter: Uint8Array; - - /** MsgVote option. */ - public option: cosmos_sdk.x.gov.v1.VoteOption; - - /** - * Creates a new MsgVote instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgVote instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IMsgVote): cosmos_sdk.x.gov.v1.MsgVote; - - /** - * Encodes the specified MsgVote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. - * @param message MsgVote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.gov.v1.IMsgVote, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgVote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgVote.verify|verify} messages. - * @param message MsgVote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.gov.v1.IMsgVote, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgVote message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgVote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.gov.v1.MsgVote; - - /** - * Decodes a MsgVote message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgVote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.gov.v1.MsgVote; - - /** - * Verifies a MsgVote message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgVote message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgVote - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgVote; - - /** - * Creates a plain object from a MsgVote message. Also converts values to other types if specified. - * @param message MsgVote - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.gov.v1.MsgVote, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgVote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgDeposit. */ - interface IMsgDeposit { - /** MsgDeposit proposalId */ - proposalId?: number | Long | null; - - /** MsgDeposit depositor */ - depositor?: Uint8Array | null; - - /** MsgDeposit amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a MsgDeposit. */ - class MsgDeposit implements IMsgDeposit { - /** - * Constructs a new MsgDeposit. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.gov.v1.IMsgDeposit); - - /** MsgDeposit proposalId. */ - public proposalId: number | Long; - - /** MsgDeposit depositor. */ - public depositor: Uint8Array; - - /** MsgDeposit amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new MsgDeposit instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgDeposit instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IMsgDeposit): cosmos_sdk.x.gov.v1.MsgDeposit; - - /** - * Encodes the specified MsgDeposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. - * @param message MsgDeposit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.gov.v1.IMsgDeposit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgDeposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.MsgDeposit.verify|verify} messages. - * @param message MsgDeposit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.gov.v1.IMsgDeposit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgDeposit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgDeposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.gov.v1.MsgDeposit; - - /** - * Decodes a MsgDeposit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgDeposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.gov.v1.MsgDeposit; - - /** - * Verifies a MsgDeposit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgDeposit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgDeposit - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.MsgDeposit; - - /** - * Creates a plain object from a MsgDeposit message. Also converts values to other types if specified. - * @param message MsgDeposit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.gov.v1.MsgDeposit, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgDeposit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** VoteOption enum. */ - enum VoteOption { - VOTE_OPTION_UNSPECIFIED = 0, - VOTE_OPTION_YES = 1, - VOTE_OPTION_ABSTAIN = 2, - VOTE_OPTION_NO = 3, - VOTE_OPTION_NO_WITH_VETO = 4, - } - - /** Properties of a TextProposal. */ - interface ITextProposal { - /** TextProposal title */ - title?: string | null; - - /** TextProposal description */ - description?: string | null; - } - - /** Represents a TextProposal. */ - class TextProposal implements ITextProposal { - /** - * Constructs a new TextProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.gov.v1.ITextProposal); - - /** TextProposal title. */ - public title: string; - - /** TextProposal description. */ - public description: string; - - /** - * Creates a new TextProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns TextProposal instance - */ - public static create( - properties?: cosmos_sdk.x.gov.v1.ITextProposal, - ): cosmos_sdk.x.gov.v1.TextProposal; - - /** - * Encodes the specified TextProposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. - * @param message TextProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.gov.v1.ITextProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified TextProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TextProposal.verify|verify} messages. - * @param message TextProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.gov.v1.ITextProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a TextProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TextProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.gov.v1.TextProposal; - - /** - * Decodes a TextProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.gov.v1.TextProposal; - - /** - * Verifies a TextProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a TextProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextProposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.TextProposal; - - /** - * Creates a plain object from a TextProposal message. Also converts values to other types if specified. - * @param message TextProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.gov.v1.TextProposal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this TextProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Deposit. */ - interface IDeposit { - /** Deposit proposalId */ - proposalId?: number | Long | null; - - /** Deposit depositor */ - depositor?: Uint8Array | null; - - /** Deposit amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - } - - /** Represents a Deposit. */ - class Deposit implements IDeposit { - /** - * Constructs a new Deposit. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.gov.v1.IDeposit); - - /** Deposit proposalId. */ - public proposalId: number | Long; - - /** Deposit depositor. */ - public depositor: Uint8Array; - - /** Deposit amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** - * Creates a new Deposit instance using the specified properties. - * @param [properties] Properties to set - * @returns Deposit instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IDeposit): cosmos_sdk.x.gov.v1.Deposit; - - /** - * Encodes the specified Deposit message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. - * @param message Deposit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.gov.v1.IDeposit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Deposit message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Deposit.verify|verify} messages. - * @param message Deposit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.gov.v1.IDeposit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Deposit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Deposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.gov.v1.Deposit; - - /** - * Decodes a Deposit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Deposit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.gov.v1.Deposit; - - /** - * Verifies a Deposit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Deposit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Deposit - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Deposit; - - /** - * Creates a plain object from a Deposit message. Also converts values to other types if specified. - * @param message Deposit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.gov.v1.Deposit, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Deposit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Proposal. */ - interface IProposal { - /** Proposal proposalId */ - proposalId?: number | Long | null; - - /** Proposal content */ - content?: google.protobuf.IAny | null; - - /** Proposal status */ - status?: cosmos_sdk.x.gov.v1.ProposalStatus | null; - - /** Proposal finalTallyResult */ - finalTallyResult?: cosmos_sdk.x.gov.v1.ITallyResult | null; - - /** Proposal submitTime */ - submitTime?: google.protobuf.ITimestamp | null; - - /** Proposal depositEndTime */ - depositEndTime?: google.protobuf.ITimestamp | null; - - /** Proposal totalDeposit */ - totalDeposit?: cosmos_sdk.v1.ICoin[] | null; - - /** Proposal votingStartTime */ - votingStartTime?: google.protobuf.ITimestamp | null; - - /** Proposal votingEndTime */ - votingEndTime?: google.protobuf.ITimestamp | null; - } - - /** Represents a Proposal. */ - class Proposal implements IProposal { - /** - * Constructs a new Proposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.gov.v1.IProposal); - - /** Proposal proposalId. */ - public proposalId: number | Long; - - /** Proposal content. */ - public content?: google.protobuf.IAny | null; - - /** Proposal status. */ - public status: cosmos_sdk.x.gov.v1.ProposalStatus; - - /** Proposal finalTallyResult. */ - public finalTallyResult?: cosmos_sdk.x.gov.v1.ITallyResult | null; - - /** Proposal submitTime. */ - public submitTime?: google.protobuf.ITimestamp | null; - - /** Proposal depositEndTime. */ - public depositEndTime?: google.protobuf.ITimestamp | null; - - /** Proposal totalDeposit. */ - public totalDeposit: cosmos_sdk.v1.ICoin[]; - - /** Proposal votingStartTime. */ - public votingStartTime?: google.protobuf.ITimestamp | null; - - /** Proposal votingEndTime. */ - public votingEndTime?: google.protobuf.ITimestamp | null; - - /** - * Creates a new Proposal instance using the specified properties. - * @param [properties] Properties to set - * @returns Proposal instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IProposal): cosmos_sdk.x.gov.v1.Proposal; - - /** - * Encodes the specified Proposal message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. - * @param message Proposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.gov.v1.IProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Proposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Proposal.verify|verify} messages. - * @param message Proposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.gov.v1.IProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Proposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Proposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.gov.v1.Proposal; - - /** - * Decodes a Proposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Proposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.gov.v1.Proposal; - - /** - * Verifies a Proposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Proposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Proposal - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Proposal; - - /** - * Creates a plain object from a Proposal message. Also converts values to other types if specified. - * @param message Proposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.gov.v1.Proposal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Proposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** ProposalStatus enum. */ - enum ProposalStatus { - PROPOSAL_STATUS_UNSPECIFIED = 0, - PROPOSAL_STATUS_DEPOSIT_PERIOD = 1, - PROPOSAL_STATUS_VOTING_PERIOD = 2, - PROPOSAL_STATUS_PASSED = 3, - PROPOSAL_STATUS_REJECTED = 4, - PROPOSAL_STATUS_FAILED = 5, - } - - /** Properties of a TallyResult. */ - interface ITallyResult { - /** TallyResult yes */ - yes?: string | null; - - /** TallyResult abstain */ - abstain?: string | null; - - /** TallyResult no */ - no?: string | null; - - /** TallyResult noWithVeto */ - noWithVeto?: string | null; - } - - /** Represents a TallyResult. */ - class TallyResult implements ITallyResult { - /** - * Constructs a new TallyResult. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.gov.v1.ITallyResult); - - /** TallyResult yes. */ - public yes: string; - - /** TallyResult abstain. */ - public abstain: string; - - /** TallyResult no. */ - public no: string; - - /** TallyResult noWithVeto. */ - public noWithVeto: string; - - /** - * Creates a new TallyResult instance using the specified properties. - * @param [properties] Properties to set - * @returns TallyResult instance - */ - public static create( - properties?: cosmos_sdk.x.gov.v1.ITallyResult, - ): cosmos_sdk.x.gov.v1.TallyResult; - - /** - * Encodes the specified TallyResult message. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. - * @param message TallyResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.gov.v1.ITallyResult, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified TallyResult message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.TallyResult.verify|verify} messages. - * @param message TallyResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.gov.v1.ITallyResult, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a TallyResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TallyResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.gov.v1.TallyResult; - - /** - * Decodes a TallyResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TallyResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.gov.v1.TallyResult; - - /** - * Verifies a TallyResult message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a TallyResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TallyResult - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.TallyResult; - - /** - * Creates a plain object from a TallyResult message. Also converts values to other types if specified. - * @param message TallyResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.gov.v1.TallyResult, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this TallyResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Vote. */ - interface IVote { - /** Vote proposalId */ - proposalId?: number | Long | null; - - /** Vote voter */ - voter?: Uint8Array | null; - - /** Vote option */ - option?: cosmos_sdk.x.gov.v1.VoteOption | null; - } - - /** Represents a Vote. */ - class Vote implements IVote { - /** - * Constructs a new Vote. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.gov.v1.IVote); - - /** Vote proposalId. */ - public proposalId: number | Long; - - /** Vote voter. */ - public voter: Uint8Array; - - /** Vote option. */ - public option: cosmos_sdk.x.gov.v1.VoteOption; - - /** - * Creates a new Vote instance using the specified properties. - * @param [properties] Properties to set - * @returns Vote instance - */ - public static create(properties?: cosmos_sdk.x.gov.v1.IVote): cosmos_sdk.x.gov.v1.Vote; - - /** - * Encodes the specified Vote message. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. - * @param message Vote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.gov.v1.IVote, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Vote message, length delimited. Does not implicitly {@link cosmos_sdk.x.gov.v1.Vote.verify|verify} messages. - * @param message Vote message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.gov.v1.IVote, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Vote message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Vote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.gov.v1.Vote; - - /** - * Decodes a Vote message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Vote - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.gov.v1.Vote; - - /** - * Verifies a Vote message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Vote message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Vote - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.gov.v1.Vote; - - /** - * Creates a plain object from a Vote message. Also converts values to other types if specified. - * @param message Vote - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.gov.v1.Vote, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Vote to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace transfer. */ - namespace transfer { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgTransfer. */ - interface IMsgTransfer { - /** MsgTransfer sourcePort */ - sourcePort?: string | null; - - /** MsgTransfer sourceChannel */ - sourceChannel?: string | null; - - /** MsgTransfer amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - - /** MsgTransfer sender */ - sender?: Uint8Array | null; - - /** MsgTransfer receiver */ - receiver?: string | null; - - /** MsgTransfer timeoutHeight */ - timeoutHeight?: number | Long | null; - - /** MsgTransfer timeoutTimestamp */ - timeoutTimestamp?: number | Long | null; - } - - /** Represents a MsgTransfer. */ - class MsgTransfer implements IMsgTransfer { - /** - * Constructs a new MsgTransfer. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.transfer.v1.IMsgTransfer); - - /** MsgTransfer sourcePort. */ - public sourcePort: string; - - /** MsgTransfer sourceChannel. */ - public sourceChannel: string; - - /** MsgTransfer amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** MsgTransfer sender. */ - public sender: Uint8Array; - - /** MsgTransfer receiver. */ - public receiver: string; - - /** MsgTransfer timeoutHeight. */ - public timeoutHeight: number | Long; - - /** MsgTransfer timeoutTimestamp. */ - public timeoutTimestamp: number | Long; - - /** - * Creates a new MsgTransfer instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgTransfer instance - */ - public static create( - properties?: cosmos_sdk.x.transfer.v1.IMsgTransfer, - ): cosmos_sdk.x.transfer.v1.MsgTransfer; - - /** - * Encodes the specified MsgTransfer message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. - * @param message MsgTransfer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.transfer.v1.IMsgTransfer, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgTransfer message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.MsgTransfer.verify|verify} messages. - * @param message MsgTransfer message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.transfer.v1.IMsgTransfer, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgTransfer message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgTransfer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.transfer.v1.MsgTransfer; - - /** - * Decodes a MsgTransfer message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgTransfer - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.transfer.v1.MsgTransfer; - - /** - * Verifies a MsgTransfer message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgTransfer message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgTransfer - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.transfer.v1.MsgTransfer; - - /** - * Creates a plain object from a MsgTransfer message. Also converts values to other types if specified. - * @param message MsgTransfer - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.transfer.v1.MsgTransfer, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgTransfer to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FungibleTokenPacketData. */ - interface IFungibleTokenPacketData { - /** FungibleTokenPacketData amount */ - amount?: cosmos_sdk.v1.ICoin[] | null; - - /** FungibleTokenPacketData sender */ - sender?: string | null; - - /** FungibleTokenPacketData receiver */ - receiver?: string | null; - } - - /** Represents a FungibleTokenPacketData. */ - class FungibleTokenPacketData implements IFungibleTokenPacketData { - /** - * Constructs a new FungibleTokenPacketData. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData); - - /** FungibleTokenPacketData amount. */ - public amount: cosmos_sdk.v1.ICoin[]; - - /** FungibleTokenPacketData sender. */ - public sender: string; - - /** FungibleTokenPacketData receiver. */ - public receiver: string; - - /** - * Creates a new FungibleTokenPacketData instance using the specified properties. - * @param [properties] Properties to set - * @returns FungibleTokenPacketData instance - */ - public static create( - properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, - ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; - - /** - * Encodes the specified FungibleTokenPacketData message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. - * @param message FungibleTokenPacketData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified FungibleTokenPacketData message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketData.verify|verify} messages. - * @param message FungibleTokenPacketData message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketData, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a FungibleTokenPacketData message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FungibleTokenPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; - - /** - * Decodes a FungibleTokenPacketData message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FungibleTokenPacketData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; - - /** - * Verifies a FungibleTokenPacketData message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a FungibleTokenPacketData message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FungibleTokenPacketData - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.transfer.v1.FungibleTokenPacketData; - - /** - * Creates a plain object from a FungibleTokenPacketData message. Also converts values to other types if specified. - * @param message FungibleTokenPacketData - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.transfer.v1.FungibleTokenPacketData, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this FungibleTokenPacketData to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FungibleTokenPacketAcknowledgement. */ - interface IFungibleTokenPacketAcknowledgement { - /** FungibleTokenPacketAcknowledgement success */ - success?: boolean | null; - - /** FungibleTokenPacketAcknowledgement error */ - error?: string | null; - } - - /** Represents a FungibleTokenPacketAcknowledgement. */ - class FungibleTokenPacketAcknowledgement implements IFungibleTokenPacketAcknowledgement { - /** - * Constructs a new FungibleTokenPacketAcknowledgement. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement); - - /** FungibleTokenPacketAcknowledgement success. */ - public success: boolean; - - /** FungibleTokenPacketAcknowledgement error. */ - public error: string; - - /** - * Creates a new FungibleTokenPacketAcknowledgement instance using the specified properties. - * @param [properties] Properties to set - * @returns FungibleTokenPacketAcknowledgement instance - */ - public static create( - properties?: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, - ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; - - /** - * Encodes the specified FungibleTokenPacketAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. - * @param message FungibleTokenPacketAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified FungibleTokenPacketAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement.verify|verify} messages. - * @param message FungibleTokenPacketAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.transfer.v1.IFungibleTokenPacketAcknowledgement, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FungibleTokenPacketAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; - - /** - * Decodes a FungibleTokenPacketAcknowledgement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FungibleTokenPacketAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; - - /** - * Verifies a FungibleTokenPacketAcknowledgement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a FungibleTokenPacketAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FungibleTokenPacketAcknowledgement - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement; - - /** - * Creates a plain object from a FungibleTokenPacketAcknowledgement message. Also converts values to other types if specified. - * @param message FungibleTokenPacketAcknowledgement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.transfer.v1.FungibleTokenPacketAcknowledgement, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this FungibleTokenPacketAcknowledgement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace ibc. */ - namespace ibc { - /** Namespace connection. */ - namespace connection { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgConnectionOpenInit. */ - interface IMsgConnectionOpenInit { - /** MsgConnectionOpenInit clientId */ - clientId?: string | null; - - /** MsgConnectionOpenInit connectionId */ - connectionId?: string | null; - - /** MsgConnectionOpenInit counterparty */ - counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; - - /** MsgConnectionOpenInit signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgConnectionOpenInit. */ - class MsgConnectionOpenInit implements IMsgConnectionOpenInit { - /** - * Constructs a new MsgConnectionOpenInit. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit); - - /** MsgConnectionOpenInit clientId. */ - public clientId: string; - - /** MsgConnectionOpenInit connectionId. */ - public connectionId: string; - - /** MsgConnectionOpenInit counterparty. */ - public counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; - - /** MsgConnectionOpenInit signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgConnectionOpenInit instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgConnectionOpenInit instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; - - /** - * Encodes the specified MsgConnectionOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @param message MsgConnectionOpenInit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit.verify|verify} messages. - * @param message MsgConnectionOpenInit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenInit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenInit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgConnectionOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; - - /** - * Decodes a MsgConnectionOpenInit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; - - /** - * Verifies a MsgConnectionOpenInit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgConnectionOpenInit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenInit - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit; - - /** - * Creates a plain object from a MsgConnectionOpenInit message. Also converts values to other types if specified. - * @param message MsgConnectionOpenInit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenInit, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenInit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgConnectionOpenTry. */ - interface IMsgConnectionOpenTry { - /** MsgConnectionOpenTry clientId */ - clientId?: string | null; - - /** MsgConnectionOpenTry connectionId */ - connectionId?: string | null; - - /** MsgConnectionOpenTry counterparty */ - counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; - - /** MsgConnectionOpenTry counterpartyVersions */ - counterpartyVersions?: string[] | null; - - /** MsgConnectionOpenTry proofInit */ - proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenTry proofHeight */ - proofHeight?: number | Long | null; - - /** MsgConnectionOpenTry proofConsensus */ - proofConsensus?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenTry consensusHeight */ - consensusHeight?: number | Long | null; - - /** MsgConnectionOpenTry signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgConnectionOpenTry. */ - class MsgConnectionOpenTry implements IMsgConnectionOpenTry { - /** - * Constructs a new MsgConnectionOpenTry. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry); - - /** MsgConnectionOpenTry clientId. */ - public clientId: string; - - /** MsgConnectionOpenTry connectionId. */ - public connectionId: string; - - /** MsgConnectionOpenTry counterparty. */ - public counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; - - /** MsgConnectionOpenTry counterpartyVersions. */ - public counterpartyVersions: string[]; - - /** MsgConnectionOpenTry proofInit. */ - public proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenTry proofHeight. */ - public proofHeight: number | Long; - - /** MsgConnectionOpenTry proofConsensus. */ - public proofConsensus?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenTry consensusHeight. */ - public consensusHeight: number | Long; - - /** MsgConnectionOpenTry signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgConnectionOpenTry instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgConnectionOpenTry instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; - - /** - * Encodes the specified MsgConnectionOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @param message MsgConnectionOpenTry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry.verify|verify} messages. - * @param message MsgConnectionOpenTry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenTry, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenTry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgConnectionOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; - - /** - * Decodes a MsgConnectionOpenTry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; - - /** - * Verifies a MsgConnectionOpenTry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgConnectionOpenTry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenTry - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry; - - /** - * Creates a plain object from a MsgConnectionOpenTry message. Also converts values to other types if specified. - * @param message MsgConnectionOpenTry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenTry, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenTry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgConnectionOpenAck. */ - interface IMsgConnectionOpenAck { - /** MsgConnectionOpenAck connectionId */ - connectionId?: string | null; - - /** MsgConnectionOpenAck version */ - version?: string | null; - - /** MsgConnectionOpenAck proofTry */ - proofTry?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenAck proofHeight */ - proofHeight?: number | Long | null; - - /** MsgConnectionOpenAck proofConsensus */ - proofConsensus?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenAck consensusHeight */ - consensusHeight?: number | Long | null; - - /** MsgConnectionOpenAck signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgConnectionOpenAck. */ - class MsgConnectionOpenAck implements IMsgConnectionOpenAck { - /** - * Constructs a new MsgConnectionOpenAck. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck); - - /** MsgConnectionOpenAck connectionId. */ - public connectionId: string; - - /** MsgConnectionOpenAck version. */ - public version: string; - - /** MsgConnectionOpenAck proofTry. */ - public proofTry?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenAck proofHeight. */ - public proofHeight: number | Long; - - /** MsgConnectionOpenAck proofConsensus. */ - public proofConsensus?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenAck consensusHeight. */ - public consensusHeight: number | Long; - - /** MsgConnectionOpenAck signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgConnectionOpenAck instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgConnectionOpenAck instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; - - /** - * Encodes the specified MsgConnectionOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @param message MsgConnectionOpenAck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck.verify|verify} messages. - * @param message MsgConnectionOpenAck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenAck, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenAck message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgConnectionOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; - - /** - * Decodes a MsgConnectionOpenAck message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; - - /** - * Verifies a MsgConnectionOpenAck message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgConnectionOpenAck message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenAck - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck; - - /** - * Creates a plain object from a MsgConnectionOpenAck message. Also converts values to other types if specified. - * @param message MsgConnectionOpenAck - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenAck, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenAck to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgConnectionOpenConfirm. */ - interface IMsgConnectionOpenConfirm { - /** MsgConnectionOpenConfirm connectionId */ - connectionId?: string | null; - - /** MsgConnectionOpenConfirm proofAck */ - proofAck?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenConfirm proofHeight */ - proofHeight?: number | Long | null; - - /** MsgConnectionOpenConfirm signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgConnectionOpenConfirm. */ - class MsgConnectionOpenConfirm implements IMsgConnectionOpenConfirm { - /** - * Constructs a new MsgConnectionOpenConfirm. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm); - - /** MsgConnectionOpenConfirm connectionId. */ - public connectionId: string; - - /** MsgConnectionOpenConfirm proofAck. */ - public proofAck?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgConnectionOpenConfirm proofHeight. */ - public proofHeight: number | Long; - - /** MsgConnectionOpenConfirm signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgConnectionOpenConfirm instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgConnectionOpenConfirm instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; - - /** - * Encodes the specified MsgConnectionOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @param message MsgConnectionOpenConfirm message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgConnectionOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm.verify|verify} messages. - * @param message MsgConnectionOpenConfirm message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.connection.v1.IMsgConnectionOpenConfirm, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgConnectionOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; - - /** - * Decodes a MsgConnectionOpenConfirm message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgConnectionOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; - - /** - * Verifies a MsgConnectionOpenConfirm message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgConnectionOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgConnectionOpenConfirm - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm; - - /** - * Creates a plain object from a MsgConnectionOpenConfirm message. Also converts values to other types if specified. - * @param message MsgConnectionOpenConfirm - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.connection.v1.MsgConnectionOpenConfirm, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgConnectionOpenConfirm to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ConnectionEnd. */ - interface IConnectionEnd { - /** ConnectionEnd id */ - id?: string | null; - - /** ConnectionEnd clientId */ - clientId?: string | null; - - /** ConnectionEnd versions */ - versions?: string[] | null; - - /** ConnectionEnd state */ - state?: cosmos_sdk.x.ibc.connection.v1.State | null; - - /** ConnectionEnd counterparty */ - counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; - } - - /** Represents a ConnectionEnd. */ - class ConnectionEnd implements IConnectionEnd { - /** - * Constructs a new ConnectionEnd. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd); - - /** ConnectionEnd id. */ - public id: string; - - /** ConnectionEnd clientId. */ - public clientId: string; - - /** ConnectionEnd versions. */ - public versions: string[]; - - /** ConnectionEnd state. */ - public state: cosmos_sdk.x.ibc.connection.v1.State; - - /** ConnectionEnd counterparty. */ - public counterparty?: cosmos_sdk.x.ibc.connection.v1.ICounterparty | null; - - /** - * Creates a new ConnectionEnd instance using the specified properties. - * @param [properties] Properties to set - * @returns ConnectionEnd instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, - ): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; - - /** - * Encodes the specified ConnectionEnd message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. - * @param message ConnectionEnd message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ConnectionEnd message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ConnectionEnd.verify|verify} messages. - * @param message ConnectionEnd message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.connection.v1.IConnectionEnd, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ConnectionEnd message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConnectionEnd - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; - - /** - * Decodes a ConnectionEnd message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConnectionEnd - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; - - /** - * Verifies a ConnectionEnd message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ConnectionEnd message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConnectionEnd - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.connection.v1.ConnectionEnd; - - /** - * Creates a plain object from a ConnectionEnd message. Also converts values to other types if specified. - * @param message ConnectionEnd - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.connection.v1.ConnectionEnd, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ConnectionEnd to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** State enum. */ - enum State { - STATE_UNINITIALIZED_UNSPECIFIED = 0, - STATE_INIT = 1, - STATE_TRYOPEN = 2, - STATE_OPEN = 3, - } - - /** Properties of a Counterparty. */ - interface ICounterparty { - /** Counterparty clientId */ - clientId?: string | null; - - /** Counterparty connectionId */ - connectionId?: string | null; - - /** Counterparty prefix */ - prefix?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix | null; - } - - /** Represents a Counterparty. */ - class Counterparty implements ICounterparty { - /** - * Constructs a new Counterparty. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.ICounterparty); - - /** Counterparty clientId. */ - public clientId: string; - - /** Counterparty connectionId. */ - public connectionId: string; - - /** Counterparty prefix. */ - public prefix?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix | null; - - /** - * Creates a new Counterparty instance using the specified properties. - * @param [properties] Properties to set - * @returns Counterparty instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.connection.v1.ICounterparty, - ): cosmos_sdk.x.ibc.connection.v1.Counterparty; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. - * @param message Counterparty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.connection.v1.ICounterparty, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.Counterparty.verify|verify} messages. - * @param message Counterparty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.connection.v1.ICounterparty, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Counterparty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.connection.v1.Counterparty; - - /** - * Decodes a Counterparty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.connection.v1.Counterparty; - - /** - * Verifies a Counterparty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Counterparty - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.connection.v1.Counterparty; - - /** - * Creates a plain object from a Counterparty message. Also converts values to other types if specified. - * @param message Counterparty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.connection.v1.Counterparty, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Counterparty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ClientPaths. */ - interface IClientPaths { - /** ClientPaths paths */ - paths?: string[] | null; - } - - /** Represents a ClientPaths. */ - class ClientPaths implements IClientPaths { - /** - * Constructs a new ClientPaths. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.connection.v1.IClientPaths); - - /** ClientPaths paths. */ - public paths: string[]; - - /** - * Creates a new ClientPaths instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientPaths instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.connection.v1.IClientPaths, - ): cosmos_sdk.x.ibc.connection.v1.ClientPaths; - - /** - * Encodes the specified ClientPaths message. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. - * @param message ClientPaths message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.connection.v1.IClientPaths, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ClientPaths message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.connection.v1.ClientPaths.verify|verify} messages. - * @param message ClientPaths message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.connection.v1.IClientPaths, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ClientPaths message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.connection.v1.ClientPaths; - - /** - * Decodes a ClientPaths message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientPaths - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.connection.v1.ClientPaths; - - /** - * Verifies a ClientPaths message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ClientPaths message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientPaths - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.connection.v1.ClientPaths; - - /** - * Creates a plain object from a ClientPaths message. Also converts values to other types if specified. - * @param message ClientPaths - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.connection.v1.ClientPaths, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ClientPaths to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace channel. */ - namespace channel { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgChannelOpenInit. */ - interface IMsgChannelOpenInit { - /** MsgChannelOpenInit portId */ - portId?: string | null; - - /** MsgChannelOpenInit channelId */ - channelId?: string | null; - - /** MsgChannelOpenInit channel */ - channel?: cosmos_sdk.x.ibc.channel.v1.IChannel | null; - - /** MsgChannelOpenInit signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgChannelOpenInit. */ - class MsgChannelOpenInit implements IMsgChannelOpenInit { - /** - * Constructs a new MsgChannelOpenInit. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit); - - /** MsgChannelOpenInit portId. */ - public portId: string; - - /** MsgChannelOpenInit channelId. */ - public channelId: string; - - /** MsgChannelOpenInit channel. */ - public channel?: cosmos_sdk.x.ibc.channel.v1.IChannel | null; - - /** MsgChannelOpenInit signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelOpenInit instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelOpenInit instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; - - /** - * Encodes the specified MsgChannelOpenInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @param message MsgChannelOpenInit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit.verify|verify} messages. - * @param message MsgChannelOpenInit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenInit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenInit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; - - /** - * Decodes a MsgChannelOpenInit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; - - /** - * Verifies a MsgChannelOpenInit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgChannelOpenInit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenInit - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit; - - /** - * Creates a plain object from a MsgChannelOpenInit message. Also converts values to other types if specified. - * @param message MsgChannelOpenInit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenInit, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenInit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelOpenTry. */ - interface IMsgChannelOpenTry { - /** MsgChannelOpenTry portId */ - portId?: string | null; - - /** MsgChannelOpenTry channelId */ - channelId?: string | null; - - /** MsgChannelOpenTry channel */ - channel?: cosmos_sdk.x.ibc.channel.v1.IChannel | null; - - /** MsgChannelOpenTry counterpartyVersion */ - counterpartyVersion?: string | null; - - /** MsgChannelOpenTry proofInit */ - proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgChannelOpenTry proofHeight */ - proofHeight?: number | Long | null; - - /** MsgChannelOpenTry signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgChannelOpenTry. */ - class MsgChannelOpenTry implements IMsgChannelOpenTry { - /** - * Constructs a new MsgChannelOpenTry. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry); - - /** MsgChannelOpenTry portId. */ - public portId: string; - - /** MsgChannelOpenTry channelId. */ - public channelId: string; - - /** MsgChannelOpenTry channel. */ - public channel?: cosmos_sdk.x.ibc.channel.v1.IChannel | null; - - /** MsgChannelOpenTry counterpartyVersion. */ - public counterpartyVersion: string; - - /** MsgChannelOpenTry proofInit. */ - public proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgChannelOpenTry proofHeight. */ - public proofHeight: number | Long; - - /** MsgChannelOpenTry signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelOpenTry instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelOpenTry instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; - - /** - * Encodes the specified MsgChannelOpenTry message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @param message MsgChannelOpenTry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenTry message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry.verify|verify} messages. - * @param message MsgChannelOpenTry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenTry, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenTry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; - - /** - * Decodes a MsgChannelOpenTry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenTry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; - - /** - * Verifies a MsgChannelOpenTry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgChannelOpenTry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenTry - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry; - - /** - * Creates a plain object from a MsgChannelOpenTry message. Also converts values to other types if specified. - * @param message MsgChannelOpenTry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenTry, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenTry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelOpenAck. */ - interface IMsgChannelOpenAck { - /** MsgChannelOpenAck portId */ - portId?: string | null; - - /** MsgChannelOpenAck channelId */ - channelId?: string | null; - - /** MsgChannelOpenAck counterpartyVersion */ - counterpartyVersion?: string | null; - - /** MsgChannelOpenAck proofTry */ - proofTry?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgChannelOpenAck proofHeight */ - proofHeight?: number | Long | null; - - /** MsgChannelOpenAck signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgChannelOpenAck. */ - class MsgChannelOpenAck implements IMsgChannelOpenAck { - /** - * Constructs a new MsgChannelOpenAck. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck); - - /** MsgChannelOpenAck portId. */ - public portId: string; - - /** MsgChannelOpenAck channelId. */ - public channelId: string; - - /** MsgChannelOpenAck counterpartyVersion. */ - public counterpartyVersion: string; - - /** MsgChannelOpenAck proofTry. */ - public proofTry?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgChannelOpenAck proofHeight. */ - public proofHeight: number | Long; - - /** MsgChannelOpenAck signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelOpenAck instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelOpenAck instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; - - /** - * Encodes the specified MsgChannelOpenAck message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @param message MsgChannelOpenAck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenAck message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck.verify|verify} messages. - * @param message MsgChannelOpenAck message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenAck, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenAck message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; - - /** - * Decodes a MsgChannelOpenAck message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenAck - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; - - /** - * Verifies a MsgChannelOpenAck message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgChannelOpenAck message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenAck - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck; - - /** - * Creates a plain object from a MsgChannelOpenAck message. Also converts values to other types if specified. - * @param message MsgChannelOpenAck - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenAck, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenAck to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelOpenConfirm. */ - interface IMsgChannelOpenConfirm { - /** MsgChannelOpenConfirm portId */ - portId?: string | null; - - /** MsgChannelOpenConfirm channelId */ - channelId?: string | null; - - /** MsgChannelOpenConfirm proofAck */ - proofAck?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgChannelOpenConfirm proofHeight */ - proofHeight?: number | Long | null; - - /** MsgChannelOpenConfirm signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgChannelOpenConfirm. */ - class MsgChannelOpenConfirm implements IMsgChannelOpenConfirm { - /** - * Constructs a new MsgChannelOpenConfirm. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm); - - /** MsgChannelOpenConfirm portId. */ - public portId: string; - - /** MsgChannelOpenConfirm channelId. */ - public channelId: string; - - /** MsgChannelOpenConfirm proofAck. */ - public proofAck?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgChannelOpenConfirm proofHeight. */ - public proofHeight: number | Long; - - /** MsgChannelOpenConfirm signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelOpenConfirm instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelOpenConfirm instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; - - /** - * Encodes the specified MsgChannelOpenConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @param message MsgChannelOpenConfirm message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelOpenConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm.verify|verify} messages. - * @param message MsgChannelOpenConfirm message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelOpenConfirm, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; - - /** - * Decodes a MsgChannelOpenConfirm message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelOpenConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; - - /** - * Verifies a MsgChannelOpenConfirm message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgChannelOpenConfirm message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelOpenConfirm - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm; - - /** - * Creates a plain object from a MsgChannelOpenConfirm message. Also converts values to other types if specified. - * @param message MsgChannelOpenConfirm - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.MsgChannelOpenConfirm, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgChannelOpenConfirm to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelCloseInit. */ - interface IMsgChannelCloseInit { - /** MsgChannelCloseInit portId */ - portId?: string | null; - - /** MsgChannelCloseInit channelId */ - channelId?: string | null; - - /** MsgChannelCloseInit signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgChannelCloseInit. */ - class MsgChannelCloseInit implements IMsgChannelCloseInit { - /** - * Constructs a new MsgChannelCloseInit. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit); - - /** MsgChannelCloseInit portId. */ - public portId: string; - - /** MsgChannelCloseInit channelId. */ - public channelId: string; - - /** MsgChannelCloseInit signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelCloseInit instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelCloseInit instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; - - /** - * Encodes the specified MsgChannelCloseInit message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @param message MsgChannelCloseInit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelCloseInit message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit.verify|verify} messages. - * @param message MsgChannelCloseInit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseInit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgChannelCloseInit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelCloseInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; - - /** - * Decodes a MsgChannelCloseInit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelCloseInit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; - - /** - * Verifies a MsgChannelCloseInit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgChannelCloseInit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelCloseInit - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit; - - /** - * Creates a plain object from a MsgChannelCloseInit message. Also converts values to other types if specified. - * @param message MsgChannelCloseInit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseInit, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgChannelCloseInit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgChannelCloseConfirm. */ - interface IMsgChannelCloseConfirm { - /** MsgChannelCloseConfirm portId */ - portId?: string | null; - - /** MsgChannelCloseConfirm channelId */ - channelId?: string | null; - - /** MsgChannelCloseConfirm proofInit */ - proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgChannelCloseConfirm proofHeight */ - proofHeight?: number | Long | null; - - /** MsgChannelCloseConfirm signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgChannelCloseConfirm. */ - class MsgChannelCloseConfirm implements IMsgChannelCloseConfirm { - /** - * Constructs a new MsgChannelCloseConfirm. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm); - - /** MsgChannelCloseConfirm portId. */ - public portId: string; - - /** MsgChannelCloseConfirm channelId. */ - public channelId: string; - - /** MsgChannelCloseConfirm proofInit. */ - public proofInit?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgChannelCloseConfirm proofHeight. */ - public proofHeight: number | Long; - - /** MsgChannelCloseConfirm signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgChannelCloseConfirm instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgChannelCloseConfirm instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; - - /** - * Encodes the specified MsgChannelCloseConfirm message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @param message MsgChannelCloseConfirm message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgChannelCloseConfirm message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm.verify|verify} messages. - * @param message MsgChannelCloseConfirm message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IMsgChannelCloseConfirm, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgChannelCloseConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; - - /** - * Decodes a MsgChannelCloseConfirm message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgChannelCloseConfirm - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; - - /** - * Verifies a MsgChannelCloseConfirm message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgChannelCloseConfirm message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgChannelCloseConfirm - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm; - - /** - * Creates a plain object from a MsgChannelCloseConfirm message. Also converts values to other types if specified. - * @param message MsgChannelCloseConfirm - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.MsgChannelCloseConfirm, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgChannelCloseConfirm to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgPacket. */ - interface IMsgPacket { - /** MsgPacket packet */ - packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; - - /** MsgPacket proof */ - proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgPacket proofHeight */ - proofHeight?: number | Long | null; - - /** MsgPacket signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgPacket. */ - class MsgPacket implements IMsgPacket { - /** - * Constructs a new MsgPacket. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket); - - /** MsgPacket packet. */ - public packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; - - /** MsgPacket proof. */ - public proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgPacket proofHeight. */ - public proofHeight: number | Long; - - /** MsgPacket signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgPacket instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgPacket instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, - ): cosmos_sdk.x.ibc.channel.v1.MsgPacket; - - /** - * Encodes the specified MsgPacket message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. - * @param message MsgPacket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgPacket message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgPacket.verify|verify} messages. - * @param message MsgPacket message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IMsgPacket, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgPacket message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.MsgPacket; - - /** - * Decodes a MsgPacket message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgPacket - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.MsgPacket; - - /** - * Verifies a MsgPacket message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgPacket message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgPacket - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgPacket; - - /** - * Creates a plain object from a MsgPacket message. Also converts values to other types if specified. - * @param message MsgPacket - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.MsgPacket, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgPacket to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgTimeout. */ - interface IMsgTimeout { - /** MsgTimeout packet */ - packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; - - /** MsgTimeout proof */ - proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgTimeout proofHeight */ - proofHeight?: number | Long | null; - - /** MsgTimeout nextSequenceRecv */ - nextSequenceRecv?: number | Long | null; - - /** MsgTimeout signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgTimeout. */ - class MsgTimeout implements IMsgTimeout { - /** - * Constructs a new MsgTimeout. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout); - - /** MsgTimeout packet. */ - public packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; - - /** MsgTimeout proof. */ - public proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgTimeout proofHeight. */ - public proofHeight: number | Long; - - /** MsgTimeout nextSequenceRecv. */ - public nextSequenceRecv: number | Long; - - /** MsgTimeout signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgTimeout instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgTimeout instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, - ): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; - - /** - * Encodes the specified MsgTimeout message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. - * @param message MsgTimeout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgTimeout message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgTimeout.verify|verify} messages. - * @param message MsgTimeout message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IMsgTimeout, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgTimeout message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgTimeout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; - - /** - * Decodes a MsgTimeout message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgTimeout - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; - - /** - * Verifies a MsgTimeout message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgTimeout message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgTimeout - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.MsgTimeout; - - /** - * Creates a plain object from a MsgTimeout message. Also converts values to other types if specified. - * @param message MsgTimeout - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.MsgTimeout, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgTimeout to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgAcknowledgement. */ - interface IMsgAcknowledgement { - /** MsgAcknowledgement packet */ - packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; - - /** MsgAcknowledgement acknowledgement */ - acknowledgement?: Uint8Array | null; - - /** MsgAcknowledgement proof */ - proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgAcknowledgement proofHeight */ - proofHeight?: number | Long | null; - - /** MsgAcknowledgement signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgAcknowledgement. */ - class MsgAcknowledgement implements IMsgAcknowledgement { - /** - * Constructs a new MsgAcknowledgement. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement); - - /** MsgAcknowledgement packet. */ - public packet?: cosmos_sdk.x.ibc.channel.v1.IPacket | null; - - /** MsgAcknowledgement acknowledgement. */ - public acknowledgement: Uint8Array; - - /** MsgAcknowledgement proof. */ - public proof?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof | null; - - /** MsgAcknowledgement proofHeight. */ - public proofHeight: number | Long; - - /** MsgAcknowledgement signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgAcknowledgement instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgAcknowledgement instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, - ): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; - - /** - * Encodes the specified MsgAcknowledgement message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @param message MsgAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgAcknowledgement message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement.verify|verify} messages. - * @param message MsgAcknowledgement message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IMsgAcknowledgement, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgAcknowledgement message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; - - /** - * Decodes a MsgAcknowledgement message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgAcknowledgement - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; - - /** - * Verifies a MsgAcknowledgement message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgAcknowledgement message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgAcknowledgement - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement; - - /** - * Creates a plain object from a MsgAcknowledgement message. Also converts values to other types if specified. - * @param message MsgAcknowledgement - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.MsgAcknowledgement, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgAcknowledgement to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Channel. */ - interface IChannel { - /** Channel state */ - state?: cosmos_sdk.x.ibc.channel.v1.State | null; - - /** Channel ordering */ - ordering?: cosmos_sdk.x.ibc.channel.v1.Order | null; - - /** Channel counterparty */ - counterparty?: cosmos_sdk.x.ibc.channel.v1.ICounterparty | null; - - /** Channel connectionHops */ - connectionHops?: string[] | null; - - /** Channel version */ - version?: string | null; - } - - /** Represents a Channel. */ - class Channel implements IChannel { - /** - * Constructs a new Channel. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IChannel); - - /** Channel state. */ - public state: cosmos_sdk.x.ibc.channel.v1.State; - - /** Channel ordering. */ - public ordering: cosmos_sdk.x.ibc.channel.v1.Order; - - /** Channel counterparty. */ - public counterparty?: cosmos_sdk.x.ibc.channel.v1.ICounterparty | null; - - /** Channel connectionHops. */ - public connectionHops: string[]; - - /** Channel version. */ - public version: string; - - /** - * Creates a new Channel instance using the specified properties. - * @param [properties] Properties to set - * @returns Channel instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IChannel, - ): cosmos_sdk.x.ibc.channel.v1.Channel; - - /** - * Encodes the specified Channel message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. - * @param message Channel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IChannel, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Channel message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Channel.verify|verify} messages. - * @param message Channel message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IChannel, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Channel message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Channel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.Channel; - - /** - * Decodes a Channel message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Channel - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.Channel; - - /** - * Verifies a Channel message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Channel message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Channel - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Channel; - - /** - * Creates a plain object from a Channel message. Also converts values to other types if specified. - * @param message Channel - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.Channel, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Channel to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** State enum. */ - enum State { - STATE_UNINITIALIZED_UNSPECIFIED = 0, - STATE_INIT = 1, - STATE_TRYOPEN = 2, - STATE_OPEN = 3, - STATE_CLOSED = 4, - } - - /** Order enum. */ - enum Order { - ORDER_NONE_UNSPECIFIED = 0, - ORDER_UNORDERED = 1, - ORDER_ORDERED = 2, - } - - /** Properties of a Counterparty. */ - interface ICounterparty { - /** Counterparty portId */ - portId?: string | null; - - /** Counterparty channelId */ - channelId?: string | null; - } - - /** Represents a Counterparty. */ - class Counterparty implements ICounterparty { - /** - * Constructs a new Counterparty. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.ICounterparty); - - /** Counterparty portId. */ - public portId: string; - - /** Counterparty channelId. */ - public channelId: string; - - /** - * Creates a new Counterparty instance using the specified properties. - * @param [properties] Properties to set - * @returns Counterparty instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.ICounterparty, - ): cosmos_sdk.x.ibc.channel.v1.Counterparty; - - /** - * Encodes the specified Counterparty message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. - * @param message Counterparty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.ICounterparty, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Counterparty message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Counterparty.verify|verify} messages. - * @param message Counterparty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.ICounterparty, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Counterparty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.Counterparty; - - /** - * Decodes a Counterparty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Counterparty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.Counterparty; - - /** - * Verifies a Counterparty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Counterparty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Counterparty - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Counterparty; - - /** - * Creates a plain object from a Counterparty message. Also converts values to other types if specified. - * @param message Counterparty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.Counterparty, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Counterparty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Packet. */ - interface IPacket { - /** Packet sequence */ - sequence?: number | Long | null; - - /** Packet sourcePort */ - sourcePort?: string | null; - - /** Packet sourceChannel */ - sourceChannel?: string | null; - - /** Packet destinationPort */ - destinationPort?: string | null; - - /** Packet destinationChannel */ - destinationChannel?: string | null; - - /** Packet data */ - data?: Uint8Array | null; - - /** Packet timeoutHeight */ - timeoutHeight?: number | Long | null; - - /** Packet timeoutTimestamp */ - timeoutTimestamp?: number | Long | null; - } - - /** Represents a Packet. */ - class Packet implements IPacket { - /** - * Constructs a new Packet. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.channel.v1.IPacket); - - /** Packet sequence. */ - public sequence: number | Long; - - /** Packet sourcePort. */ - public sourcePort: string; - - /** Packet sourceChannel. */ - public sourceChannel: string; - - /** Packet destinationPort. */ - public destinationPort: string; - - /** Packet destinationChannel. */ - public destinationChannel: string; - - /** Packet data. */ - public data: Uint8Array; - - /** Packet timeoutHeight. */ - public timeoutHeight: number | Long; - - /** Packet timeoutTimestamp. */ - public timeoutTimestamp: number | Long; - - /** - * Creates a new Packet instance using the specified properties. - * @param [properties] Properties to set - * @returns Packet instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.channel.v1.IPacket, - ): cosmos_sdk.x.ibc.channel.v1.Packet; - - /** - * Encodes the specified Packet message. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. - * @param message Packet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.channel.v1.IPacket, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Packet message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.channel.v1.Packet.verify|verify} messages. - * @param message Packet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.channel.v1.IPacket, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Packet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Packet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.channel.v1.Packet; - - /** - * Decodes a Packet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Packet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.channel.v1.Packet; - - /** - * Verifies a Packet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Packet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Packet - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.channel.v1.Packet; - - /** - * Creates a plain object from a Packet message. Also converts values to other types if specified. - * @param message Packet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.channel.v1.Packet, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Packet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace commitment. */ - namespace commitment { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MerkleRoot. */ - interface IMerkleRoot { - /** MerkleRoot hash */ - hash?: Uint8Array | null; - } - - /** Represents a MerkleRoot. */ - class MerkleRoot implements IMerkleRoot { - /** - * Constructs a new MerkleRoot. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot); - - /** MerkleRoot hash. */ - public hash: Uint8Array; - - /** - * Creates a new MerkleRoot instance using the specified properties. - * @param [properties] Properties to set - * @returns MerkleRoot instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, - ): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; - - /** - * Encodes the specified MerkleRoot message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. - * @param message MerkleRoot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MerkleRoot message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleRoot.verify|verify} messages. - * @param message MerkleRoot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.commitment.v1.IMerkleRoot, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MerkleRoot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MerkleRoot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; - - /** - * Decodes a MerkleRoot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MerkleRoot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; - - /** - * Verifies a MerkleRoot message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MerkleRoot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MerkleRoot - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerkleRoot; - - /** - * Creates a plain object from a MerkleRoot message. Also converts values to other types if specified. - * @param message MerkleRoot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.commitment.v1.MerkleRoot, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MerkleRoot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MerklePrefix. */ - interface IMerklePrefix { - /** MerklePrefix keyPrefix */ - keyPrefix?: Uint8Array | null; - } - - /** Represents a MerklePrefix. */ - class MerklePrefix implements IMerklePrefix { - /** - * Constructs a new MerklePrefix. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix); - - /** MerklePrefix keyPrefix. */ - public keyPrefix: Uint8Array; - - /** - * Creates a new MerklePrefix instance using the specified properties. - * @param [properties] Properties to set - * @returns MerklePrefix instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, - ): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; - - /** - * Encodes the specified MerklePrefix message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. - * @param message MerklePrefix message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MerklePrefix message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePrefix.verify|verify} messages. - * @param message MerklePrefix message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.commitment.v1.IMerklePrefix, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MerklePrefix message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MerklePrefix - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; - - /** - * Decodes a MerklePrefix message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MerklePrefix - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; - - /** - * Verifies a MerklePrefix message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MerklePrefix message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MerklePrefix - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.commitment.v1.MerklePrefix; - - /** - * Creates a plain object from a MerklePrefix message. Also converts values to other types if specified. - * @param message MerklePrefix - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.commitment.v1.MerklePrefix, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MerklePrefix to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MerklePath. */ - interface IMerklePath { - /** MerklePath keyPath */ - keyPath?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath | null; - } - - /** Represents a MerklePath. */ - class MerklePath implements IMerklePath { - /** - * Constructs a new MerklePath. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath); - - /** MerklePath keyPath. */ - public keyPath?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath | null; - - /** - * Creates a new MerklePath instance using the specified properties. - * @param [properties] Properties to set - * @returns MerklePath instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, - ): cosmos_sdk.x.ibc.commitment.v1.MerklePath; - - /** - * Encodes the specified MerklePath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. - * @param message MerklePath message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MerklePath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerklePath.verify|verify} messages. - * @param message MerklePath message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.commitment.v1.IMerklePath, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MerklePath message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MerklePath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.commitment.v1.MerklePath; - - /** - * Decodes a MerklePath message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MerklePath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.commitment.v1.MerklePath; - - /** - * Verifies a MerklePath message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MerklePath message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MerklePath - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.MerklePath; - - /** - * Creates a plain object from a MerklePath message. Also converts values to other types if specified. - * @param message MerklePath - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.commitment.v1.MerklePath, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MerklePath to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MerkleProof. */ - interface IMerkleProof { - /** MerkleProof proof */ - proof?: tendermint.crypto.merkle.IProof | null; - } - - /** Represents a MerkleProof. */ - class MerkleProof implements IMerkleProof { - /** - * Constructs a new MerkleProof. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof); - - /** MerkleProof proof. */ - public proof?: tendermint.crypto.merkle.IProof | null; - - /** - * Creates a new MerkleProof instance using the specified properties. - * @param [properties] Properties to set - * @returns MerkleProof instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, - ): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; - - /** - * Encodes the specified MerkleProof message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. - * @param message MerkleProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MerkleProof message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.MerkleProof.verify|verify} messages. - * @param message MerkleProof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.commitment.v1.IMerkleProof, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MerkleProof message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MerkleProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; - - /** - * Decodes a MerkleProof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MerkleProof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; - - /** - * Verifies a MerkleProof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MerkleProof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MerkleProof - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.ibc.commitment.v1.MerkleProof; - - /** - * Creates a plain object from a MerkleProof message. Also converts values to other types if specified. - * @param message MerkleProof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.commitment.v1.MerkleProof, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MerkleProof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a KeyPath. */ - interface IKeyPath { - /** KeyPath keys */ - keys?: cosmos_sdk.x.ibc.commitment.v1.IKey[] | null; - } - - /** Represents a KeyPath. */ - class KeyPath implements IKeyPath { - /** - * Constructs a new KeyPath. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath); - - /** KeyPath keys. */ - public keys: cosmos_sdk.x.ibc.commitment.v1.IKey[]; - - /** - * Creates a new KeyPath instance using the specified properties. - * @param [properties] Properties to set - * @returns KeyPath instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, - ): cosmos_sdk.x.ibc.commitment.v1.KeyPath; - - /** - * Encodes the specified KeyPath message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. - * @param message KeyPath message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified KeyPath message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.KeyPath.verify|verify} messages. - * @param message KeyPath message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.commitment.v1.IKeyPath, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a KeyPath message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KeyPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.commitment.v1.KeyPath; - - /** - * Decodes a KeyPath message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KeyPath - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.commitment.v1.KeyPath; - - /** - * Verifies a KeyPath message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a KeyPath message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KeyPath - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.KeyPath; - - /** - * Creates a plain object from a KeyPath message. Also converts values to other types if specified. - * @param message KeyPath - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.commitment.v1.KeyPath, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this KeyPath to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Key. */ - interface IKey { - /** Key name */ - name?: Uint8Array | null; - - /** Key enc */ - enc?: cosmos_sdk.x.ibc.commitment.v1.KeyEncoding | null; - } - - /** Represents a Key. */ - class Key implements IKey { - /** - * Constructs a new Key. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.ibc.commitment.v1.IKey); - - /** Key name. */ - public name: Uint8Array; - - /** Key enc. */ - public enc: cosmos_sdk.x.ibc.commitment.v1.KeyEncoding; - - /** - * Creates a new Key instance using the specified properties. - * @param [properties] Properties to set - * @returns Key instance - */ - public static create( - properties?: cosmos_sdk.x.ibc.commitment.v1.IKey, - ): cosmos_sdk.x.ibc.commitment.v1.Key; - - /** - * Encodes the specified Key message. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. - * @param message Key message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.ibc.commitment.v1.IKey, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Key message, length delimited. Does not implicitly {@link cosmos_sdk.x.ibc.commitment.v1.Key.verify|verify} messages. - * @param message Key message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.ibc.commitment.v1.IKey, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Key message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Key - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.ibc.commitment.v1.Key; - - /** - * Decodes a Key message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Key - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.ibc.commitment.v1.Key; - - /** - * Verifies a Key message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Key message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Key - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.ibc.commitment.v1.Key; - - /** - * Creates a plain object from a Key message. Also converts values to other types if specified. - * @param message Key - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.ibc.commitment.v1.Key, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Key to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** KeyEncoding enum. */ - enum KeyEncoding { - KEY_ENCODING_URL_UNSPECIFIED = 0, - KEY_ENCODING_HEX = 1, - } - } - } - } - - /** Namespace mint. */ - namespace mint { - /** Namespace v1. */ - namespace v1 { - /** Properties of a Minter. */ - interface IMinter { - /** Minter inflation */ - inflation?: string | null; - - /** Minter annualProvisions */ - annualProvisions?: string | null; - } - - /** Represents a Minter. */ - class Minter implements IMinter { - /** - * Constructs a new Minter. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.mint.v1.IMinter); - - /** Minter inflation. */ - public inflation: string; - - /** Minter annualProvisions. */ - public annualProvisions: string; - - /** - * Creates a new Minter instance using the specified properties. - * @param [properties] Properties to set - * @returns Minter instance - */ - public static create(properties?: cosmos_sdk.x.mint.v1.IMinter): cosmos_sdk.x.mint.v1.Minter; - - /** - * Encodes the specified Minter message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. - * @param message Minter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.mint.v1.IMinter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Minter message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Minter.verify|verify} messages. - * @param message Minter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.mint.v1.IMinter, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Minter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Minter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.mint.v1.Minter; - - /** - * Decodes a Minter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Minter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.mint.v1.Minter; - - /** - * Verifies a Minter message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Minter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Minter - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.mint.v1.Minter; - - /** - * Creates a plain object from a Minter message. Also converts values to other types if specified. - * @param message Minter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.mint.v1.Minter, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Minter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - /** Params mintDenom */ - mintDenom?: string | null; - - /** Params inflationRateChange */ - inflationRateChange?: string | null; - - /** Params inflationMax */ - inflationMax?: string | null; - - /** Params inflationMin */ - inflationMin?: string | null; - - /** Params goalBonded */ - goalBonded?: string | null; - - /** Params blocksPerYear */ - blocksPerYear?: number | Long | null; - } - - /** Represents a Params. */ - class Params implements IParams { - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.mint.v1.IParams); - - /** Params mintDenom. */ - public mintDenom: string; - - /** Params inflationRateChange. */ - public inflationRateChange: string; - - /** Params inflationMax. */ - public inflationMax: string; - - /** Params inflationMin. */ - public inflationMin: string; - - /** Params goalBonded. */ - public goalBonded: string; - - /** Params blocksPerYear. */ - public blocksPerYear: number | Long; - - /** - * Creates a new Params instance using the specified properties. - * @param [properties] Properties to set - * @returns Params instance - */ - public static create(properties?: cosmos_sdk.x.mint.v1.IParams): cosmos_sdk.x.mint.v1.Params; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.mint.v1.IParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.mint.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.mint.v1.IParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Params message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.mint.v1.Params; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.mint.v1.Params; - - /** - * Verifies a Params message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Params - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.mint.v1.Params; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @param message Params - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.mint.v1.Params, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace params. */ - namespace params { - /** Namespace v1. */ - namespace v1 { - /** Properties of a ParameterChangeProposal. */ - interface IParameterChangeProposal { - /** ParameterChangeProposal title */ - title?: string | null; - - /** ParameterChangeProposal description */ - description?: string | null; - - /** ParameterChangeProposal changes */ - changes?: cosmos_sdk.x.params.v1.IParamChange[] | null; - } - - /** Represents a ParameterChangeProposal. */ - class ParameterChangeProposal implements IParameterChangeProposal { - /** - * Constructs a new ParameterChangeProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.params.v1.IParameterChangeProposal); - - /** ParameterChangeProposal title. */ - public title: string; - - /** ParameterChangeProposal description. */ - public description: string; - - /** ParameterChangeProposal changes. */ - public changes: cosmos_sdk.x.params.v1.IParamChange[]; - - /** - * Creates a new ParameterChangeProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns ParameterChangeProposal instance - */ - public static create( - properties?: cosmos_sdk.x.params.v1.IParameterChangeProposal, - ): cosmos_sdk.x.params.v1.ParameterChangeProposal; - - /** - * Encodes the specified ParameterChangeProposal message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. - * @param message ParameterChangeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.params.v1.IParameterChangeProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ParameterChangeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParameterChangeProposal.verify|verify} messages. - * @param message ParameterChangeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.params.v1.IParameterChangeProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ParameterChangeProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParameterChangeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.params.v1.ParameterChangeProposal; - - /** - * Decodes a ParameterChangeProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParameterChangeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.params.v1.ParameterChangeProposal; - - /** - * Verifies a ParameterChangeProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ParameterChangeProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParameterChangeProposal - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.params.v1.ParameterChangeProposal; - - /** - * Creates a plain object from a ParameterChangeProposal message. Also converts values to other types if specified. - * @param message ParameterChangeProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.params.v1.ParameterChangeProposal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ParameterChangeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ParamChange. */ - interface IParamChange { - /** ParamChange subspace */ - subspace?: string | null; - - /** ParamChange key */ - key?: string | null; - - /** ParamChange value */ - value?: string | null; - } - - /** Represents a ParamChange. */ - class ParamChange implements IParamChange { - /** - * Constructs a new ParamChange. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.params.v1.IParamChange); - - /** ParamChange subspace. */ - public subspace: string; - - /** ParamChange key. */ - public key: string; - - /** ParamChange value. */ - public value: string; - - /** - * Creates a new ParamChange instance using the specified properties. - * @param [properties] Properties to set - * @returns ParamChange instance - */ - public static create( - properties?: cosmos_sdk.x.params.v1.IParamChange, - ): cosmos_sdk.x.params.v1.ParamChange; - - /** - * Encodes the specified ParamChange message. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. - * @param message ParamChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.params.v1.IParamChange, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ParamChange message, length delimited. Does not implicitly {@link cosmos_sdk.x.params.v1.ParamChange.verify|verify} messages. - * @param message ParamChange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.params.v1.IParamChange, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ParamChange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ParamChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.params.v1.ParamChange; - - /** - * Decodes a ParamChange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ParamChange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.params.v1.ParamChange; - - /** - * Verifies a ParamChange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ParamChange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ParamChange - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.params.v1.ParamChange; - - /** - * Creates a plain object from a ParamChange message. Also converts values to other types if specified. - * @param message ParamChange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.params.v1.ParamChange, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ParamChange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace slashing. */ - namespace slashing { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgUnjail. */ - interface IMsgUnjail { - /** MsgUnjail validatorAddr */ - validatorAddr?: Uint8Array | null; - } - - /** Represents a MsgUnjail. */ - class MsgUnjail implements IMsgUnjail { - /** - * Constructs a new MsgUnjail. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.slashing.v1.IMsgUnjail); - - /** MsgUnjail validatorAddr. */ - public validatorAddr: Uint8Array; - - /** - * Creates a new MsgUnjail instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUnjail instance - */ - public static create( - properties?: cosmos_sdk.x.slashing.v1.IMsgUnjail, - ): cosmos_sdk.x.slashing.v1.MsgUnjail; - - /** - * Encodes the specified MsgUnjail message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. - * @param message MsgUnjail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.slashing.v1.IMsgUnjail, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgUnjail message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.MsgUnjail.verify|verify} messages. - * @param message MsgUnjail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.slashing.v1.IMsgUnjail, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUnjail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUnjail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.slashing.v1.MsgUnjail; - - /** - * Decodes a MsgUnjail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUnjail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.slashing.v1.MsgUnjail; - - /** - * Verifies a MsgUnjail message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgUnjail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUnjail - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.slashing.v1.MsgUnjail; - - /** - * Creates a plain object from a MsgUnjail message. Also converts values to other types if specified. - * @param message MsgUnjail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.slashing.v1.MsgUnjail, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgUnjail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ValidatorSigningInfo. */ - interface IValidatorSigningInfo { - /** ValidatorSigningInfo address */ - address?: Uint8Array | null; - - /** ValidatorSigningInfo startHeight */ - startHeight?: number | Long | null; - - /** ValidatorSigningInfo indexOffset */ - indexOffset?: number | Long | null; - - /** ValidatorSigningInfo jailedUntil */ - jailedUntil?: google.protobuf.ITimestamp | null; - - /** ValidatorSigningInfo tombstoned */ - tombstoned?: boolean | null; - - /** ValidatorSigningInfo missedBlocksCounter */ - missedBlocksCounter?: number | Long | null; - } - - /** Represents a ValidatorSigningInfo. */ - class ValidatorSigningInfo implements IValidatorSigningInfo { - /** - * Constructs a new ValidatorSigningInfo. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo); - - /** ValidatorSigningInfo address. */ - public address: Uint8Array; - - /** ValidatorSigningInfo startHeight. */ - public startHeight: number | Long; - - /** ValidatorSigningInfo indexOffset. */ - public indexOffset: number | Long; - - /** ValidatorSigningInfo jailedUntil. */ - public jailedUntil?: google.protobuf.ITimestamp | null; - - /** ValidatorSigningInfo tombstoned. */ - public tombstoned: boolean; - - /** ValidatorSigningInfo missedBlocksCounter. */ - public missedBlocksCounter: number | Long; - - /** - * Creates a new ValidatorSigningInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidatorSigningInfo instance - */ - public static create( - properties?: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, - ): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; - - /** - * Encodes the specified ValidatorSigningInfo message. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. - * @param message ValidatorSigningInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ValidatorSigningInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.slashing.v1.ValidatorSigningInfo.verify|verify} messages. - * @param message ValidatorSigningInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.slashing.v1.IValidatorSigningInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ValidatorSigningInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidatorSigningInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; - - /** - * Decodes a ValidatorSigningInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidatorSigningInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; - - /** - * Verifies a ValidatorSigningInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValidatorSigningInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorSigningInfo - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.slashing.v1.ValidatorSigningInfo; - - /** - * Creates a plain object from a ValidatorSigningInfo message. Also converts values to other types if specified. - * @param message ValidatorSigningInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.slashing.v1.ValidatorSigningInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValidatorSigningInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace staking. */ - namespace staking { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgCreateValidator. */ - interface IMsgCreateValidator { - /** MsgCreateValidator description */ - description?: cosmos_sdk.x.staking.v1.IDescription | null; - - /** MsgCreateValidator commission */ - commission?: cosmos_sdk.x.staking.v1.ICommissionRates | null; - - /** MsgCreateValidator minSelfDelegation */ - minSelfDelegation?: string | null; - - /** MsgCreateValidator delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** MsgCreateValidator validatorAddress */ - validatorAddress?: Uint8Array | null; - - /** MsgCreateValidator pubkey */ - pubkey?: string | null; - - /** MsgCreateValidator value */ - value?: cosmos_sdk.v1.ICoin | null; - } - - /** Represents a MsgCreateValidator. */ - class MsgCreateValidator implements IMsgCreateValidator { - /** - * Constructs a new MsgCreateValidator. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgCreateValidator); - - /** MsgCreateValidator description. */ - public description?: cosmos_sdk.x.staking.v1.IDescription | null; - - /** MsgCreateValidator commission. */ - public commission?: cosmos_sdk.x.staking.v1.ICommissionRates | null; - - /** MsgCreateValidator minSelfDelegation. */ - public minSelfDelegation: string; - - /** MsgCreateValidator delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgCreateValidator validatorAddress. */ - public validatorAddress: Uint8Array; - - /** MsgCreateValidator pubkey. */ - public pubkey: string; - - /** MsgCreateValidator value. */ - public value?: cosmos_sdk.v1.ICoin | null; - - /** - * Creates a new MsgCreateValidator instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgCreateValidator instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IMsgCreateValidator, - ): cosmos_sdk.x.staking.v1.MsgCreateValidator; - - /** - * Encodes the specified MsgCreateValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. - * @param message MsgCreateValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IMsgCreateValidator, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgCreateValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgCreateValidator.verify|verify} messages. - * @param message MsgCreateValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IMsgCreateValidator, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgCreateValidator message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgCreateValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.MsgCreateValidator; - - /** - * Decodes a MsgCreateValidator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgCreateValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.MsgCreateValidator; - - /** - * Verifies a MsgCreateValidator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgCreateValidator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgCreateValidator - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgCreateValidator; - - /** - * Creates a plain object from a MsgCreateValidator message. Also converts values to other types if specified. - * @param message MsgCreateValidator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.MsgCreateValidator, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgCreateValidator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgEditValidator. */ - interface IMsgEditValidator { - /** MsgEditValidator description */ - description?: cosmos_sdk.x.staking.v1.IDescription | null; - - /** MsgEditValidator validatorAddress */ - validatorAddress?: Uint8Array | null; - - /** MsgEditValidator commissionRate */ - commissionRate?: string | null; - - /** MsgEditValidator minSelfDelegation */ - minSelfDelegation?: string | null; - } - - /** Represents a MsgEditValidator. */ - class MsgEditValidator implements IMsgEditValidator { - /** - * Constructs a new MsgEditValidator. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgEditValidator); - - /** MsgEditValidator description. */ - public description?: cosmos_sdk.x.staking.v1.IDescription | null; - - /** MsgEditValidator validatorAddress. */ - public validatorAddress: Uint8Array; - - /** MsgEditValidator commissionRate. */ - public commissionRate: string; - - /** MsgEditValidator minSelfDelegation. */ - public minSelfDelegation: string; - - /** - * Creates a new MsgEditValidator instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgEditValidator instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IMsgEditValidator, - ): cosmos_sdk.x.staking.v1.MsgEditValidator; - - /** - * Encodes the specified MsgEditValidator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. - * @param message MsgEditValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IMsgEditValidator, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgEditValidator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgEditValidator.verify|verify} messages. - * @param message MsgEditValidator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IMsgEditValidator, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgEditValidator message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgEditValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.MsgEditValidator; - - /** - * Decodes a MsgEditValidator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgEditValidator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.MsgEditValidator; - - /** - * Verifies a MsgEditValidator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgEditValidator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgEditValidator - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgEditValidator; - - /** - * Creates a plain object from a MsgEditValidator message. Also converts values to other types if specified. - * @param message MsgEditValidator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.MsgEditValidator, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgEditValidator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgDelegate. */ - interface IMsgDelegate { - /** MsgDelegate delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** MsgDelegate validatorAddress */ - validatorAddress?: Uint8Array | null; - - /** MsgDelegate amount */ - amount?: cosmos_sdk.v1.ICoin | null; - } - - /** Represents a MsgDelegate. */ - class MsgDelegate implements IMsgDelegate { - /** - * Constructs a new MsgDelegate. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgDelegate); - - /** MsgDelegate delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgDelegate validatorAddress. */ - public validatorAddress: Uint8Array; - - /** MsgDelegate amount. */ - public amount?: cosmos_sdk.v1.ICoin | null; - - /** - * Creates a new MsgDelegate instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgDelegate instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IMsgDelegate, - ): cosmos_sdk.x.staking.v1.MsgDelegate; - - /** - * Encodes the specified MsgDelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. - * @param message MsgDelegate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IMsgDelegate, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgDelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgDelegate.verify|verify} messages. - * @param message MsgDelegate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IMsgDelegate, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgDelegate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgDelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.MsgDelegate; - - /** - * Decodes a MsgDelegate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgDelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.MsgDelegate; - - /** - * Verifies a MsgDelegate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgDelegate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgDelegate - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgDelegate; - - /** - * Creates a plain object from a MsgDelegate message. Also converts values to other types if specified. - * @param message MsgDelegate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.MsgDelegate, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgDelegate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgBeginRedelegate. */ - interface IMsgBeginRedelegate { - /** MsgBeginRedelegate delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** MsgBeginRedelegate validatorSrcAddress */ - validatorSrcAddress?: Uint8Array | null; - - /** MsgBeginRedelegate validatorDstAddress */ - validatorDstAddress?: Uint8Array | null; - - /** MsgBeginRedelegate amount */ - amount?: cosmos_sdk.v1.ICoin | null; - } - - /** Represents a MsgBeginRedelegate. */ - class MsgBeginRedelegate implements IMsgBeginRedelegate { - /** - * Constructs a new MsgBeginRedelegate. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate); - - /** MsgBeginRedelegate delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgBeginRedelegate validatorSrcAddress. */ - public validatorSrcAddress: Uint8Array; - - /** MsgBeginRedelegate validatorDstAddress. */ - public validatorDstAddress: Uint8Array; - - /** MsgBeginRedelegate amount. */ - public amount?: cosmos_sdk.v1.ICoin | null; - - /** - * Creates a new MsgBeginRedelegate instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgBeginRedelegate instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, - ): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; - - /** - * Encodes the specified MsgBeginRedelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. - * @param message MsgBeginRedelegate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgBeginRedelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgBeginRedelegate.verify|verify} messages. - * @param message MsgBeginRedelegate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IMsgBeginRedelegate, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgBeginRedelegate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgBeginRedelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; - - /** - * Decodes a MsgBeginRedelegate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgBeginRedelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; - - /** - * Verifies a MsgBeginRedelegate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgBeginRedelegate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgBeginRedelegate - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgBeginRedelegate; - - /** - * Creates a plain object from a MsgBeginRedelegate message. Also converts values to other types if specified. - * @param message MsgBeginRedelegate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.MsgBeginRedelegate, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgBeginRedelegate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MsgUndelegate. */ - interface IMsgUndelegate { - /** MsgUndelegate delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** MsgUndelegate validatorAddress */ - validatorAddress?: Uint8Array | null; - - /** MsgUndelegate amount */ - amount?: cosmos_sdk.v1.ICoin | null; - } - - /** Represents a MsgUndelegate. */ - class MsgUndelegate implements IMsgUndelegate { - /** - * Constructs a new MsgUndelegate. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IMsgUndelegate); - - /** MsgUndelegate delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** MsgUndelegate validatorAddress. */ - public validatorAddress: Uint8Array; - - /** MsgUndelegate amount. */ - public amount?: cosmos_sdk.v1.ICoin | null; - - /** - * Creates a new MsgUndelegate instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgUndelegate instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IMsgUndelegate, - ): cosmos_sdk.x.staking.v1.MsgUndelegate; - - /** - * Encodes the specified MsgUndelegate message. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. - * @param message MsgUndelegate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IMsgUndelegate, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgUndelegate message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.MsgUndelegate.verify|verify} messages. - * @param message MsgUndelegate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IMsgUndelegate, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgUndelegate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgUndelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.MsgUndelegate; - - /** - * Decodes a MsgUndelegate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgUndelegate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.MsgUndelegate; - - /** - * Verifies a MsgUndelegate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgUndelegate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgUndelegate - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.MsgUndelegate; - - /** - * Creates a plain object from a MsgUndelegate message. Also converts values to other types if specified. - * @param message MsgUndelegate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.MsgUndelegate, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgUndelegate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a HistoricalInfo. */ - interface IHistoricalInfo { - /** HistoricalInfo header */ - header?: tendermint.abci.types.IHeader | null; - - /** HistoricalInfo valset */ - valset?: cosmos_sdk.x.staking.v1.IValidator[] | null; - } - - /** Represents a HistoricalInfo. */ - class HistoricalInfo implements IHistoricalInfo { - /** - * Constructs a new HistoricalInfo. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IHistoricalInfo); - - /** HistoricalInfo header. */ - public header?: tendermint.abci.types.IHeader | null; - - /** HistoricalInfo valset. */ - public valset: cosmos_sdk.x.staking.v1.IValidator[]; - - /** - * Creates a new HistoricalInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns HistoricalInfo instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IHistoricalInfo, - ): cosmos_sdk.x.staking.v1.HistoricalInfo; - - /** - * Encodes the specified HistoricalInfo message. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. - * @param message HistoricalInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IHistoricalInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified HistoricalInfo message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.HistoricalInfo.verify|verify} messages. - * @param message HistoricalInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IHistoricalInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a HistoricalInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HistoricalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.HistoricalInfo; - - /** - * Decodes a HistoricalInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HistoricalInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.HistoricalInfo; - - /** - * Verifies a HistoricalInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a HistoricalInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HistoricalInfo - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.HistoricalInfo; - - /** - * Creates a plain object from a HistoricalInfo message. Also converts values to other types if specified. - * @param message HistoricalInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.HistoricalInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this HistoricalInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CommissionRates. */ - interface ICommissionRates { - /** CommissionRates rate */ - rate?: string | null; - - /** CommissionRates maxRate */ - maxRate?: string | null; - - /** CommissionRates maxChangeRate */ - maxChangeRate?: string | null; - } - - /** Represents a CommissionRates. */ - class CommissionRates implements ICommissionRates { - /** - * Constructs a new CommissionRates. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.ICommissionRates); - - /** CommissionRates rate. */ - public rate: string; - - /** CommissionRates maxRate. */ - public maxRate: string; - - /** CommissionRates maxChangeRate. */ - public maxChangeRate: string; - - /** - * Creates a new CommissionRates instance using the specified properties. - * @param [properties] Properties to set - * @returns CommissionRates instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.ICommissionRates, - ): cosmos_sdk.x.staking.v1.CommissionRates; - - /** - * Encodes the specified CommissionRates message. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. - * @param message CommissionRates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.ICommissionRates, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified CommissionRates message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.CommissionRates.verify|verify} messages. - * @param message CommissionRates message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.ICommissionRates, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a CommissionRates message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommissionRates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.CommissionRates; - - /** - * Decodes a CommissionRates message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommissionRates - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.CommissionRates; - - /** - * Verifies a CommissionRates message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a CommissionRates message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommissionRates - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.CommissionRates; - - /** - * Creates a plain object from a CommissionRates message. Also converts values to other types if specified. - * @param message CommissionRates - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.CommissionRates, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this CommissionRates to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Commission. */ - interface ICommission { - /** Commission commissionRates */ - commissionRates?: cosmos_sdk.x.staking.v1.ICommissionRates | null; - - /** Commission updateTime */ - updateTime?: google.protobuf.ITimestamp | null; - } - - /** Represents a Commission. */ - class Commission implements ICommission { - /** - * Constructs a new Commission. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.ICommission); - - /** Commission commissionRates. */ - public commissionRates?: cosmos_sdk.x.staking.v1.ICommissionRates | null; - - /** Commission updateTime. */ - public updateTime?: google.protobuf.ITimestamp | null; - - /** - * Creates a new Commission instance using the specified properties. - * @param [properties] Properties to set - * @returns Commission instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.ICommission, - ): cosmos_sdk.x.staking.v1.Commission; - - /** - * Encodes the specified Commission message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. - * @param message Commission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.ICommission, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Commission message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Commission.verify|verify} messages. - * @param message Commission message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.ICommission, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Commission message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Commission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.Commission; - - /** - * Decodes a Commission message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Commission - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.Commission; - - /** - * Verifies a Commission message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Commission message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Commission - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Commission; - - /** - * Creates a plain object from a Commission message. Also converts values to other types if specified. - * @param message Commission - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.Commission, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Commission to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Description. */ - interface IDescription { - /** Description moniker */ - moniker?: string | null; - - /** Description identity */ - identity?: string | null; - - /** Description website */ - website?: string | null; - - /** Description securityContact */ - securityContact?: string | null; - - /** Description details */ - details?: string | null; - } - - /** Represents a Description. */ - class Description implements IDescription { - /** - * Constructs a new Description. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDescription); - - /** Description moniker. */ - public moniker: string; - - /** Description identity. */ - public identity: string; - - /** Description website. */ - public website: string; - - /** Description securityContact. */ - public securityContact: string; - - /** Description details. */ - public details: string; - - /** - * Creates a new Description instance using the specified properties. - * @param [properties] Properties to set - * @returns Description instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IDescription, - ): cosmos_sdk.x.staking.v1.Description; - - /** - * Encodes the specified Description message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. - * @param message Description message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IDescription, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Description message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Description.verify|verify} messages. - * @param message Description message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IDescription, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Description message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Description - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.Description; - - /** - * Decodes a Description message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Description - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.Description; - - /** - * Verifies a Description message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Description message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Description - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Description; - - /** - * Creates a plain object from a Description message. Also converts values to other types if specified. - * @param message Description - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.Description, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Description to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Validator. */ - interface IValidator { - /** Validator operatorAddress */ - operatorAddress?: Uint8Array | null; - - /** Validator consensusPubkey */ - consensusPubkey?: string | null; - - /** Validator jailed */ - jailed?: boolean | null; - - /** Validator status */ - status?: number | null; - - /** Validator tokens */ - tokens?: string | null; - - /** Validator delegatorShares */ - delegatorShares?: string | null; - - /** Validator description */ - description?: cosmos_sdk.x.staking.v1.IDescription | null; - - /** Validator unbondingHeight */ - unbondingHeight?: number | Long | null; - - /** Validator unbondingTime */ - unbondingTime?: google.protobuf.ITimestamp | null; - - /** Validator commission */ - commission?: cosmos_sdk.x.staking.v1.ICommission | null; - - /** Validator minSelfDelegation */ - minSelfDelegation?: string | null; - } - - /** Represents a Validator. */ - class Validator implements IValidator { - /** - * Constructs a new Validator. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IValidator); - - /** Validator operatorAddress. */ - public operatorAddress: Uint8Array; - - /** Validator consensusPubkey. */ - public consensusPubkey: string; - - /** Validator jailed. */ - public jailed: boolean; - - /** Validator status. */ - public status: number; - - /** Validator tokens. */ - public tokens: string; - - /** Validator delegatorShares. */ - public delegatorShares: string; - - /** Validator description. */ - public description?: cosmos_sdk.x.staking.v1.IDescription | null; - - /** Validator unbondingHeight. */ - public unbondingHeight: number | Long; - - /** Validator unbondingTime. */ - public unbondingTime?: google.protobuf.ITimestamp | null; - - /** Validator commission. */ - public commission?: cosmos_sdk.x.staking.v1.ICommission | null; - - /** Validator minSelfDelegation. */ - public minSelfDelegation: string; - - /** - * Creates a new Validator instance using the specified properties. - * @param [properties] Properties to set - * @returns Validator instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IValidator, - ): cosmos_sdk.x.staking.v1.Validator; - - /** - * Encodes the specified Validator message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. - * @param message Validator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IValidator, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Validator.verify|verify} messages. - * @param message Validator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IValidator, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Validator message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] 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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.Validator; - - /** - * Decodes a Validator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.Validator; - - /** - * Verifies a Validator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Validator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Validator - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Validator; - - /** - * Creates a plain object from a Validator message. Also converts values to other types if specified. - * @param message Validator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.Validator, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Validator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DVPair. */ - interface IDVPair { - /** DVPair delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** DVPair validatorAddress */ - validatorAddress?: Uint8Array | null; - } - - /** Represents a DVPair. */ - class DVPair implements IDVPair { - /** - * Constructs a new DVPair. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDVPair); - - /** DVPair delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** DVPair validatorAddress. */ - public validatorAddress: Uint8Array; - - /** - * Creates a new DVPair instance using the specified properties. - * @param [properties] Properties to set - * @returns DVPair instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IDVPair): cosmos_sdk.x.staking.v1.DVPair; - - /** - * Encodes the specified DVPair message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. - * @param message DVPair message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IDVPair, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DVPair message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPair.verify|verify} messages. - * @param message DVPair message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IDVPair, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DVPair message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DVPair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.DVPair; - - /** - * Decodes a DVPair message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DVPair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.DVPair; - - /** - * Verifies a DVPair message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a DVPair message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DVPair - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVPair; - - /** - * Creates a plain object from a DVPair message. Also converts values to other types if specified. - * @param message DVPair - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.DVPair, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DVPair to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DVPairs. */ - interface IDVPairs { - /** DVPairs pairs */ - pairs?: cosmos_sdk.x.staking.v1.IDVPair[] | null; - } - - /** Represents a DVPairs. */ - class DVPairs implements IDVPairs { - /** - * Constructs a new DVPairs. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDVPairs); - - /** DVPairs pairs. */ - public pairs: cosmos_sdk.x.staking.v1.IDVPair[]; - - /** - * Creates a new DVPairs instance using the specified properties. - * @param [properties] Properties to set - * @returns DVPairs instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IDVPairs, - ): cosmos_sdk.x.staking.v1.DVPairs; - - /** - * Encodes the specified DVPairs message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. - * @param message DVPairs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IDVPairs, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DVPairs message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVPairs.verify|verify} messages. - * @param message DVPairs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IDVPairs, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DVPairs message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DVPairs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.DVPairs; - - /** - * Decodes a DVPairs message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DVPairs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.DVPairs; - - /** - * Verifies a DVPairs message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a DVPairs message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DVPairs - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVPairs; - - /** - * Creates a plain object from a DVPairs message. Also converts values to other types if specified. - * @param message DVPairs - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.DVPairs, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DVPairs to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DVVTriplet. */ - interface IDVVTriplet { - /** DVVTriplet delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** DVVTriplet validatorSrcAddress */ - validatorSrcAddress?: Uint8Array | null; - - /** DVVTriplet validatorDstAddress */ - validatorDstAddress?: Uint8Array | null; - } - - /** Represents a DVVTriplet. */ - class DVVTriplet implements IDVVTriplet { - /** - * Constructs a new DVVTriplet. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDVVTriplet); - - /** DVVTriplet delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** DVVTriplet validatorSrcAddress. */ - public validatorSrcAddress: Uint8Array; - - /** DVVTriplet validatorDstAddress. */ - public validatorDstAddress: Uint8Array; - - /** - * Creates a new DVVTriplet instance using the specified properties. - * @param [properties] Properties to set - * @returns DVVTriplet instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IDVVTriplet, - ): cosmos_sdk.x.staking.v1.DVVTriplet; - - /** - * Encodes the specified DVVTriplet message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. - * @param message DVVTriplet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IDVVTriplet, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DVVTriplet message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplet.verify|verify} messages. - * @param message DVVTriplet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IDVVTriplet, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DVVTriplet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DVVTriplet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.DVVTriplet; - - /** - * Decodes a DVVTriplet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DVVTriplet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.DVVTriplet; - - /** - * Verifies a DVVTriplet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a DVVTriplet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DVVTriplet - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVVTriplet; - - /** - * Creates a plain object from a DVVTriplet message. Also converts values to other types if specified. - * @param message DVVTriplet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.DVVTriplet, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DVVTriplet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DVVTriplets. */ - interface IDVVTriplets { - /** DVVTriplets triplets */ - triplets?: cosmos_sdk.x.staking.v1.IDVVTriplet[] | null; - } - - /** Represents a DVVTriplets. */ - class DVVTriplets implements IDVVTriplets { - /** - * Constructs a new DVVTriplets. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDVVTriplets); - - /** DVVTriplets triplets. */ - public triplets: cosmos_sdk.x.staking.v1.IDVVTriplet[]; - - /** - * Creates a new DVVTriplets instance using the specified properties. - * @param [properties] Properties to set - * @returns DVVTriplets instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IDVVTriplets, - ): cosmos_sdk.x.staking.v1.DVVTriplets; - - /** - * Encodes the specified DVVTriplets message. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. - * @param message DVVTriplets message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IDVVTriplets, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DVVTriplets message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.DVVTriplets.verify|verify} messages. - * @param message DVVTriplets message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IDVVTriplets, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DVVTriplets message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DVVTriplets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.DVVTriplets; - - /** - * Decodes a DVVTriplets message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DVVTriplets - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.DVVTriplets; - - /** - * Verifies a DVVTriplets message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a DVVTriplets message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DVVTriplets - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.DVVTriplets; - - /** - * Creates a plain object from a DVVTriplets message. Also converts values to other types if specified. - * @param message DVVTriplets - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.DVVTriplets, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DVVTriplets to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Delegation. */ - interface IDelegation { - /** Delegation delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** Delegation validatorAddress */ - validatorAddress?: Uint8Array | null; - - /** Delegation shares */ - shares?: string | null; - } - - /** Represents a Delegation. */ - class Delegation implements IDelegation { - /** - * Constructs a new Delegation. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IDelegation); - - /** Delegation delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** Delegation validatorAddress. */ - public validatorAddress: Uint8Array; - - /** Delegation shares. */ - public shares: string; - - /** - * Creates a new Delegation instance using the specified properties. - * @param [properties] Properties to set - * @returns Delegation instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IDelegation, - ): cosmos_sdk.x.staking.v1.Delegation; - - /** - * Encodes the specified Delegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. - * @param message Delegation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IDelegation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Delegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Delegation.verify|verify} messages. - * @param message Delegation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IDelegation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Delegation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Delegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.Delegation; - - /** - * Decodes a Delegation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Delegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.Delegation; - - /** - * Verifies a Delegation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Delegation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Delegation - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Delegation; - - /** - * Creates a plain object from a Delegation message. Also converts values to other types if specified. - * @param message Delegation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.Delegation, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Delegation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UnbondingDelegation. */ - interface IUnbondingDelegation { - /** UnbondingDelegation delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** UnbondingDelegation validatorAddress */ - validatorAddress?: Uint8Array | null; - - /** UnbondingDelegation entries */ - entries?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry[] | null; - } - - /** Represents an UnbondingDelegation. */ - class UnbondingDelegation implements IUnbondingDelegation { - /** - * Constructs a new UnbondingDelegation. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegation); - - /** UnbondingDelegation delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** UnbondingDelegation validatorAddress. */ - public validatorAddress: Uint8Array; - - /** UnbondingDelegation entries. */ - public entries: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry[]; - - /** - * Creates a new UnbondingDelegation instance using the specified properties. - * @param [properties] Properties to set - * @returns UnbondingDelegation instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegation, - ): cosmos_sdk.x.staking.v1.UnbondingDelegation; - - /** - * Encodes the specified UnbondingDelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. - * @param message UnbondingDelegation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IUnbondingDelegation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UnbondingDelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegation.verify|verify} messages. - * @param message UnbondingDelegation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IUnbondingDelegation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UnbondingDelegation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnbondingDelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.UnbondingDelegation; - - /** - * Decodes an UnbondingDelegation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnbondingDelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.UnbondingDelegation; - - /** - * Verifies an UnbondingDelegation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an UnbondingDelegation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnbondingDelegation - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.UnbondingDelegation; - - /** - * Creates a plain object from an UnbondingDelegation message. Also converts values to other types if specified. - * @param message UnbondingDelegation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.UnbondingDelegation, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UnbondingDelegation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UnbondingDelegationEntry. */ - interface IUnbondingDelegationEntry { - /** UnbondingDelegationEntry creationHeight */ - creationHeight?: number | Long | null; - - /** UnbondingDelegationEntry completionTime */ - completionTime?: google.protobuf.ITimestamp | null; - - /** UnbondingDelegationEntry initialBalance */ - initialBalance?: string | null; - - /** UnbondingDelegationEntry balance */ - balance?: string | null; - } - - /** Represents an UnbondingDelegationEntry. */ - class UnbondingDelegationEntry implements IUnbondingDelegationEntry { - /** - * Constructs a new UnbondingDelegationEntry. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry); - - /** UnbondingDelegationEntry creationHeight. */ - public creationHeight: number | Long; - - /** UnbondingDelegationEntry completionTime. */ - public completionTime?: google.protobuf.ITimestamp | null; - - /** UnbondingDelegationEntry initialBalance. */ - public initialBalance: string; - - /** UnbondingDelegationEntry balance. */ - public balance: string; - - /** - * Creates a new UnbondingDelegationEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns UnbondingDelegationEntry instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, - ): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; - - /** - * Encodes the specified UnbondingDelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. - * @param message UnbondingDelegationEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UnbondingDelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.UnbondingDelegationEntry.verify|verify} messages. - * @param message UnbondingDelegationEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IUnbondingDelegationEntry, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UnbondingDelegationEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnbondingDelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; - - /** - * Decodes an UnbondingDelegationEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnbondingDelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; - - /** - * Verifies an UnbondingDelegationEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an UnbondingDelegationEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnbondingDelegationEntry - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.staking.v1.UnbondingDelegationEntry; - - /** - * Creates a plain object from an UnbondingDelegationEntry message. Also converts values to other types if specified. - * @param message UnbondingDelegationEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.UnbondingDelegationEntry, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UnbondingDelegationEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a RedelegationEntry. */ - interface IRedelegationEntry { - /** RedelegationEntry creationHeight */ - creationHeight?: number | Long | null; - - /** RedelegationEntry completionTime */ - completionTime?: google.protobuf.ITimestamp | null; - - /** RedelegationEntry initialBalance */ - initialBalance?: string | null; - - /** RedelegationEntry sharesDst */ - sharesDst?: string | null; - } - - /** Represents a RedelegationEntry. */ - class RedelegationEntry implements IRedelegationEntry { - /** - * Constructs a new RedelegationEntry. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IRedelegationEntry); - - /** RedelegationEntry creationHeight. */ - public creationHeight: number | Long; - - /** RedelegationEntry completionTime. */ - public completionTime?: google.protobuf.ITimestamp | null; - - /** RedelegationEntry initialBalance. */ - public initialBalance: string; - - /** RedelegationEntry sharesDst. */ - public sharesDst: string; - - /** - * Creates a new RedelegationEntry instance using the specified properties. - * @param [properties] Properties to set - * @returns RedelegationEntry instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IRedelegationEntry, - ): cosmos_sdk.x.staking.v1.RedelegationEntry; - - /** - * Encodes the specified RedelegationEntry message. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. - * @param message RedelegationEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IRedelegationEntry, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RedelegationEntry message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.RedelegationEntry.verify|verify} messages. - * @param message RedelegationEntry message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IRedelegationEntry, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a RedelegationEntry message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.RedelegationEntry; - - /** - * Decodes a RedelegationEntry message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedelegationEntry - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.RedelegationEntry; - - /** - * Verifies a RedelegationEntry message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RedelegationEntry message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedelegationEntry - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.RedelegationEntry; - - /** - * Creates a plain object from a RedelegationEntry message. Also converts values to other types if specified. - * @param message RedelegationEntry - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.RedelegationEntry, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RedelegationEntry to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Redelegation. */ - interface IRedelegation { - /** Redelegation delegatorAddress */ - delegatorAddress?: Uint8Array | null; - - /** Redelegation validatorSrcAddress */ - validatorSrcAddress?: Uint8Array | null; - - /** Redelegation validatorDstAddress */ - validatorDstAddress?: Uint8Array | null; - - /** Redelegation entries */ - entries?: cosmos_sdk.x.staking.v1.IRedelegationEntry[] | null; - } - - /** Represents a Redelegation. */ - class Redelegation implements IRedelegation { - /** - * Constructs a new Redelegation. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IRedelegation); - - /** Redelegation delegatorAddress. */ - public delegatorAddress: Uint8Array; - - /** Redelegation validatorSrcAddress. */ - public validatorSrcAddress: Uint8Array; - - /** Redelegation validatorDstAddress. */ - public validatorDstAddress: Uint8Array; - - /** Redelegation entries. */ - public entries: cosmos_sdk.x.staking.v1.IRedelegationEntry[]; - - /** - * Creates a new Redelegation instance using the specified properties. - * @param [properties] Properties to set - * @returns Redelegation instance - */ - public static create( - properties?: cosmos_sdk.x.staking.v1.IRedelegation, - ): cosmos_sdk.x.staking.v1.Redelegation; - - /** - * Encodes the specified Redelegation message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. - * @param message Redelegation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IRedelegation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Redelegation message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Redelegation.verify|verify} messages. - * @param message Redelegation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IRedelegation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Redelegation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Redelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.Redelegation; - - /** - * Decodes a Redelegation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Redelegation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.Redelegation; - - /** - * Verifies a Redelegation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Redelegation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Redelegation - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Redelegation; - - /** - * Creates a plain object from a Redelegation message. Also converts values to other types if specified. - * @param message Redelegation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.Redelegation, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Redelegation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a Params. */ - interface IParams { - /** Params unbondingTime */ - unbondingTime?: google.protobuf.IDuration | null; - - /** Params maxValidators */ - maxValidators?: number | null; - - /** Params maxEntries */ - maxEntries?: number | null; - - /** Params historicalEntries */ - historicalEntries?: number | null; - - /** Params bondDenom */ - bondDenom?: string | null; - } - - /** Represents a Params. */ - class Params implements IParams { - /** - * Constructs a new Params. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.staking.v1.IParams); - - /** Params unbondingTime. */ - public unbondingTime?: google.protobuf.IDuration | null; - - /** Params maxValidators. */ - public maxValidators: number; - - /** Params maxEntries. */ - public maxEntries: number; - - /** Params historicalEntries. */ - public historicalEntries: number; - - /** Params bondDenom. */ - public bondDenom: string; - - /** - * Creates a new Params instance using the specified properties. - * @param [properties] Properties to set - * @returns Params instance - */ - public static create(properties?: cosmos_sdk.x.staking.v1.IParams): cosmos_sdk.x.staking.v1.Params; - - /** - * Encodes the specified Params message. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.staking.v1.IParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Params message, length delimited. Does not implicitly {@link cosmos_sdk.x.staking.v1.Params.verify|verify} messages. - * @param message Params message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.staking.v1.IParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Params message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.staking.v1.Params; - - /** - * Decodes a Params message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Params - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.staking.v1.Params; - - /** - * Verifies a Params message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Params message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Params - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.staking.v1.Params; - - /** - * Creates a plain object from a Params message. Also converts values to other types if specified. - * @param message Params - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.staking.v1.Params, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Params to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - - /** Namespace upgrade. */ - namespace upgrade { - /** Namespace v1. */ - namespace v1 { - /** Properties of a Plan. */ - interface IPlan { - /** Plan name */ - name?: string | null; - - /** Plan time */ - time?: google.protobuf.ITimestamp | null; - - /** Plan height */ - height?: number | Long | null; - - /** Plan info */ - info?: string | null; - } - - /** Represents a Plan. */ - class Plan implements IPlan { - /** - * Constructs a new Plan. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.upgrade.v1.IPlan); - - /** Plan name. */ - public name: string; - - /** Plan time. */ - public time?: google.protobuf.ITimestamp | null; - - /** Plan height. */ - public height: number | Long; - - /** Plan info. */ - public info: string; - - /** - * Creates a new Plan instance using the specified properties. - * @param [properties] Properties to set - * @returns Plan instance - */ - public static create(properties?: cosmos_sdk.x.upgrade.v1.IPlan): cosmos_sdk.x.upgrade.v1.Plan; - - /** - * Encodes the specified Plan message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. - * @param message Plan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.upgrade.v1.IPlan, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Plan message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.Plan.verify|verify} messages. - * @param message Plan message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.upgrade.v1.IPlan, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Plan message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Plan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.upgrade.v1.Plan; - - /** - * Decodes a Plan message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Plan - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): cosmos_sdk.x.upgrade.v1.Plan; - - /** - * Verifies a Plan message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Plan message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Plan - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.x.upgrade.v1.Plan; - - /** - * Creates a plain object from a Plan message. Also converts values to other types if specified. - * @param message Plan - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.upgrade.v1.Plan, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Plan to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a SoftwareUpgradeProposal. */ - interface ISoftwareUpgradeProposal { - /** SoftwareUpgradeProposal title */ - title?: string | null; - - /** SoftwareUpgradeProposal description */ - description?: string | null; - - /** SoftwareUpgradeProposal plan */ - plan?: cosmos_sdk.x.upgrade.v1.IPlan | null; - } - - /** Represents a SoftwareUpgradeProposal. */ - class SoftwareUpgradeProposal implements ISoftwareUpgradeProposal { - /** - * Constructs a new SoftwareUpgradeProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal); - - /** SoftwareUpgradeProposal title. */ - public title: string; - - /** SoftwareUpgradeProposal description. */ - public description: string; - - /** SoftwareUpgradeProposal plan. */ - public plan?: cosmos_sdk.x.upgrade.v1.IPlan | null; - - /** - * Creates a new SoftwareUpgradeProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns SoftwareUpgradeProposal instance - */ - public static create( - properties?: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, - ): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; - - /** - * Encodes the specified SoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. - * @param message SoftwareUpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal.verify|verify} messages. - * @param message SoftwareUpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.upgrade.v1.ISoftwareUpgradeProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; - - /** - * Decodes a SoftwareUpgradeProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; - - /** - * Verifies a SoftwareUpgradeProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a SoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SoftwareUpgradeProposal - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal; - - /** - * Creates a plain object from a SoftwareUpgradeProposal message. Also converts values to other types if specified. - * @param message SoftwareUpgradeProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.upgrade.v1.SoftwareUpgradeProposal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SoftwareUpgradeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a CancelSoftwareUpgradeProposal. */ - interface ICancelSoftwareUpgradeProposal { - /** CancelSoftwareUpgradeProposal title */ - title?: string | null; - - /** CancelSoftwareUpgradeProposal description */ - description?: string | null; - } - - /** Represents a CancelSoftwareUpgradeProposal. */ - class CancelSoftwareUpgradeProposal implements ICancelSoftwareUpgradeProposal { - /** - * Constructs a new CancelSoftwareUpgradeProposal. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal); - - /** CancelSoftwareUpgradeProposal title. */ - public title: string; - - /** CancelSoftwareUpgradeProposal description. */ - public description: string; - - /** - * Creates a new CancelSoftwareUpgradeProposal instance using the specified properties. - * @param [properties] Properties to set - * @returns CancelSoftwareUpgradeProposal instance - */ - public static create( - properties?: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, - ): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @param message CancelSoftwareUpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified CancelSoftwareUpgradeProposal message, length delimited. Does not implicitly {@link cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal.verify|verify} messages. - * @param message CancelSoftwareUpgradeProposal message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.x.upgrade.v1.ICancelSoftwareUpgradeProposal, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CancelSoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; - - /** - * Decodes a CancelSoftwareUpgradeProposal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CancelSoftwareUpgradeProposal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; - - /** - * Verifies a CancelSoftwareUpgradeProposal message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a CancelSoftwareUpgradeProposal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CancelSoftwareUpgradeProposal - */ - public static fromObject(object: { - [k: string]: any; - }): cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal; - - /** - * Creates a plain object from a CancelSoftwareUpgradeProposal message. Also converts values to other types if specified. - * @param message CancelSoftwareUpgradeProposal - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.x.upgrade.v1.CancelSoftwareUpgradeProposal, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this CancelSoftwareUpgradeProposal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } - - /** Namespace ibc. */ - namespace ibc { - /** Namespace localhost. */ - namespace localhost { - /** Namespace v1. */ - namespace v1 { - /** Properties of a MsgCreateClient. */ - interface IMsgCreateClient { - /** MsgCreateClient signer */ - signer?: Uint8Array | null; - } - - /** Represents a MsgCreateClient. */ - class MsgCreateClient implements IMsgCreateClient { - /** - * Constructs a new MsgCreateClient. - * @param [properties] Properties to set - */ - constructor(properties?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient); - - /** MsgCreateClient signer. */ - public signer: Uint8Array; - - /** - * Creates a new MsgCreateClient instance using the specified properties. - * @param [properties] Properties to set - * @returns MsgCreateClient instance - */ - public static create( - properties?: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, - ): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; - - /** - * Encodes the specified MsgCreateClient message. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. - * @param message MsgCreateClient message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MsgCreateClient message, length delimited. Does not implicitly {@link cosmos_sdk.ibc.localhost.v1.MsgCreateClient.verify|verify} messages. - * @param message MsgCreateClient message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: cosmos_sdk.ibc.localhost.v1.IMsgCreateClient, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MsgCreateClient message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MsgCreateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; - - /** - * Decodes a MsgCreateClient message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MsgCreateClient - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; - - /** - * Verifies a MsgCreateClient message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MsgCreateClient message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MsgCreateClient - */ - public static fromObject(object: { [k: string]: any }): cosmos_sdk.ibc.localhost.v1.MsgCreateClient; - - /** - * Creates a plain object from a MsgCreateClient message. Also converts values to other types if specified. - * @param message MsgCreateClient - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: cosmos_sdk.ibc.localhost.v1.MsgCreateClient, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MsgCreateClient to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } } } } @@ -16318,9 +1535,9 @@ export namespace tendermint { class Request implements IRequest { /** * Constructs a new Request. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequest); + constructor(p?: tendermint.abci.types.IRequest); /** Request echo. */ public echo?: tendermint.abci.types.IRequestEcho | null; @@ -16378,78 +1595,21 @@ export namespace tendermint { /** * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. - * @param message Request message or plain object to encode - * @param [writer] Writer to encode to + * @param m Request message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IRequest, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Request message, length delimited. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. - * @param message Request message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequest, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.Request; - - /** - * Decodes a Request message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Request; - - /** - * Verifies a Request message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Request message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Request - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Request; - - /** - * Creates a plain object from a Request message. Also converts values to other types if specified. - * @param message Request - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.Request, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Request to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.Request; } /** Properties of a RequestEcho. */ @@ -16462,9 +1622,9 @@ export namespace tendermint { class RequestEcho implements IRequestEcho { /** * Constructs a new RequestEcho. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestEcho); + constructor(p?: tendermint.abci.types.IRequestEcho); /** RequestEcho message. */ public message: string; @@ -16480,80 +1640,21 @@ export namespace tendermint { /** * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. - * @param message RequestEcho message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestEcho message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IRequestEcho, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. - * @param message RequestEcho message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestEcho, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.RequestEcho; - - /** - * Decodes a RequestEcho message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestEcho; - - /** - * Verifies a RequestEcho message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestEcho message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestEcho - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestEcho; - - /** - * Creates a plain object from a RequestEcho message. Also converts values to other types if specified. - * @param message RequestEcho - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestEcho, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestEcho to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.RequestEcho; } /** Properties of a RequestFlush. */ @@ -16563,9 +1664,9 @@ export namespace tendermint { class RequestFlush implements IRequestFlush { /** * Constructs a new RequestFlush. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestFlush); + constructor(p?: tendermint.abci.types.IRequestFlush); /** * Creates a new RequestFlush instance using the specified properties. @@ -16578,80 +1679,24 @@ export namespace tendermint { /** * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. - * @param message RequestFlush message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestFlush message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IRequestFlush, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. - * @param message RequestFlush message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestFlush, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.RequestFlush; - - /** - * Decodes a RequestFlush message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestFlush; - - /** - * Verifies a RequestFlush message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestFlush message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestFlush - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestFlush; - - /** - * Creates a plain object from a RequestFlush message. Also converts values to other types if specified. - * @param message RequestFlush - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestFlush, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestFlush to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a RequestInfo. */ @@ -16670,9 +1715,9 @@ export namespace tendermint { class RequestInfo implements IRequestInfo { /** * Constructs a new RequestInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestInfo); + constructor(p?: tendermint.abci.types.IRequestInfo); /** RequestInfo version. */ public version: string; @@ -16694,80 +1739,21 @@ export namespace tendermint { /** * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. - * @param message RequestInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IRequestInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. - * @param message RequestInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestInfo, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.RequestInfo; - - /** - * Decodes a RequestInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestInfo; - - /** - * Verifies a RequestInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestInfo - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestInfo; - - /** - * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. - * @param message RequestInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.RequestInfo; } /** Properties of a RequestSetOption. */ @@ -16783,9 +1769,9 @@ export namespace tendermint { class RequestSetOption implements IRequestSetOption { /** * Constructs a new RequestSetOption. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestSetOption); + constructor(p?: tendermint.abci.types.IRequestSetOption); /** RequestSetOption key. */ public key: string; @@ -16804,80 +1790,27 @@ export namespace tendermint { /** * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. - * @param message RequestSetOption message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestSetOption message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IRequestSetOption, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. - * @param message RequestSetOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestSetOption, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IRequestSetOption, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a RequestSetOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.RequestSetOption; - - /** - * Decodes a RequestSetOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestSetOption; - - /** - * Verifies a RequestSetOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestSetOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestSetOption - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestSetOption; - - /** - * Creates a plain object from a RequestSetOption message. Also converts values to other types if specified. - * @param message RequestSetOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestSetOption, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestSetOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a RequestInitChain. */ @@ -16902,9 +1835,9 @@ export namespace tendermint { class RequestInitChain implements IRequestInitChain { /** * Constructs a new RequestInitChain. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestInitChain); + constructor(p?: tendermint.abci.types.IRequestInitChain); /** RequestInitChain time. */ public time?: google.protobuf.ITimestamp | null; @@ -16932,80 +1865,27 @@ export namespace tendermint { /** * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. - * @param message RequestInitChain message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestInitChain message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IRequestInitChain, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. - * @param message RequestInitChain message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestInitChain, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IRequestInitChain, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a RequestInitChain message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.RequestInitChain; - - /** - * Decodes a RequestInitChain message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestInitChain; - - /** - * Verifies a RequestInitChain message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestInitChain message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestInitChain - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestInitChain; - - /** - * Creates a plain object from a RequestInitChain message. Also converts values to other types if specified. - * @param message RequestInitChain - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestInitChain, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestInitChain to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a RequestQuery. */ @@ -17027,9 +1907,9 @@ export namespace tendermint { class RequestQuery implements IRequestQuery { /** * Constructs a new RequestQuery. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestQuery); + constructor(p?: tendermint.abci.types.IRequestQuery); /** RequestQuery data. */ public data: Uint8Array; @@ -17054,80 +1934,24 @@ export namespace tendermint { /** * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. - * @param message RequestQuery message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestQuery message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IRequestQuery, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. - * @param message RequestQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestQuery, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.RequestQuery; - - /** - * Decodes a RequestQuery message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestQuery; - - /** - * Verifies a RequestQuery message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestQuery message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestQuery - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestQuery; - - /** - * Creates a plain object from a RequestQuery message. Also converts values to other types if specified. - * @param message RequestQuery - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestQuery, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestQuery to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a RequestBeginBlock. */ @@ -17149,9 +1973,9 @@ export namespace tendermint { class RequestBeginBlock implements IRequestBeginBlock { /** * Constructs a new RequestBeginBlock. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestBeginBlock); + constructor(p?: tendermint.abci.types.IRequestBeginBlock); /** RequestBeginBlock hash. */ public hash: Uint8Array; @@ -17176,80 +2000,27 @@ export namespace tendermint { /** * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. - * @param message RequestBeginBlock message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestBeginBlock message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IRequestBeginBlock, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. - * @param message RequestBeginBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestBeginBlock, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IRequestBeginBlock, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a RequestBeginBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.RequestBeginBlock; - - /** - * Decodes a RequestBeginBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestBeginBlock; - - /** - * Verifies a RequestBeginBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestBeginBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestBeginBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestBeginBlock; - - /** - * Creates a plain object from a RequestBeginBlock message. Also converts values to other types if specified. - * @param message RequestBeginBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestBeginBlock, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestBeginBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** CheckTxType enum. */ @@ -17271,9 +2042,9 @@ export namespace tendermint { class RequestCheckTx implements IRequestCheckTx { /** * Constructs a new RequestCheckTx. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestCheckTx); + constructor(p?: tendermint.abci.types.IRequestCheckTx); /** RequestCheckTx tx. */ public tx: Uint8Array; @@ -17292,80 +2063,27 @@ export namespace tendermint { /** * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. - * @param message RequestCheckTx message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestCheckTx message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IRequestCheckTx, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. - * @param message RequestCheckTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestCheckTx, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IRequestCheckTx, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a RequestCheckTx message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.RequestCheckTx; - - /** - * Decodes a RequestCheckTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestCheckTx; - - /** - * Verifies a RequestCheckTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestCheckTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCheckTx - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestCheckTx; - - /** - * Creates a plain object from a RequestCheckTx message. Also converts values to other types if specified. - * @param message RequestCheckTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestCheckTx, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestCheckTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a RequestDeliverTx. */ @@ -17378,9 +2096,9 @@ export namespace tendermint { class RequestDeliverTx implements IRequestDeliverTx { /** * Constructs a new RequestDeliverTx. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestDeliverTx); + constructor(p?: tendermint.abci.types.IRequestDeliverTx); /** RequestDeliverTx tx. */ public tx: Uint8Array; @@ -17396,80 +2114,27 @@ export namespace tendermint { /** * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. - * @param message RequestDeliverTx message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestDeliverTx message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IRequestDeliverTx, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. - * @param message RequestDeliverTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestDeliverTx, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IRequestDeliverTx, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a RequestDeliverTx message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.RequestDeliverTx; - - /** - * Decodes a RequestDeliverTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestDeliverTx; - - /** - * Verifies a RequestDeliverTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestDeliverTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestDeliverTx - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestDeliverTx; - - /** - * Creates a plain object from a RequestDeliverTx message. Also converts values to other types if specified. - * @param message RequestDeliverTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestDeliverTx, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestDeliverTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a RequestEndBlock. */ @@ -17482,9 +2147,9 @@ export namespace tendermint { class RequestEndBlock implements IRequestEndBlock { /** * Constructs a new RequestEndBlock. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestEndBlock); + constructor(p?: tendermint.abci.types.IRequestEndBlock); /** RequestEndBlock height. */ public height: number | Long; @@ -17500,80 +2165,27 @@ export namespace tendermint { /** * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. - * @param message RequestEndBlock message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestEndBlock message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IRequestEndBlock, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. - * @param message RequestEndBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestEndBlock, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IRequestEndBlock, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a RequestEndBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.RequestEndBlock; - - /** - * Decodes a RequestEndBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestEndBlock; - - /** - * Verifies a RequestEndBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestEndBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestEndBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestEndBlock; - - /** - * Creates a plain object from a RequestEndBlock message. Also converts values to other types if specified. - * @param message RequestEndBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestEndBlock, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestEndBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a RequestCommit. */ @@ -17583,9 +2195,9 @@ export namespace tendermint { class RequestCommit implements IRequestCommit { /** * Constructs a new RequestCommit. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IRequestCommit); + constructor(p?: tendermint.abci.types.IRequestCommit); /** * Creates a new RequestCommit instance using the specified properties. @@ -17598,80 +2210,24 @@ export namespace tendermint { /** * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. - * @param message RequestCommit message or plain object to encode - * @param [writer] Writer to encode to + * @param m RequestCommit message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IRequestCommit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified RequestCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. - * @param message RequestCommit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IRequestCommit, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.RequestCommit; - - /** - * Decodes a RequestCommit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.RequestCommit; - - /** - * Verifies a RequestCommit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a RequestCommit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestCommit - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.RequestCommit; - - /** - * Creates a plain object from a RequestCommit message. Also converts values to other types if specified. - * @param message RequestCommit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.RequestCommit, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this RequestCommit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a Response. */ @@ -17717,9 +2273,9 @@ export namespace tendermint { class Response implements IResponse { /** * Constructs a new Response. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponse); + constructor(p?: tendermint.abci.types.IResponse); /** Response exception. */ public exception?: tendermint.abci.types.IResponseException | null; @@ -17781,78 +2337,21 @@ export namespace tendermint { /** * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to + * @param m Response message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IResponse, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Response message, length delimited. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. - * @param message Response message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponse, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.Response; - - /** - * Decodes a Response message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Response; - - /** - * Verifies a Response message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Response message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Response - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Response; - - /** - * Creates a plain object from a Response message. Also converts values to other types if specified. - * @param message Response - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.Response, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Response to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.Response; } /** Properties of a ResponseException. */ @@ -17865,9 +2364,9 @@ export namespace tendermint { class ResponseException implements IResponseException { /** * Constructs a new ResponseException. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseException); + constructor(p?: tendermint.abci.types.IResponseException); /** ResponseException error. */ public error: string; @@ -17883,80 +2382,27 @@ export namespace tendermint { /** * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. - * @param message ResponseException message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseException message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IResponseException, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseException message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. - * @param message ResponseException message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseException, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IResponseException, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ResponseException message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseException; - - /** - * Decodes a ResponseException message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseException; - - /** - * Verifies a ResponseException message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseException message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseException - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseException; - - /** - * Creates a plain object from a ResponseException message. Also converts values to other types if specified. - * @param message ResponseException - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseException, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseException to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseEcho. */ @@ -17969,9 +2415,9 @@ export namespace tendermint { class ResponseEcho implements IResponseEcho { /** * Constructs a new ResponseEcho. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseEcho); + constructor(p?: tendermint.abci.types.IResponseEcho); /** ResponseEcho message. */ public message: string; @@ -17987,80 +2433,24 @@ export namespace tendermint { /** * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. - * @param message ResponseEcho message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseEcho message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IResponseEcho, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseEcho message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. - * @param message ResponseEcho message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseEcho, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseEcho; - - /** - * Decodes a ResponseEcho message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseEcho; - - /** - * Verifies a ResponseEcho message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseEcho message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseEcho - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseEcho; - - /** - * Creates a plain object from a ResponseEcho message. Also converts values to other types if specified. - * @param message ResponseEcho - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseEcho, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseEcho to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseFlush. */ @@ -18070,9 +2460,9 @@ export namespace tendermint { class ResponseFlush implements IResponseFlush { /** * Constructs a new ResponseFlush. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseFlush); + constructor(p?: tendermint.abci.types.IResponseFlush); /** * Creates a new ResponseFlush instance using the specified properties. @@ -18085,80 +2475,24 @@ export namespace tendermint { /** * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. - * @param message ResponseFlush message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseFlush message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IResponseFlush, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseFlush message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. - * @param message ResponseFlush message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseFlush, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseFlush; - - /** - * Decodes a ResponseFlush message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseFlush; - - /** - * Verifies a ResponseFlush message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseFlush message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseFlush - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseFlush; - - /** - * Creates a plain object from a ResponseFlush message. Also converts values to other types if specified. - * @param message ResponseFlush - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseFlush, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseFlush to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseInfo. */ @@ -18183,9 +2517,9 @@ export namespace tendermint { class ResponseInfo implements IResponseInfo { /** * Constructs a new ResponseInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseInfo); + constructor(p?: tendermint.abci.types.IResponseInfo); /** ResponseInfo data. */ public data: string; @@ -18213,80 +2547,24 @@ export namespace tendermint { /** * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. - * @param message ResponseInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IResponseInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. - * @param message ResponseInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseInfo, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseInfo; - - /** - * Decodes a ResponseInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseInfo; - - /** - * Verifies a ResponseInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseInfo - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseInfo; - - /** - * Creates a plain object from a ResponseInfo message. Also converts values to other types if specified. - * @param message ResponseInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseSetOption. */ @@ -18305,9 +2583,9 @@ export namespace tendermint { class ResponseSetOption implements IResponseSetOption { /** * Constructs a new ResponseSetOption. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseSetOption); + constructor(p?: tendermint.abci.types.IResponseSetOption); /** ResponseSetOption code. */ public code: number; @@ -18329,80 +2607,27 @@ export namespace tendermint { /** * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. - * @param message ResponseSetOption message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseSetOption message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IResponseSetOption, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseSetOption message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. - * @param message ResponseSetOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseSetOption, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IResponseSetOption, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ResponseSetOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseSetOption; - - /** - * Decodes a ResponseSetOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseSetOption; - - /** - * Verifies a ResponseSetOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseSetOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseSetOption - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseSetOption; - - /** - * Creates a plain object from a ResponseSetOption message. Also converts values to other types if specified. - * @param message ResponseSetOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseSetOption, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseSetOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseInitChain. */ @@ -18418,9 +2643,9 @@ export namespace tendermint { class ResponseInitChain implements IResponseInitChain { /** * Constructs a new ResponseInitChain. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseInitChain); + constructor(p?: tendermint.abci.types.IResponseInitChain); /** ResponseInitChain consensusParams. */ public consensusParams?: tendermint.abci.types.IConsensusParams | null; @@ -18439,80 +2664,27 @@ export namespace tendermint { /** * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. - * @param message ResponseInitChain message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseInitChain message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IResponseInitChain, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseInitChain message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. - * @param message ResponseInitChain message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseInitChain, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IResponseInitChain, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ResponseInitChain message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseInitChain; - - /** - * Decodes a ResponseInitChain message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseInitChain; - - /** - * Verifies a ResponseInitChain message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseInitChain message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseInitChain - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseInitChain; - - /** - * Creates a plain object from a ResponseInitChain message. Also converts values to other types if specified. - * @param message ResponseInitChain - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseInitChain, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseInitChain to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseQuery. */ @@ -18549,9 +2721,9 @@ export namespace tendermint { class ResponseQuery implements IResponseQuery { /** * Constructs a new ResponseQuery. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseQuery); + constructor(p?: tendermint.abci.types.IResponseQuery); /** ResponseQuery code. */ public code: number; @@ -18591,80 +2763,24 @@ export namespace tendermint { /** * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. - * @param message ResponseQuery message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseQuery message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IResponseQuery, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseQuery message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. - * @param message ResponseQuery message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseQuery, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseQuery; - - /** - * Decodes a ResponseQuery message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseQuery; - - /** - * Verifies a ResponseQuery message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseQuery message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseQuery - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseQuery; - - /** - * Creates a plain object from a ResponseQuery message. Also converts values to other types if specified. - * @param message ResponseQuery - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseQuery, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseQuery to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseBeginBlock. */ @@ -18677,9 +2793,9 @@ export namespace tendermint { class ResponseBeginBlock implements IResponseBeginBlock { /** * Constructs a new ResponseBeginBlock. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseBeginBlock); + constructor(p?: tendermint.abci.types.IResponseBeginBlock); /** ResponseBeginBlock events. */ public events: tendermint.abci.types.IEvent[]; @@ -18695,80 +2811,27 @@ export namespace tendermint { /** * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. - * @param message ResponseBeginBlock message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseBeginBlock message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IResponseBeginBlock, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseBeginBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. - * @param message ResponseBeginBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseBeginBlock, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IResponseBeginBlock, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ResponseBeginBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseBeginBlock; - - /** - * Decodes a ResponseBeginBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseBeginBlock; - - /** - * Verifies a ResponseBeginBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseBeginBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseBeginBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseBeginBlock; - - /** - * Creates a plain object from a ResponseBeginBlock message. Also converts values to other types if specified. - * @param message ResponseBeginBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseBeginBlock, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseBeginBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseCheckTx. */ @@ -18802,9 +2865,9 @@ export namespace tendermint { class ResponseCheckTx implements IResponseCheckTx { /** * Constructs a new ResponseCheckTx. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseCheckTx); + constructor(p?: tendermint.abci.types.IResponseCheckTx); /** ResponseCheckTx code. */ public code: number; @@ -18841,80 +2904,27 @@ export namespace tendermint { /** * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. - * @param message ResponseCheckTx message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseCheckTx message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IResponseCheckTx, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseCheckTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. - * @param message ResponseCheckTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseCheckTx, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IResponseCheckTx, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ResponseCheckTx message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseCheckTx; - - /** - * Decodes a ResponseCheckTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseCheckTx; - - /** - * Verifies a ResponseCheckTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseCheckTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseCheckTx - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseCheckTx; - - /** - * Creates a plain object from a ResponseCheckTx message. Also converts values to other types if specified. - * @param message ResponseCheckTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseCheckTx, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseCheckTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseDeliverTx. */ @@ -18948,9 +2958,9 @@ export namespace tendermint { class ResponseDeliverTx implements IResponseDeliverTx { /** * Constructs a new ResponseDeliverTx. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseDeliverTx); + constructor(p?: tendermint.abci.types.IResponseDeliverTx); /** ResponseDeliverTx code. */ public code: number; @@ -18987,80 +2997,27 @@ export namespace tendermint { /** * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. - * @param message ResponseDeliverTx message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseDeliverTx message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IResponseDeliverTx, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseDeliverTx message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. - * @param message ResponseDeliverTx message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseDeliverTx, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IResponseDeliverTx, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ResponseDeliverTx message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseDeliverTx; - - /** - * Decodes a ResponseDeliverTx message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseDeliverTx; - - /** - * Verifies a ResponseDeliverTx message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseDeliverTx message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseDeliverTx - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseDeliverTx; - - /** - * Creates a plain object from a ResponseDeliverTx message. Also converts values to other types if specified. - * @param message ResponseDeliverTx - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseDeliverTx, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseDeliverTx to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseEndBlock. */ @@ -19079,9 +3036,9 @@ export namespace tendermint { class ResponseEndBlock implements IResponseEndBlock { /** * Constructs a new ResponseEndBlock. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseEndBlock); + constructor(p?: tendermint.abci.types.IResponseEndBlock); /** ResponseEndBlock validatorUpdates. */ public validatorUpdates: tendermint.abci.types.IValidatorUpdate[]; @@ -19103,80 +3060,27 @@ export namespace tendermint { /** * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. - * @param message ResponseEndBlock message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseEndBlock message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IResponseEndBlock, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseEndBlock message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. - * @param message ResponseEndBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseEndBlock, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IResponseEndBlock, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ResponseEndBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseEndBlock; - - /** - * Decodes a ResponseEndBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseEndBlock; - - /** - * Verifies a ResponseEndBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseEndBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseEndBlock - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseEndBlock; - - /** - * Creates a plain object from a ResponseEndBlock message. Also converts values to other types if specified. - * @param message ResponseEndBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseEndBlock, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseEndBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ResponseCommit. */ @@ -19189,9 +3093,9 @@ export namespace tendermint { class ResponseCommit implements IResponseCommit { /** * Constructs a new ResponseCommit. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IResponseCommit); + constructor(p?: tendermint.abci.types.IResponseCommit); /** ResponseCommit data. */ public data: Uint8Array; @@ -19207,80 +3111,27 @@ export namespace tendermint { /** * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. - * @param message ResponseCommit message or plain object to encode - * @param [writer] Writer to encode to + * @param m ResponseCommit message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IResponseCommit, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ResponseCommit message, length delimited. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. - * @param message ResponseCommit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IResponseCommit, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IResponseCommit, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ResponseCommit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ResponseCommit; - - /** - * Decodes a ResponseCommit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ResponseCommit; - - /** - * Verifies a ResponseCommit message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ResponseCommit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResponseCommit - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ResponseCommit; - - /** - * Creates a plain object from a ResponseCommit message. Also converts values to other types if specified. - * @param message ResponseCommit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ResponseCommit, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ResponseCommit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ConsensusParams. */ @@ -19299,9 +3150,9 @@ export namespace tendermint { class ConsensusParams implements IConsensusParams { /** * Constructs a new ConsensusParams. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IConsensusParams); + constructor(p?: tendermint.abci.types.IConsensusParams); /** ConsensusParams block. */ public block?: tendermint.abci.types.IBlockParams | null; @@ -19323,80 +3174,27 @@ export namespace tendermint { /** * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. - * @param message ConsensusParams message or plain object to encode - * @param [writer] Writer to encode to + * @param m ConsensusParams message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IConsensusParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ConsensusParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. - * @param message ConsensusParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IConsensusParams, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IConsensusParams, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ConsensusParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ConsensusParams; - - /** - * Decodes a ConsensusParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ConsensusParams; - - /** - * Verifies a ConsensusParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ConsensusParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConsensusParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ConsensusParams; - - /** - * Creates a plain object from a ConsensusParams message. Also converts values to other types if specified. - * @param message ConsensusParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ConsensusParams, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ConsensusParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a BlockParams. */ @@ -19412,9 +3210,9 @@ export namespace tendermint { class BlockParams implements IBlockParams { /** * Constructs a new BlockParams. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IBlockParams); + constructor(p?: tendermint.abci.types.IBlockParams); /** BlockParams maxBytes. */ public maxBytes: number | Long; @@ -19433,80 +3231,21 @@ export namespace tendermint { /** * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. - * @param message BlockParams message or plain object to encode - * @param [writer] Writer to encode to + * @param m BlockParams message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IBlockParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified BlockParams message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. - * @param message BlockParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IBlockParams, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.BlockParams; - - /** - * Decodes a BlockParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.BlockParams; - - /** - * Verifies a BlockParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a BlockParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlockParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.BlockParams; - - /** - * Creates a plain object from a BlockParams message. Also converts values to other types if specified. - * @param message BlockParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.BlockParams, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this BlockParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.BlockParams; } /** Properties of an EvidenceParams. */ @@ -19522,9 +3261,9 @@ export namespace tendermint { class EvidenceParams implements IEvidenceParams { /** * Constructs a new EvidenceParams. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IEvidenceParams); + constructor(p?: tendermint.abci.types.IEvidenceParams); /** EvidenceParams maxAgeNumBlocks. */ public maxAgeNumBlocks: number | Long; @@ -19543,80 +3282,27 @@ export namespace tendermint { /** * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. - * @param message EvidenceParams message or plain object to encode - * @param [writer] Writer to encode to + * @param m EvidenceParams message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IEvidenceParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified EvidenceParams message, length delimited. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. - * @param message EvidenceParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IEvidenceParams, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IEvidenceParams, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes an EvidenceParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.EvidenceParams; - - /** - * Decodes an EvidenceParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.EvidenceParams; - - /** - * Verifies an EvidenceParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an EvidenceParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EvidenceParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.EvidenceParams; - - /** - * Creates a plain object from an EvidenceParams message. Also converts values to other types if specified. - * @param message EvidenceParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.EvidenceParams, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this EvidenceParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a ValidatorParams. */ @@ -19629,9 +3315,9 @@ export namespace tendermint { class ValidatorParams implements IValidatorParams { /** * Constructs a new ValidatorParams. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IValidatorParams); + constructor(p?: tendermint.abci.types.IValidatorParams); /** ValidatorParams pubKeyTypes. */ public pubKeyTypes: string[]; @@ -19647,80 +3333,27 @@ export namespace tendermint { /** * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. - * @param message ValidatorParams message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorParams message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IValidatorParams, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ValidatorParams message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. - * @param message ValidatorParams message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IValidatorParams, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IValidatorParams, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ValidatorParams message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ValidatorParams; - - /** - * Decodes a ValidatorParams message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ValidatorParams; - - /** - * Verifies a ValidatorParams message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValidatorParams message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorParams - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ValidatorParams; - - /** - * Creates a plain object from a ValidatorParams message. Also converts values to other types if specified. - * @param message ValidatorParams - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ValidatorParams, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValidatorParams to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a LastCommitInfo. */ @@ -19736,9 +3369,9 @@ export namespace tendermint { class LastCommitInfo implements ILastCommitInfo { /** * Constructs a new LastCommitInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.ILastCommitInfo); + constructor(p?: tendermint.abci.types.ILastCommitInfo); /** LastCommitInfo round. */ public round: number; @@ -19757,80 +3390,27 @@ export namespace tendermint { /** * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. - * @param message LastCommitInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m LastCommitInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.ILastCommitInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified LastCommitInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. - * @param message LastCommitInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.ILastCommitInfo, - writer?: $protobuf.Writer, + m: tendermint.abci.types.ILastCommitInfo, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a LastCommitInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.LastCommitInfo; - - /** - * Decodes a LastCommitInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.LastCommitInfo; - - /** - * Verifies a LastCommitInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a LastCommitInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LastCommitInfo - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.LastCommitInfo; - - /** - * Creates a plain object from a LastCommitInfo message. Also converts values to other types if specified. - * @param message LastCommitInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.LastCommitInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this LastCommitInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of an Event. */ @@ -19846,9 +3426,9 @@ export namespace tendermint { class Event implements IEvent { /** * Constructs a new Event. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IEvent); + constructor(p?: tendermint.abci.types.IEvent); /** Event type. */ public type: string; @@ -19865,78 +3445,21 @@ export namespace tendermint { /** * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. - * @param message Event message or plain object to encode - * @param [writer] Writer to encode to + * @param m Event message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IEvent, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Event message, length delimited. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. - * @param message Event message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IEvent, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.Event; - - /** - * Decodes an Event message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Event; - - /** - * Verifies an Event message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an Event message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Event - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Event; - - /** - * Creates a plain object from an Event message. Also converts values to other types if specified. - * @param message Event - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.Event, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Event to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.Event; } /** Properties of a Header. */ @@ -19988,9 +3511,9 @@ export namespace tendermint { class Header implements IHeader { /** * Constructs a new Header. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IHeader); + constructor(p?: tendermint.abci.types.IHeader); /** Header version. */ public version?: tendermint.abci.types.IVersion | null; @@ -20043,78 +3566,21 @@ export namespace tendermint { /** * Encodes the specified Header message. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. - * @param message Header message or plain object to encode - * @param [writer] Writer to encode to + * @param m Header message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IHeader, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Header message, length delimited. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. - * @param message Header message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IHeader, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.Header; - - /** - * Decodes a Header message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Header; - - /** - * Verifies a Header message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Header message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Header - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Header; - - /** - * Creates a plain object from a Header message. Also converts values to other types if specified. - * @param message Header - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.Header, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Header to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.Header; } /** Properties of a Version. */ @@ -20130,9 +3596,9 @@ export namespace tendermint { class Version implements IVersion { /** * Constructs a new Version. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IVersion); + constructor(p?: tendermint.abci.types.IVersion); /** Version Block. */ public Block: number | Long; @@ -20149,78 +3615,21 @@ export namespace tendermint { /** * Encodes the specified Version message. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. - * @param message Version message or plain object to encode - * @param [writer] Writer to encode to + * @param m Version message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IVersion, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Version message, length delimited. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. - * @param message Version message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IVersion, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.Version; - - /** - * Decodes a Version message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Version; - - /** - * Verifies a Version message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Version message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Version - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Version; - - /** - * Creates a plain object from a Version message. Also converts values to other types if specified. - * @param message Version - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.Version, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Version to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.Version; } /** Properties of a BlockID. */ @@ -20236,9 +3645,9 @@ export namespace tendermint { class BlockID implements IBlockID { /** * Constructs a new BlockID. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IBlockID); + constructor(p?: tendermint.abci.types.IBlockID); /** BlockID hash. */ public hash: Uint8Array; @@ -20255,78 +3664,21 @@ export namespace tendermint { /** * Encodes the specified BlockID message. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. - * @param message BlockID message or plain object to encode - * @param [writer] Writer to encode to + * @param m BlockID message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IBlockID, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified BlockID message, length delimited. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. - * @param message BlockID message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IBlockID, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.BlockID; - - /** - * Decodes a BlockID message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.BlockID; - - /** - * Verifies a BlockID message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a BlockID message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BlockID - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.BlockID; - - /** - * Creates a plain object from a BlockID message. Also converts values to other types if specified. - * @param message BlockID - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.BlockID, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this BlockID to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.BlockID; } /** Properties of a PartSetHeader. */ @@ -20342,9 +3694,9 @@ export namespace tendermint { class PartSetHeader implements IPartSetHeader { /** * Constructs a new PartSetHeader. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IPartSetHeader); + constructor(p?: tendermint.abci.types.IPartSetHeader); /** PartSetHeader total. */ public total: number; @@ -20363,80 +3715,24 @@ export namespace tendermint { /** * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. - * @param message PartSetHeader message or plain object to encode - * @param [writer] Writer to encode to + * @param m PartSetHeader message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IPartSetHeader, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified PartSetHeader message, length delimited. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. - * @param message PartSetHeader message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IPartSetHeader, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.PartSetHeader; - - /** - * Decodes a PartSetHeader message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.PartSetHeader; - - /** - * Verifies a PartSetHeader message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a PartSetHeader message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PartSetHeader - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.PartSetHeader; - - /** - * Creates a plain object from a PartSetHeader message. Also converts values to other types if specified. - * @param message PartSetHeader - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.PartSetHeader, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this PartSetHeader to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a Validator. */ @@ -20452,9 +3748,9 @@ export namespace tendermint { class Validator implements IValidator { /** * Constructs a new Validator. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IValidator); + constructor(p?: tendermint.abci.types.IValidator); /** Validator address. */ public address: Uint8Array; @@ -20471,78 +3767,21 @@ export namespace tendermint { /** * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. - * @param message Validator message or plain object to encode - * @param [writer] Writer to encode to + * @param m Validator message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IValidator, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Validator message, length delimited. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. - * @param message Validator message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IValidator, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.Validator; - - /** - * Decodes a Validator message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Validator; - - /** - * Verifies a Validator message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Validator message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Validator - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Validator; - - /** - * Creates a plain object from a Validator message. Also converts values to other types if specified. - * @param message Validator - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.Validator, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Validator to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.Validator; } /** Properties of a ValidatorUpdate. */ @@ -20558,9 +3797,9 @@ export namespace tendermint { class ValidatorUpdate implements IValidatorUpdate { /** * Constructs a new ValidatorUpdate. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IValidatorUpdate); + constructor(p?: tendermint.abci.types.IValidatorUpdate); /** ValidatorUpdate pubKey. */ public pubKey?: tendermint.abci.types.IPubKey | null; @@ -20579,80 +3818,27 @@ export namespace tendermint { /** * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. - * @param message ValidatorUpdate message or plain object to encode - * @param [writer] Writer to encode to + * @param m ValidatorUpdate message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ public static encode( - message: tendermint.abci.types.IValidatorUpdate, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ValidatorUpdate message, length delimited. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. - * @param message ValidatorUpdate message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IValidatorUpdate, - writer?: $protobuf.Writer, + m: tendermint.abci.types.IValidatorUpdate, + w?: $protobuf.Writer, ): $protobuf.Writer; /** * Decodes a ValidatorUpdate message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, + r: $protobuf.Reader | Uint8Array, + l?: number, ): tendermint.abci.types.ValidatorUpdate; - - /** - * Decodes a ValidatorUpdate message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.abci.types.ValidatorUpdate; - - /** - * Verifies a ValidatorUpdate message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ValidatorUpdate message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidatorUpdate - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.ValidatorUpdate; - - /** - * Creates a plain object from a ValidatorUpdate message. Also converts values to other types if specified. - * @param message ValidatorUpdate - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.ValidatorUpdate, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ValidatorUpdate to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; } /** Properties of a VoteInfo. */ @@ -20668,9 +3854,9 @@ export namespace tendermint { class VoteInfo implements IVoteInfo { /** * Constructs a new VoteInfo. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IVoteInfo); + constructor(p?: tendermint.abci.types.IVoteInfo); /** VoteInfo validator. */ public validator?: tendermint.abci.types.IValidator | null; @@ -20687,78 +3873,21 @@ export namespace tendermint { /** * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. - * @param message VoteInfo message or plain object to encode - * @param [writer] Writer to encode to + * @param m VoteInfo message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IVoteInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified VoteInfo message, length delimited. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. - * @param message VoteInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IVoteInfo, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.VoteInfo; - - /** - * Decodes a VoteInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.VoteInfo; - - /** - * Verifies a VoteInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a VoteInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VoteInfo - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.VoteInfo; - - /** - * Creates a plain object from a VoteInfo message. Also converts values to other types if specified. - * @param message VoteInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.VoteInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this VoteInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.VoteInfo; } /** Properties of a PubKey. */ @@ -20774,9 +3903,9 @@ export namespace tendermint { class PubKey implements IPubKey { /** * Constructs a new PubKey. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IPubKey); + constructor(p?: tendermint.abci.types.IPubKey); /** PubKey type. */ public type: string; @@ -20793,78 +3922,21 @@ export namespace tendermint { /** * Encodes the specified PubKey message. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. - * @param message PubKey message or plain object to encode - * @param [writer] Writer to encode to + * @param m PubKey message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IPubKey, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified PubKey message, length delimited. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. - * @param message PubKey message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IPubKey, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.PubKey; - - /** - * Decodes a PubKey message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.PubKey; - - /** - * Verifies a PubKey message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a PubKey message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubKey - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.PubKey; - - /** - * Creates a plain object from a PubKey message. Also converts values to other types if specified. - * @param message PubKey - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.PubKey, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this PubKey to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.PubKey; } /** Properties of an Evidence. */ @@ -20889,9 +3961,9 @@ export namespace tendermint { class Evidence implements IEvidence { /** * Constructs a new Evidence. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.abci.types.IEvidence); + constructor(p?: tendermint.abci.types.IEvidence); /** Evidence type. */ public type: string; @@ -20917,78 +3989,21 @@ export namespace tendermint { /** * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. - * @param message Evidence message or plain object to encode - * @param [writer] Writer to encode to + * @param m Evidence message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.abci.types.IEvidence, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Evidence message, length delimited. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. - * @param message Evidence message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.abci.types.IEvidence, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.abci.types.Evidence; - - /** - * Decodes an Evidence message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.abci.types.Evidence; - - /** - * Verifies an Evidence message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an Evidence message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Evidence - */ - public static fromObject(object: { [k: string]: any }): tendermint.abci.types.Evidence; - - /** - * Creates a plain object from an Evidence message. Also converts values to other types if specified. - * @param message Evidence - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.abci.types.Evidence, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Evidence to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.abci.types.Evidence; } /** Represents a ABCIApplication */ @@ -21339,9 +4354,9 @@ export namespace tendermint { class ProofOp implements IProofOp { /** * Constructs a new ProofOp. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.crypto.merkle.IProofOp); + constructor(p?: tendermint.crypto.merkle.IProofOp); /** ProofOp type. */ public type: string; @@ -21363,80 +4378,21 @@ export namespace tendermint { /** * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. - * @param message ProofOp message or plain object to encode - * @param [writer] Writer to encode to + * @param m ProofOp message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.crypto.merkle.IProofOp, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ProofOp message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. - * @param message ProofOp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.crypto.merkle.IProofOp, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.crypto.merkle.ProofOp; - - /** - * Decodes a ProofOp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): tendermint.crypto.merkle.ProofOp; - - /** - * Verifies a ProofOp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ProofOp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ProofOp - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.merkle.ProofOp; - - /** - * Creates a plain object from a ProofOp message. Also converts values to other types if specified. - * @param message ProofOp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.crypto.merkle.ProofOp, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ProofOp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.crypto.merkle.ProofOp; } /** Properties of a Proof. */ @@ -21449,9 +4405,9 @@ export namespace tendermint { class Proof implements IProof { /** * Constructs a new Proof. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.crypto.merkle.IProof); + constructor(p?: tendermint.crypto.merkle.IProof); /** Proof ops. */ public ops: tendermint.crypto.merkle.IProofOp[]; @@ -21465,78 +4421,21 @@ export namespace tendermint { /** * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. - * @param message Proof message or plain object to encode - * @param [writer] Writer to encode to + * @param m Proof message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.crypto.merkle.IProof, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Proof message, length delimited. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. - * @param message Proof message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.crypto.merkle.IProof, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.crypto.merkle.Proof; - - /** - * Decodes a Proof message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.crypto.merkle.Proof; - - /** - * Verifies a Proof message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Proof message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Proof - */ - public static fromObject(object: { [k: string]: any }): tendermint.crypto.merkle.Proof; - - /** - * Creates a plain object from a Proof message. Also converts values to other types if specified. - * @param message Proof - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.crypto.merkle.Proof, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Proof to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.crypto.merkle.Proof; } } } @@ -21558,9 +4457,9 @@ export namespace tendermint { class Pair implements IPair { /** * Constructs a new Pair. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.libs.kv.IPair); + constructor(p?: tendermint.libs.kv.IPair); /** Pair key. */ public key: Uint8Array; @@ -21577,72 +4476,21 @@ export namespace tendermint { /** * Encodes the specified Pair message. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. - * @param message Pair message or plain object to encode - * @param [writer] Writer to encode to + * @param m Pair message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: tendermint.libs.kv.IPair, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. - * @param message Pair message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.libs.kv.IPair, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: $protobuf.Reader | Uint8Array, length?: number): tendermint.libs.kv.Pair; - - /** - * Decodes a Pair message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.libs.kv.Pair; - - /** - * Verifies a Pair message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Pair message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Pair - */ - public static fromObject(object: { [k: string]: any }): tendermint.libs.kv.Pair; - - /** - * Creates a plain object from a Pair message. Also converts values to other types if specified. - * @param message Pair - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.libs.kv.Pair, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Pair to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.libs.kv.Pair; } /** Properties of a KI64Pair. */ @@ -21658,9 +4506,9 @@ export namespace tendermint { class KI64Pair implements IKI64Pair { /** * Constructs a new KI64Pair. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: tendermint.libs.kv.IKI64Pair); + constructor(p?: tendermint.libs.kv.IKI64Pair); /** KI64Pair key. */ public key: Uint8Array; @@ -21677,78 +4525,21 @@ export namespace tendermint { /** * Encodes the specified KI64Pair message. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. - * @param message KI64Pair message or plain object to encode - * @param [writer] Writer to encode to + * @param m KI64Pair message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode( - message: tendermint.libs.kv.IKI64Pair, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified KI64Pair message, length delimited. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. - * @param message KI64Pair message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: tendermint.libs.kv.IKI64Pair, - writer?: $protobuf.Writer, - ): $protobuf.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 reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): tendermint.libs.kv.KI64Pair; - - /** - * Decodes a KI64Pair message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): tendermint.libs.kv.KI64Pair; - - /** - * Verifies a KI64Pair message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a KI64Pair message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KI64Pair - */ - public static fromObject(object: { [k: string]: any }): tendermint.libs.kv.KI64Pair; - - /** - * Creates a plain object from a KI64Pair message. Also converts values to other types if specified. - * @param message KI64Pair - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: tendermint.libs.kv.KI64Pair, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this KI64Pair to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): tendermint.libs.kv.KI64Pair; } } } @@ -21771,9 +4562,9 @@ export namespace google { class Any implements IAny { /** * Constructs a new Any. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.IAny); + constructor(p?: google.protobuf.IAny); /** Any type_url. */ public type_url: string; @@ -21790,3450 +4581,21 @@ export namespace google { /** * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to + * @param m Any message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IAny, - writer?: $protobuf.Writer, - ): $protobuf.Writer; + public static encode(m: google.protobuf.IAny, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: $protobuf.Reader | Uint8Array, length?: number): google.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.Any; - - /** - * Verifies an Any message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.Any, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - /** FileDescriptorSet file */ - file?: google.protobuf.IFileDescriptorProto[] | null; - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create( - properties?: google.protobuf.IFileDescriptorSet, - ): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IFileDescriptorSet, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IFileDescriptorSet, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.FileDescriptorSet, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - /** FileDescriptorProto name */ - name?: string | null; - - /** FileDescriptorProto package */ - package?: string | null; - - /** FileDescriptorProto dependency */ - dependency?: string[] | null; - - /** FileDescriptorProto publicDependency */ - publicDependency?: number[] | null; - - /** FileDescriptorProto weakDependency */ - weakDependency?: number[] | null; - - /** FileDescriptorProto messageType */ - messageType?: google.protobuf.IDescriptorProto[] | null; - - /** FileDescriptorProto enumType */ - enumType?: google.protobuf.IEnumDescriptorProto[] | null; - - /** FileDescriptorProto service */ - service?: google.protobuf.IServiceDescriptorProto[] | null; - - /** FileDescriptorProto extension */ - extension?: google.protobuf.IFieldDescriptorProto[] | null; - - /** FileDescriptorProto options */ - options?: google.protobuf.IFileOptions | null; - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: google.protobuf.ISourceCodeInfo | null; - - /** FileDescriptorProto syntax */ - syntax?: string | null; - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: google.protobuf.IFileOptions | null; - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: google.protobuf.ISourceCodeInfo | null; - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create( - properties?: google.protobuf.IFileDescriptorProto, - ): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IFileDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IFileDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.FileDescriptorProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - /** DescriptorProto name */ - name?: string | null; - - /** DescriptorProto field */ - field?: google.protobuf.IFieldDescriptorProto[] | null; - - /** DescriptorProto extension */ - extension?: google.protobuf.IFieldDescriptorProto[] | null; - - /** DescriptorProto nestedType */ - nestedType?: google.protobuf.IDescriptorProto[] | null; - - /** DescriptorProto enumType */ - enumType?: google.protobuf.IEnumDescriptorProto[] | null; - - /** DescriptorProto extensionRange */ - extensionRange?: google.protobuf.DescriptorProto.IExtensionRange[] | null; - - /** DescriptorProto oneofDecl */ - oneofDecl?: google.protobuf.IOneofDescriptorProto[] | null; - - /** DescriptorProto options */ - options?: google.protobuf.IMessageOptions | null; - - /** DescriptorProto reservedRange */ - reservedRange?: google.protobuf.DescriptorProto.IReservedRange[] | null; - - /** DescriptorProto reservedName */ - reservedName?: string[] | null; - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: google.protobuf.IMessageOptions | null; - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.DescriptorProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace DescriptorProto { - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - /** ExtensionRange start */ - start?: number | null; - - /** ExtensionRange end */ - end?: number | null; - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create( - properties?: google.protobuf.DescriptorProto.IExtensionRange, - ): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.DescriptorProto.IExtensionRange, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.DescriptorProto.IExtensionRange, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { - [k: string]: any; - }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.DescriptorProto.ExtensionRange, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - /** ReservedRange start */ - start?: number | null; - - /** ReservedRange end */ - end?: number | null; - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create( - properties?: google.protobuf.DescriptorProto.IReservedRange, - ): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.DescriptorProto.IReservedRange, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.DescriptorProto.IReservedRange, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.DescriptorProto.ReservedRange, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - /** FieldDescriptorProto name */ - name?: string | null; - - /** FieldDescriptorProto number */ - number?: number | null; - - /** FieldDescriptorProto label */ - label?: google.protobuf.FieldDescriptorProto.Label | null; - - /** FieldDescriptorProto type */ - type?: google.protobuf.FieldDescriptorProto.Type | null; - - /** FieldDescriptorProto typeName */ - typeName?: string | null; - - /** FieldDescriptorProto extendee */ - extendee?: string | null; - - /** FieldDescriptorProto defaultValue */ - defaultValue?: string | null; - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: number | null; - - /** FieldDescriptorProto jsonName */ - jsonName?: string | null; - - /** FieldDescriptorProto options */ - options?: google.protobuf.IFieldOptions | null; - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; - - /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: google.protobuf.IFieldOptions | null; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create( - properties?: google.protobuf.IFieldDescriptorProto, - ): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IFieldDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IFieldDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.FieldDescriptorProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FieldDescriptorProto { - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18, - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REQUIRED = 2, - LABEL_REPEATED = 3, - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - /** OneofDescriptorProto name */ - name?: string | null; - - /** OneofDescriptorProto options */ - options?: google.protobuf.IOneofOptions | null; - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: google.protobuf.IOneofOptions | null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create( - properties?: google.protobuf.IOneofDescriptorProto, - ): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IOneofDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IOneofDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.OneofDescriptorProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - /** EnumDescriptorProto name */ - name?: string | null; - - /** EnumDescriptorProto value */ - value?: google.protobuf.IEnumValueDescriptorProto[] | null; - - /** EnumDescriptorProto options */ - options?: google.protobuf.IEnumOptions | null; - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: google.protobuf.IEnumOptions | null; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create( - properties?: google.protobuf.IEnumDescriptorProto, - ): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IEnumDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IEnumDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.EnumDescriptorProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - /** EnumValueDescriptorProto name */ - name?: string | null; - - /** EnumValueDescriptorProto number */ - number?: number | null; - - /** EnumValueDescriptorProto options */ - options?: google.protobuf.IEnumValueOptions | null; - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: google.protobuf.IEnumValueOptions | null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create( - properties?: google.protobuf.IEnumValueDescriptorProto, - ): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IEnumValueDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IEnumValueDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.EnumValueDescriptorProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - /** ServiceDescriptorProto name */ - name?: string | null; - - /** ServiceDescriptorProto method */ - method?: google.protobuf.IMethodDescriptorProto[] | null; - - /** ServiceDescriptorProto options */ - options?: google.protobuf.IServiceOptions | null; - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: google.protobuf.IServiceOptions | null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create( - properties?: google.protobuf.IServiceDescriptorProto, - ): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IServiceDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IServiceDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.ServiceDescriptorProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - /** MethodDescriptorProto name */ - name?: string | null; - - /** MethodDescriptorProto inputType */ - inputType?: string | null; - - /** MethodDescriptorProto outputType */ - outputType?: string | null; - - /** MethodDescriptorProto options */ - options?: google.protobuf.IMethodOptions | null; - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: boolean | null; - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: boolean | null; - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: google.protobuf.IMethodOptions | null; - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create( - properties?: google.protobuf.IMethodDescriptorProto, - ): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IMethodDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IMethodDescriptorProto, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.MethodDescriptorProto, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - /** FileOptions javaPackage */ - javaPackage?: string | null; - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: string | null; - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: boolean | null; - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: boolean | null; - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: boolean | null; - - /** FileOptions optimizeFor */ - optimizeFor?: google.protobuf.FileOptions.OptimizeMode | null; - - /** FileOptions goPackage */ - goPackage?: string | null; - - /** FileOptions ccGenericServices */ - ccGenericServices?: boolean | null; - - /** FileOptions javaGenericServices */ - javaGenericServices?: boolean | null; - - /** FileOptions pyGenericServices */ - pyGenericServices?: boolean | null; - - /** FileOptions deprecated */ - deprecated?: boolean | null; - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: boolean | null; - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: string | null; - - /** FileOptions csharpNamespace */ - csharpNamespace?: string | null; - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; - - /** FileOptions .gogoproto.goprotoGettersAll */ - ".gogoproto.goprotoGettersAll"?: boolean | null; - - /** FileOptions .gogoproto.goprotoEnumPrefixAll */ - ".gogoproto.goprotoEnumPrefixAll"?: boolean | null; - - /** FileOptions .gogoproto.goprotoStringerAll */ - ".gogoproto.goprotoStringerAll"?: boolean | null; - - /** FileOptions .gogoproto.verboseEqualAll */ - ".gogoproto.verboseEqualAll"?: boolean | null; - - /** FileOptions .gogoproto.faceAll */ - ".gogoproto.faceAll"?: boolean | null; - - /** FileOptions .gogoproto.gostringAll */ - ".gogoproto.gostringAll"?: boolean | null; - - /** FileOptions .gogoproto.populateAll */ - ".gogoproto.populateAll"?: boolean | null; - - /** FileOptions .gogoproto.stringerAll */ - ".gogoproto.stringerAll"?: boolean | null; - - /** FileOptions .gogoproto.onlyoneAll */ - ".gogoproto.onlyoneAll"?: boolean | null; - - /** FileOptions .gogoproto.equalAll */ - ".gogoproto.equalAll"?: boolean | null; - - /** FileOptions .gogoproto.descriptionAll */ - ".gogoproto.descriptionAll"?: boolean | null; - - /** FileOptions .gogoproto.testgenAll */ - ".gogoproto.testgenAll"?: boolean | null; - - /** FileOptions .gogoproto.benchgenAll */ - ".gogoproto.benchgenAll"?: boolean | null; - - /** FileOptions .gogoproto.marshalerAll */ - ".gogoproto.marshalerAll"?: boolean | null; - - /** FileOptions .gogoproto.unmarshalerAll */ - ".gogoproto.unmarshalerAll"?: boolean | null; - - /** FileOptions .gogoproto.stableMarshalerAll */ - ".gogoproto.stableMarshalerAll"?: boolean | null; - - /** FileOptions .gogoproto.sizerAll */ - ".gogoproto.sizerAll"?: boolean | null; - - /** FileOptions .gogoproto.goprotoEnumStringerAll */ - ".gogoproto.goprotoEnumStringerAll"?: boolean | null; - - /** FileOptions .gogoproto.enumStringerAll */ - ".gogoproto.enumStringerAll"?: boolean | null; - - /** FileOptions .gogoproto.unsafeMarshalerAll */ - ".gogoproto.unsafeMarshalerAll"?: boolean | null; - - /** FileOptions .gogoproto.unsafeUnmarshalerAll */ - ".gogoproto.unsafeUnmarshalerAll"?: boolean | null; - - /** FileOptions .gogoproto.goprotoExtensionsMapAll */ - ".gogoproto.goprotoExtensionsMapAll"?: boolean | null; - - /** FileOptions .gogoproto.goprotoUnrecognizedAll */ - ".gogoproto.goprotoUnrecognizedAll"?: boolean | null; - - /** FileOptions .gogoproto.gogoprotoImport */ - ".gogoproto.gogoprotoImport"?: boolean | null; - - /** FileOptions .gogoproto.protosizerAll */ - ".gogoproto.protosizerAll"?: boolean | null; - - /** FileOptions .gogoproto.compareAll */ - ".gogoproto.compareAll"?: boolean | null; - - /** FileOptions .gogoproto.typedeclAll */ - ".gogoproto.typedeclAll"?: boolean | null; - - /** FileOptions .gogoproto.enumdeclAll */ - ".gogoproto.enumdeclAll"?: boolean | null; - - /** FileOptions .gogoproto.goprotoRegistration */ - ".gogoproto.goprotoRegistration"?: boolean | null; - - /** FileOptions .gogoproto.messagenameAll */ - ".gogoproto.messagenameAll"?: boolean | null; - - /** FileOptions .gogoproto.goprotoSizecacheAll */ - ".gogoproto.goprotoSizecacheAll"?: boolean | null; - - /** FileOptions .gogoproto.goprotoUnkeyedAll */ - ".gogoproto.goprotoUnkeyedAll"?: boolean | null; - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IFileOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IFileOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.FileOptions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FileOptions { - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3, - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: boolean | null; - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: boolean | null; - - /** MessageOptions deprecated */ - deprecated?: boolean | null; - - /** MessageOptions mapEntry */ - mapEntry?: boolean | null; - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; - - /** MessageOptions .cosmos_proto.interfaceType */ - ".cosmos_proto.interfaceType"?: string | null; - - /** MessageOptions .cosmos_proto.implementsInterface */ - ".cosmos_proto.implementsInterface"?: string | null; - - /** MessageOptions .gogoproto.goprotoGetters */ - ".gogoproto.goprotoGetters"?: boolean | null; - - /** MessageOptions .gogoproto.goprotoStringer */ - ".gogoproto.goprotoStringer"?: boolean | null; - - /** MessageOptions .gogoproto.verboseEqual */ - ".gogoproto.verboseEqual"?: boolean | null; - - /** MessageOptions .gogoproto.face */ - ".gogoproto.face"?: boolean | null; - - /** MessageOptions .gogoproto.gostring */ - ".gogoproto.gostring"?: boolean | null; - - /** MessageOptions .gogoproto.populate */ - ".gogoproto.populate"?: boolean | null; - - /** MessageOptions .gogoproto.stringer */ - ".gogoproto.stringer"?: boolean | null; - - /** MessageOptions .gogoproto.onlyone */ - ".gogoproto.onlyone"?: boolean | null; - - /** MessageOptions .gogoproto.equal */ - ".gogoproto.equal"?: boolean | null; - - /** MessageOptions .gogoproto.description */ - ".gogoproto.description"?: boolean | null; - - /** MessageOptions .gogoproto.testgen */ - ".gogoproto.testgen"?: boolean | null; - - /** MessageOptions .gogoproto.benchgen */ - ".gogoproto.benchgen"?: boolean | null; - - /** MessageOptions .gogoproto.marshaler */ - ".gogoproto.marshaler"?: boolean | null; - - /** MessageOptions .gogoproto.unmarshaler */ - ".gogoproto.unmarshaler"?: boolean | null; - - /** MessageOptions .gogoproto.stableMarshaler */ - ".gogoproto.stableMarshaler"?: boolean | null; - - /** MessageOptions .gogoproto.sizer */ - ".gogoproto.sizer"?: boolean | null; - - /** MessageOptions .gogoproto.unsafeMarshaler */ - ".gogoproto.unsafeMarshaler"?: boolean | null; - - /** MessageOptions .gogoproto.unsafeUnmarshaler */ - ".gogoproto.unsafeUnmarshaler"?: boolean | null; - - /** MessageOptions .gogoproto.goprotoExtensionsMap */ - ".gogoproto.goprotoExtensionsMap"?: boolean | null; - - /** MessageOptions .gogoproto.goprotoUnrecognized */ - ".gogoproto.goprotoUnrecognized"?: boolean | null; - - /** MessageOptions .gogoproto.protosizer */ - ".gogoproto.protosizer"?: boolean | null; - - /** MessageOptions .gogoproto.compare */ - ".gogoproto.compare"?: boolean | null; - - /** MessageOptions .gogoproto.typedecl */ - ".gogoproto.typedecl"?: boolean | null; - - /** MessageOptions .gogoproto.messagename */ - ".gogoproto.messagename"?: boolean | null; - - /** MessageOptions .gogoproto.goprotoSizecache */ - ".gogoproto.goprotoSizecache"?: boolean | null; - - /** MessageOptions .gogoproto.goprotoUnkeyed */ - ".gogoproto.goprotoUnkeyed"?: boolean | null; - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IMessageOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IMessageOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.MessageOptions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - /** FieldOptions ctype */ - ctype?: google.protobuf.FieldOptions.CType | null; - - /** FieldOptions packed */ - packed?: boolean | null; - - /** FieldOptions jstype */ - jstype?: google.protobuf.FieldOptions.JSType | null; - - /** FieldOptions lazy */ - lazy?: boolean | null; - - /** FieldOptions deprecated */ - deprecated?: boolean | null; - - /** FieldOptions weak */ - weak?: boolean | null; - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; - - /** FieldOptions .cosmos_proto.acceptsInterface */ - ".cosmos_proto.acceptsInterface"?: string | null; - - /** FieldOptions .gogoproto.nullable */ - ".gogoproto.nullable"?: boolean | null; - - /** FieldOptions .gogoproto.embed */ - ".gogoproto.embed"?: boolean | null; - - /** FieldOptions .gogoproto.customtype */ - ".gogoproto.customtype"?: string | null; - - /** FieldOptions .gogoproto.customname */ - ".gogoproto.customname"?: string | null; - - /** FieldOptions .gogoproto.jsontag */ - ".gogoproto.jsontag"?: string | null; - - /** FieldOptions .gogoproto.moretags */ - ".gogoproto.moretags"?: string | null; - - /** FieldOptions .gogoproto.casttype */ - ".gogoproto.casttype"?: string | null; - - /** FieldOptions .gogoproto.castkey */ - ".gogoproto.castkey"?: string | null; - - /** FieldOptions .gogoproto.castvalue */ - ".gogoproto.castvalue"?: string | null; - - /** FieldOptions .gogoproto.stdtime */ - ".gogoproto.stdtime"?: boolean | null; - - /** FieldOptions .gogoproto.stdduration */ - ".gogoproto.stdduration"?: boolean | null; - - /** FieldOptions .gogoproto.wktpointer */ - ".gogoproto.wktpointer"?: boolean | null; - - /** FieldOptions .gogoproto.castrepeated */ - ".gogoproto.castrepeated"?: string | null; - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IFieldOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IFieldOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.FieldOptions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace FieldOptions { - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2, - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2, - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IOneofOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IOneofOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.OneofOptions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - /** EnumOptions allowAlias */ - allowAlias?: boolean | null; - - /** EnumOptions deprecated */ - deprecated?: boolean | null; - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; - - /** EnumOptions .gogoproto.goprotoEnumPrefix */ - ".gogoproto.goprotoEnumPrefix"?: boolean | null; - - /** EnumOptions .gogoproto.goprotoEnumStringer */ - ".gogoproto.goprotoEnumStringer"?: boolean | null; - - /** EnumOptions .gogoproto.enumStringer */ - ".gogoproto.enumStringer"?: boolean | null; - - /** EnumOptions .gogoproto.enumCustomname */ - ".gogoproto.enumCustomname"?: string | null; - - /** EnumOptions .gogoproto.enumdecl */ - ".gogoproto.enumdecl"?: boolean | null; - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IEnumOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IEnumOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.EnumOptions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - /** EnumValueOptions deprecated */ - deprecated?: boolean | null; - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; - - /** EnumValueOptions .gogoproto.enumvalueCustomname */ - ".gogoproto.enumvalueCustomname"?: string | null; - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IEnumValueOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IEnumValueOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.EnumValueOptions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - /** ServiceOptions deprecated */ - deprecated?: boolean | null; - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IServiceOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IServiceOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.ServiceOptions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - /** MethodOptions deprecated */ - deprecated?: boolean | null; - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null; - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IMethodOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IMethodOptions, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.MethodOptions, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - /** UninterpretedOption name */ - name?: google.protobuf.UninterpretedOption.INamePart[] | null; - - /** UninterpretedOption identifierValue */ - identifierValue?: string | null; - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: number | Long | null; - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: number | Long | null; - - /** UninterpretedOption doubleValue */ - doubleValue?: number | null; - - /** UninterpretedOption stringValue */ - stringValue?: Uint8Array | null; - - /** UninterpretedOption aggregateValue */ - aggregateValue?: string | null; - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: number | Long; - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: number | Long; - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create( - properties?: google.protobuf.IUninterpretedOption, - ): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IUninterpretedOption, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IUninterpretedOption, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.UninterpretedOption, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace UninterpretedOption { - /** Properties of a NamePart. */ - interface INamePart { - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create( - properties?: google.protobuf.UninterpretedOption.INamePart, - ): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.UninterpretedOption.INamePart, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.UninterpretedOption.INamePart, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.UninterpretedOption.NamePart, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - /** SourceCodeInfo location */ - location?: google.protobuf.SourceCodeInfo.ILocation[] | null; - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.ISourceCodeInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.ISourceCodeInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.SourceCodeInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace SourceCodeInfo { - /** Properties of a Location. */ - interface ILocation { - /** Location path */ - path?: number[] | null; - - /** Location span */ - span?: number[] | null; - - /** Location leadingComments */ - leadingComments?: string | null; - - /** Location trailingComments */ - trailingComments?: string | null; - - /** Location leadingDetachedComments */ - leadingDetachedComments?: string[] | null; - } - - /** Represents a Location. */ - class Location implements ILocation { - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create( - properties?: google.protobuf.SourceCodeInfo.ILocation, - ): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.SourceCodeInfo.ILocation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.SourceCodeInfo.ILocation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.SourceCodeInfo.Location, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - /** GeneratedCodeInfo annotation */ - annotation?: google.protobuf.GeneratedCodeInfo.IAnnotation[] | null; - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create( - properties?: google.protobuf.IGeneratedCodeInfo, - ): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.IGeneratedCodeInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IGeneratedCodeInfo, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.GeneratedCodeInfo, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - namespace GeneratedCodeInfo { - /** Properties of an Annotation. */ - interface IAnnotation { - /** Annotation path */ - path?: number[] | null; - - /** Annotation sourceFile */ - sourceFile?: string | null; - - /** Annotation begin */ - begin?: number | null; - - /** Annotation end */ - end?: number | null; - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create( - properties?: google.protobuf.GeneratedCodeInfo.IAnnotation, - ): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode( - message: google.protobuf.GeneratedCodeInfo.IAnnotation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.GeneratedCodeInfo.IAnnotation, - writer?: $protobuf.Writer, - ): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode( - reader: $protobuf.Reader | Uint8Array, - length?: number, - ): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited( - reader: $protobuf.Reader | Uint8Array, - ): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.GeneratedCodeInfo.Annotation, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): google.protobuf.Any; } /** Properties of a Timestamp. */ @@ -25249,9 +4611,9 @@ export namespace google { class Timestamp implements ITimestamp { /** * Constructs a new Timestamp. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(p?: google.protobuf.ITimestamp); /** Timestamp seconds. */ public seconds: number | Long; @@ -25268,72 +4630,21 @@ export namespace google { /** * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to + * @param m Timestamp message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.ITimestamp, - writer?: $protobuf.Writer, - ): $protobuf.Writer; + public static encode(m: google.protobuf.ITimestamp, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: $protobuf.Reader | Uint8Array, length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.Timestamp, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): google.protobuf.Timestamp; } /** Properties of a Duration. */ @@ -25349,9 +4660,9 @@ export namespace google { class Duration implements IDuration { /** * Constructs a new Duration. - * @param [properties] Properties to set + * @param [p] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(p?: google.protobuf.IDuration); /** Duration seconds. */ public seconds: number | Long; @@ -25368,72 +4679,21 @@ export namespace google { /** * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to + * @param m Duration message or plain object to encode + * @param [w] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited( - message: google.protobuf.IDuration, - writer?: $protobuf.Writer, - ): $protobuf.Writer; + public static encode(m: google.protobuf.IDuration, w?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand + * @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(reader: $protobuf.Reader | Uint8Array, length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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 decodeDelimited(reader: $protobuf.Reader | Uint8Array): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): string | null; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject( - message: google.protobuf.Duration, - options?: $protobuf.IConversionOptions, - ): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + public static decode(r: $protobuf.Reader | Uint8Array, l?: number): google.protobuf.Duration; } } } From 0addb8c67fcde5f3a5b206845f433beed9869749 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 14:11:57 +0100 Subject: [PATCH 24/41] demo-protobuf: Allow use of decorators in tsconfig --- packages/demo-protobuf/tsconfig.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/demo-protobuf/tsconfig.json b/packages/demo-protobuf/tsconfig.json index 167e8c02..996a40f8 100644 --- a/packages/demo-protobuf/tsconfig.json +++ b/packages/demo-protobuf/tsconfig.json @@ -4,9 +4,8 @@ "baseUrl": ".", "outDir": "build", "declarationDir": "build/types", + "experimentalDecorators": true, "rootDir": "src" }, - "include": [ - "src/**/*" - ] + "include": ["src/**/*"] } From 362cfdb618ed7b159c9a05277a8da7223c805249 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 14:17:18 +0100 Subject: [PATCH 25/41] demo-protobuf: Add register method to registry --- packages/demo-protobuf/src/registry.spec.ts | 12 ++++++------ packages/demo-protobuf/src/registry.ts | 4 ++++ packages/demo-protobuf/types/registry.d.ts | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/demo-protobuf/src/registry.spec.ts b/packages/demo-protobuf/src/registry.spec.ts index bca286d6..c45ecb98 100644 --- a/packages/demo-protobuf/src/registry.spec.ts +++ b/packages/demo-protobuf/src/registry.spec.ts @@ -39,13 +39,13 @@ describe("registry demo", () => { }); const txBodyBytes = TxBody.encode(txBody).finish(); - const txBodyDecoded = (TxBody.decode(txBodyBytes) as unknown) as cosmosSdk.tx.v1.TxBody; + 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) as unknown) as cosmosSdk.x.bank.v1.MsgSend; + const msgSendDecoded = decoder.decode(msg.value); // fromAddress and toAddress are now Buffers expect(Uint8Array.from(msgSendDecoded.fromAddress)).toEqual(msgSend.fromAddress); @@ -60,9 +60,9 @@ describe("registry demo", () => { const TxBody = registry.lookupType("/cosmos.tx.TxBody")!; const Any = registry.lookupType("/google.protobuf.Any")!; - const msgDemo = (MsgDemo.create({ + const msgDemo = MsgDemo.create({ example: "Some example text", - }) as unknown) as MsgDemo; + }); const msgDemoBytes = MsgDemo.encode(msgDemo).finish(); const msgDemoWrapped = Any.create({ type_url: typeUrl, @@ -76,13 +76,13 @@ describe("registry demo", () => { }); const txBodyBytes = TxBody.encode(txBody).finish(); - const txBodyDecoded = (TxBody.decode(txBodyBytes) as unknown) as cosmosSdk.tx.v1.TxBody; + 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) as unknown) as MsgDemo; + 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 index 9dbf158e..9335a27e 100644 --- a/packages/demo-protobuf/src/registry.ts +++ b/packages/demo-protobuf/src/registry.ts @@ -21,6 +21,10 @@ export class Registry { ]); } + 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/types/registry.d.ts b/packages/demo-protobuf/types/registry.d.ts index 4e4a2def..3cda7f19 100644 --- a/packages/demo-protobuf/types/registry.d.ts +++ b/packages/demo-protobuf/types/registry.d.ts @@ -14,6 +14,7 @@ interface GeneratedType { export declare class Registry { private readonly types; constructor(customTypes?: Iterable<[string, GeneratedType]>); + register(name: string, type: GeneratedType): void; lookupType(name: string): GeneratedType | undefined; } export {}; From 2c90fdf029915c8eef587614f32dac15436d1945 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 14:22:56 +0100 Subject: [PATCH 26/41] demo-protobuf: Add example using protobufjs decorators --- packages/demo-protobuf/src/decorator.spec.ts | 38 ++++++++++++++++++++ packages/demo-protobuf/src/decorator.ts | 13 +++++++ packages/demo-protobuf/types/decorator.d.ts | 6 ++++ 3 files changed, 57 insertions(+) create mode 100644 packages/demo-protobuf/src/decorator.spec.ts create mode 100644 packages/demo-protobuf/src/decorator.ts create mode 100644 packages/demo-protobuf/types/decorator.d.ts diff --git a/packages/demo-protobuf/src/decorator.spec.ts b/packages/demo-protobuf/src/decorator.spec.ts new file mode 100644 index 00000000..eb934b65 --- /dev/null +++ b/packages/demo-protobuf/src/decorator.spec.ts @@ -0,0 +1,38 @@ +/* eslint-disable @typescript-eslint/camelcase */ +import { assert } from "@cosmjs/utils"; + +import { myRegistry } from "./decorator"; + +describe("decorator demo", () => { + it("works with a custom msg", () => { + const typeUrl = "/demo.MsgDemo"; + const MsgDemo = myRegistry.lookupType(typeUrl)!; + const TxBody = myRegistry.lookupType("/cosmos.tx.TxBody")!; + const Any = myRegistry.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 = myRegistry.lookupType(msg.type_url)!; + const msgDemoDecoded = decoder.decode(msg.value); + expect(msgDemoDecoded.example).toEqual(msgDemo.example); + }); +}); diff --git a/packages/demo-protobuf/src/decorator.ts b/packages/demo-protobuf/src/decorator.ts new file mode 100644 index 00000000..16548ffe --- /dev/null +++ b/packages/demo-protobuf/src/decorator.ts @@ -0,0 +1,13 @@ +import { Field, Message, Type } from "protobufjs"; + +import { Registry } from "./registry"; + +export const myRegistry = new Registry(); + +@Type.d("MsgDemo") +export class MsgDemo extends Message<{}> { + @Field.d(1, "string") + public readonly example: string = ""; +} + +myRegistry.register("/demo.MsgDemo", MsgDemo); diff --git a/packages/demo-protobuf/types/decorator.d.ts b/packages/demo-protobuf/types/decorator.d.ts new file mode 100644 index 00000000..0053b88a --- /dev/null +++ b/packages/demo-protobuf/types/decorator.d.ts @@ -0,0 +1,6 @@ +import { Message } from "protobufjs"; +import { Registry } from "./registry"; +export declare const myRegistry: Registry; +export declare class MsgDemo extends Message<{}> { + readonly example: string; +} From e9193996a9230fe9411ec8d78a7ccd69c747b1fc Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 16:19:09 +0100 Subject: [PATCH 27/41] demo-protobuf: Add shallow CosmosMessage decorator --- packages/demo-protobuf/src/decorator.ts | 11 ++++++++--- packages/demo-protobuf/src/registry.ts | 2 +- packages/demo-protobuf/types/registry.d.ts | 3 +-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/demo-protobuf/src/decorator.ts b/packages/demo-protobuf/src/decorator.ts index 16548ffe..4f5ec5ec 100644 --- a/packages/demo-protobuf/src/decorator.ts +++ b/packages/demo-protobuf/src/decorator.ts @@ -1,13 +1,18 @@ import { Field, Message, Type } from "protobufjs"; -import { Registry } from "./registry"; +import { GeneratedType, Registry } from "./registry"; export const myRegistry = new Registry(); +function CosmosMessage(registry: Registry, typeUrl: string) { + return (generatedType: GeneratedType) => { + registry.register(typeUrl, generatedType); + }; +} + +@CosmosMessage(myRegistry, "/demo.MsgDemo") @Type.d("MsgDemo") export class MsgDemo extends Message<{}> { @Field.d(1, "string") public readonly example: string = ""; } - -myRegistry.register("/demo.MsgDemo", MsgDemo); diff --git a/packages/demo-protobuf/src/registry.ts b/packages/demo-protobuf/src/registry.ts index 9335a27e..b826bf70 100644 --- a/packages/demo-protobuf/src/registry.ts +++ b/packages/demo-protobuf/src/registry.ts @@ -2,7 +2,7 @@ import protobuf from "protobufjs"; import { cosmos_sdk as cosmosSdk, google } from "./generated/codecimpl"; -interface GeneratedType { +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; diff --git a/packages/demo-protobuf/types/registry.d.ts b/packages/demo-protobuf/types/registry.d.ts index 3cda7f19..09ca8bba 100644 --- a/packages/demo-protobuf/types/registry.d.ts +++ b/packages/demo-protobuf/types/registry.d.ts @@ -1,5 +1,5 @@ import protobuf from "protobufjs"; -interface GeneratedType { +export interface GeneratedType { readonly create: (properties?: { [k: string]: any }) => any; readonly encode: ( message: @@ -17,4 +17,3 @@ export declare class Registry { register(name: string, type: GeneratedType): void; lookupType(name: string): GeneratedType | undefined; } -export {}; From 1ff83189dba6c4704d4a4c712f17375b91662e60 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 16:42:05 +0100 Subject: [PATCH 28/41] demo-protobuf: Include protobuf type decorator in CosmosMessage --- packages/demo-protobuf/src/decorator.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/demo-protobuf/src/decorator.ts b/packages/demo-protobuf/src/decorator.ts index 4f5ec5ec..0ee99b97 100644 --- a/packages/demo-protobuf/src/decorator.ts +++ b/packages/demo-protobuf/src/decorator.ts @@ -1,17 +1,23 @@ -import { Field, Message, Type } from "protobufjs"; +import { Constructor, Field, Message, TypeDecorator, util } from "protobufjs"; -import { GeneratedType, Registry } from "./registry"; +import { Registry } from "./registry"; export const myRegistry = new Registry(); -function CosmosMessage(registry: Registry, typeUrl: string) { - return (generatedType: GeneratedType) => { +function getTypeName(typeUrl: string): string { + const parts = typeUrl.split("."); + return parts[parts.length - 1]; +} + +function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator { + return (constructor: Constructor>) => { + const typeName = getTypeName(typeUrl); + const generatedType = util.decorateType(constructor, typeName); registry.register(typeUrl, generatedType); }; } @CosmosMessage(myRegistry, "/demo.MsgDemo") -@Type.d("MsgDemo") export class MsgDemo extends Message<{}> { @Field.d(1, "string") public readonly example: string = ""; From 8eeb52999ceb6e3de23ffb499cb844d6b24a3c56 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 16 Jun 2020 18:09:24 +0100 Subject: [PATCH 29/41] demo-protobuf: Wrap protobuf field decorator --- packages/demo-protobuf/src/decorator.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/demo-protobuf/src/decorator.ts b/packages/demo-protobuf/src/decorator.ts index 0ee99b97..8cc918d7 100644 --- a/packages/demo-protobuf/src/decorator.ts +++ b/packages/demo-protobuf/src/decorator.ts @@ -17,8 +17,12 @@ function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator }; } +const CosmosField = { + String: (id: number) => Field.d(id, "string"), +}; + @CosmosMessage(myRegistry, "/demo.MsgDemo") export class MsgDemo extends Message<{}> { - @Field.d(1, "string") + @CosmosField.String(1) public readonly example: string = ""; } From 723d17ed596453abce83c79452e7ca37834fd378 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 18 Jun 2020 13:05:00 +0200 Subject: [PATCH 30/41] demo-protobuf: Do not use svn in get-proto script --- packages/demo-protobuf/scripts/get-proto.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/demo-protobuf/scripts/get-proto.sh b/packages/demo-protobuf/scripts/get-proto.sh index 87ad5e63..f904a8e4 100755 --- a/packages/demo-protobuf/scripts/get-proto.sh +++ b/packages/demo-protobuf/scripts/get-proto.sh @@ -4,8 +4,14 @@ 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#v} -mkdir -p $COSMOS_DIR +mkdir -p "$COSMOS_DIR" -svn export "https://github.com/cosmos/cosmos-sdk/trunk" "$COSMOS_DIR/cosmos-sdk" -# svn export "https://github.com/cosmos/cosmos-sdk/tags/v0.38.4" "$COSMOS_DIR/cosmos-sdk" +wget -qO "$ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$REF.zip" \ +&& unzip "$ZIP_FILE" -d "$COSMOS_DIR" \ +&& mv "$COSMOS_SDK_DIR-$SUFFIX" "$COSMOS_SDK_DIR" \ +&& rm "$ZIP_FILE" From d42af2bd264aa0027b2ed33c61ae8b1265ce3123 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 18 Jun 2020 13:24:18 +0200 Subject: [PATCH 31/41] demo-protobuf: Handle edge case in git archive for proto download --- packages/demo-protobuf/scripts/get-proto.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/demo-protobuf/scripts/get-proto.sh b/packages/demo-protobuf/scripts/get-proto.sh index f904a8e4..0617018b 100755 --- a/packages/demo-protobuf/scripts/get-proto.sh +++ b/packages/demo-protobuf/scripts/get-proto.sh @@ -7,7 +7,9 @@ COSMOS_DIR="$PROTO_DIR/cosmos" COSMOS_SDK_DIR="$COSMOS_DIR/cosmos-sdk" ZIP_FILE="$COSMOS_DIR/tmp.zip" REF=${REF:-"master"} -SUFFIX=${REF#v} +SUFFIX=${REF} + +[[ $SUFFIX =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && SUFFIX=${SUFFIX#v} mkdir -p "$COSMOS_DIR" From 8f63359962dc5120ec4173cb1720868dc131ec9f Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 18 Jun 2020 13:26:12 +0200 Subject: [PATCH 32/41] demo-protobuf: Add master ref to get-proto yarn script --- packages/demo-protobuf/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/demo-protobuf/package.json b/packages/demo-protobuf/package.json index 997dc050..913b9bf8 100644 --- a/packages/demo-protobuf/package.json +++ b/packages/demo-protobuf/package.json @@ -32,7 +32,7 @@ "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": "./scripts/get-proto.sh", + "get-proto": "REF=master ./scripts/get-proto.sh", "prepack-proto": "mkdir -p src/generated", "pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.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.js -o src/generated/codecimpl.d.ts" From 4f4f0cd6823f7ab96080f072e008f8373fd524e0 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 18 Jun 2020 13:43:05 +0200 Subject: [PATCH 33/41] demo-protobuf: Rearrange decorate demo --- packages/demo-protobuf/src/decorator.spec.ts | 22 ++++++++++++++------ packages/demo-protobuf/src/decorator.ts | 12 ++--------- packages/demo-protobuf/types/decorator.d.ts | 10 ++++----- 3 files changed, 23 insertions(+), 21 deletions(-) diff --git a/packages/demo-protobuf/src/decorator.spec.ts b/packages/demo-protobuf/src/decorator.spec.ts index eb934b65..776f7f4f 100644 --- a/packages/demo-protobuf/src/decorator.spec.ts +++ b/packages/demo-protobuf/src/decorator.spec.ts @@ -1,19 +1,30 @@ /* eslint-disable @typescript-eslint/camelcase */ import { assert } from "@cosmjs/utils"; +import { Message } from "protobufjs"; -import { myRegistry } from "./decorator"; +import { CosmosField, CosmosMessage } from "./decorator"; +import { Registry } from "./registry"; describe("decorator demo", () => { it("works with a custom msg", () => { const typeUrl = "/demo.MsgDemo"; - const MsgDemo = myRegistry.lookupType(typeUrl)!; + const myRegistry = new Registry(); + + @CosmosMessage(myRegistry, typeUrl) + // eslint-disable-next-line @typescript-eslint/no-unused-vars + class MsgDemo extends Message<{}> { + @CosmosField.String(1) + public readonly example: string = ""; + } + + const MsgDemoT = myRegistry.lookupType(typeUrl)!; const TxBody = myRegistry.lookupType("/cosmos.tx.TxBody")!; const Any = myRegistry.lookupType("/google.protobuf.Any")!; - const msgDemo = MsgDemo.create({ + const msgDemo = MsgDemoT.create({ example: "Some example text", }); - const msgDemoBytes = MsgDemo.encode(msgDemo).finish(); + const msgDemoBytes = MsgDemoT.encode(msgDemo).finish(); const msgDemoWrapped = Any.create({ type_url: typeUrl, value: msgDemoBytes, @@ -31,8 +42,7 @@ describe("decorator demo", () => { assert(msg.type_url); assert(msg.value); - const decoder = myRegistry.lookupType(msg.type_url)!; - const msgDemoDecoded = decoder.decode(msg.value); + const msgDemoDecoded = MsgDemoT.decode(msg.value); expect(msgDemoDecoded.example).toEqual(msgDemo.example); }); }); diff --git a/packages/demo-protobuf/src/decorator.ts b/packages/demo-protobuf/src/decorator.ts index 8cc918d7..febf37c4 100644 --- a/packages/demo-protobuf/src/decorator.ts +++ b/packages/demo-protobuf/src/decorator.ts @@ -2,14 +2,12 @@ import { Constructor, Field, Message, TypeDecorator, util } from "protobufjs"; import { Registry } from "./registry"; -export const myRegistry = new Registry(); - function getTypeName(typeUrl: string): string { const parts = typeUrl.split("."); return parts[parts.length - 1]; } -function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator { +export function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator { return (constructor: Constructor>) => { const typeName = getTypeName(typeUrl); const generatedType = util.decorateType(constructor, typeName); @@ -17,12 +15,6 @@ function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator }; } -const CosmosField = { +export const CosmosField = { String: (id: number) => Field.d(id, "string"), }; - -@CosmosMessage(myRegistry, "/demo.MsgDemo") -export class MsgDemo extends Message<{}> { - @CosmosField.String(1) - public readonly example: string = ""; -} diff --git a/packages/demo-protobuf/types/decorator.d.ts b/packages/demo-protobuf/types/decorator.d.ts index 0053b88a..ef014457 100644 --- a/packages/demo-protobuf/types/decorator.d.ts +++ b/packages/demo-protobuf/types/decorator.d.ts @@ -1,6 +1,6 @@ -import { Message } from "protobufjs"; +import { TypeDecorator } from "protobufjs"; import { Registry } from "./registry"; -export declare const myRegistry: Registry; -export declare class MsgDemo extends Message<{}> { - readonly example: string; -} +export declare function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator; +export declare const CosmosField: { + String: (id: number) => import("protobufjs").FieldDecorator; +}; From 9d5616c445722390e32d47144fdc26f7fdbebac0 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 18 Jun 2020 14:20:53 +0200 Subject: [PATCH 34/41] Extract *.proto files only --- packages/demo-protobuf/scripts/get-proto.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/demo-protobuf/scripts/get-proto.sh b/packages/demo-protobuf/scripts/get-proto.sh index 0617018b..00766542 100755 --- a/packages/demo-protobuf/scripts/get-proto.sh +++ b/packages/demo-protobuf/scripts/get-proto.sh @@ -14,6 +14,6 @@ SUFFIX=${REF} mkdir -p "$COSMOS_DIR" wget -qO "$ZIP_FILE" "https://github.com/cosmos/cosmos-sdk/archive/$REF.zip" \ -&& unzip "$ZIP_FILE" -d "$COSMOS_DIR" \ -&& mv "$COSMOS_SDK_DIR-$SUFFIX" "$COSMOS_SDK_DIR" \ -&& rm "$ZIP_FILE" + && unzip "$ZIP_FILE" "*.proto" -d "$COSMOS_DIR" \ + && mv "$COSMOS_SDK_DIR-$SUFFIX" "$COSMOS_SDK_DIR" \ + && rm "$ZIP_FILE" From 8a1a96132236ea34cb41094a6211841d972edf0b Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 18 Jun 2020 14:28:23 +0200 Subject: [PATCH 35/41] Prettify generated code and remove comments from .js --- packages/demo-protobuf/package.json | 6 +- .../src/generated/codecimpl.d.ts | 9002 ++++++----- .../demo-protobuf/src/generated/codecimpl.js | 13464 +++++----------- 3 files changed, 8340 insertions(+), 14132 deletions(-) diff --git a/packages/demo-protobuf/package.json b/packages/demo-protobuf/package.json index 913b9bf8..e0ebdcb3 100644 --- a/packages/demo-protobuf/package.json +++ b/packages/demo-protobuf/package.json @@ -33,9 +33,9 @@ "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", - "prepack-proto": "mkdir -p src/generated", - "pack-proto": "pbjs -t static-module -w commonjs -o src/generated/codecimpl.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.js -o src/generated/codecimpl.d.ts" + "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", + "postdefine-proto": "tsc --removeComments --outFile src/generated/codecimpl.js --allowJs src/generated/codecimpl.tmp.js && rm src/generated/codecimpl.tmp.js && prettier --write \"src/generated/codecimpl.*\"" }, "dependencies": { "protobufjs": "~6.9.0" diff --git a/packages/demo-protobuf/src/generated/codecimpl.d.ts b/packages/demo-protobuf/src/generated/codecimpl.d.ts index 211113b9..8ae30088 100644 --- a/packages/demo-protobuf/src/generated/codecimpl.d.ts +++ b/packages/demo-protobuf/src/generated/codecimpl.d.ts @@ -1,4543 +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; - /** Namespace x. */ - namespace x { + /** MsgSend toAddress */ + toAddress?: Uint8Array | null; - /** 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; - } - } + /** 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; - /** Properties of a Coin. */ - interface ICoin { + /** Tx authInfo */ + authInfo?: cosmos_sdk.tx.v1.IAuthInfo | null; - /** Coin denom */ - denom?: (string|null); + /** Tx signatures */ + signatures?: Uint8Array[] | null; + } - /** Coin amount */ - amount?: (string|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 Coin. */ - class Coin implements ICoin { + /** Represents a Single. */ + class Single implements ISingle { + /** + * Constructs a new Single. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.tx.v1.ModeInfo.ISingle); - /** - * Constructs a new Coin. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.ICoin); + /** Single mode. */ + public mode: cosmos_sdk.tx.signing.v1.SignMode; - /** Coin denom. */ - public denom: string; + /** + * 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; - /** Coin amount. */ - public amount: string; + /** + * 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; - /** - * 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; + /** + * 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 DecCoin. */ - interface IDecCoin { + /** Properties of a Multi. */ + interface IMulti { + /** Multi bitarray */ + bitarray?: cosmos_sdk.crypto.v1.ICompactBitArray | null; - /** DecCoin denom */ - denom?: (string|null); - - /** DecCoin amount */ - amount?: (string|null); + /** Multi modeInfos */ + modeInfos?: cosmos_sdk.tx.v1.IModeInfo[] | null; } - /** Represents a DecCoin. */ - class DecCoin implements IDecCoin { + /** Represents a Multi. */ + class Multi implements IMulti { + /** + * Constructs a new Multi. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.tx.v1.ModeInfo.IMulti); - /** - * Constructs a new DecCoin. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.v1.IDecCoin); + /** Multi bitarray. */ + public bitarray?: cosmos_sdk.crypto.v1.ICompactBitArray | null; - /** DecCoin denom. */ - public denom: string; + /** Multi modeInfos. */ + public modeInfos: cosmos_sdk.tx.v1.IModeInfo[]; - /** DecCoin amount. */ - public amount: string; + /** + * 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; - /** - * 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 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; - /** - * 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; + /** + * 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 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 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 crypto. */ + namespace crypto { + /** Namespace v1. */ + namespace v1 { + /** Properties of a PublicKey. */ + interface IPublicKey { + /** PublicKey secp256k1 */ + secp256k1?: Uint8Array | null; - /** Namespace v1. */ - namespace v1 { + /** PublicKey ed25519 */ + ed25519?: Uint8Array | null; - /** Properties of a PublicKey. */ - interface IPublicKey { + /** PublicKey sr25519 */ + sr25519?: Uint8Array | null; - /** PublicKey secp256k1 */ - secp256k1?: (Uint8Array|null); + /** PublicKey multisig */ + multisig?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold | null; - /** PublicKey ed25519 */ - ed25519?: (Uint8Array|null); + /** PublicKey secp256r1 */ + secp256r1?: Uint8Array | null; - /** PublicKey sr25519 */ - sr25519?: (Uint8Array|null); + /** PublicKey anyPubkey */ + anyPubkey?: google.protobuf.IAny | null; + } - /** PublicKey multisig */ - multisig?: (cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|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 secp256r1 */ - secp256r1?: (Uint8Array|null); + /** PublicKey secp256k1. */ + public secp256k1: Uint8Array; - /** PublicKey anyPubkey */ - anyPubkey?: (google.protobuf.IAny|null); - } + /** PublicKey ed25519. */ + public ed25519: Uint8Array; - /** Represents a PublicKey. */ - class PublicKey implements IPublicKey { + /** PublicKey sr25519. */ + public sr25519: Uint8Array; - /** - * Constructs a new PublicKey. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.IPublicKey); + /** PublicKey multisig. */ + public multisig?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold | null; - /** PublicKey secp256k1. */ - public secp256k1: Uint8Array; + /** PublicKey secp256r1. */ + public secp256r1: Uint8Array; - /** PublicKey ed25519. */ - public ed25519: Uint8Array; + /** PublicKey anyPubkey. */ + public anyPubkey?: google.protobuf.IAny | null; - /** PublicKey sr25519. */ - public sr25519: Uint8Array; + /** PublicKey sum. */ + public sum?: "secp256k1" | "ed25519" | "sr25519" | "multisig" | "secp256r1" | "anyPubkey"; - /** PublicKey multisig. */ - public multisig?: (cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null); + /** + * 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; - /** PublicKey secp256r1. */ - public secp256r1: Uint8Array; + /** + * 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; - /** PublicKey anyPubkey. */ - public anyPubkey?: (google.protobuf.IAny|null); + /** + * 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; + } - /** PublicKey sum. */ - public sum?: ("secp256k1"|"ed25519"|"sr25519"|"multisig"|"secp256r1"|"anyPubkey"); + /** Properties of a PubKeyMultisigThreshold. */ + interface IPubKeyMultisigThreshold { + /** PubKeyMultisigThreshold threshold */ + threshold?: number | null; - /** - * 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; + /** PubKeyMultisigThreshold publicKeys */ + publicKeys?: cosmos_sdk.crypto.v1.IPublicKey[] | null; + } - /** - * 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; + /** Represents a PubKeyMultisigThreshold. */ + class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** + * Constructs a new PubKeyMultisigThreshold. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); - /** - * 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; - } + /** PubKeyMultisigThreshold threshold. */ + public threshold: number; - /** Properties of a PubKeyMultisigThreshold. */ - interface IPubKeyMultisigThreshold { + /** PubKeyMultisigThreshold publicKeys. */ + public publicKeys: cosmos_sdk.crypto.v1.IPublicKey[]; - /** PubKeyMultisigThreshold threshold */ - threshold?: (number|null); + /** + * 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; - /** PubKeyMultisigThreshold publicKeys */ - publicKeys?: (cosmos_sdk.crypto.v1.IPublicKey[]|null); - } + /** + * 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; - /** Represents a PubKeyMultisigThreshold. */ - class PubKeyMultisigThreshold implements IPubKeyMultisigThreshold { + /** + * 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; + } - /** - * Constructs a new PubKeyMultisigThreshold. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold); + /** Properties of a MultiSignature. */ + interface IMultiSignature { + /** MultiSignature signatures */ + signatures?: Uint8Array[] | null; + } - /** PubKeyMultisigThreshold threshold. */ - public threshold: number; + /** Represents a MultiSignature. */ + class MultiSignature implements IMultiSignature { + /** + * Constructs a new MultiSignature. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.crypto.v1.IMultiSignature); - /** PubKeyMultisigThreshold publicKeys. */ - public publicKeys: cosmos_sdk.crypto.v1.IPublicKey[]; + /** MultiSignature signatures. */ + public signatures: Uint8Array[]; - /** - * 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; + /** + * 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 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; + /** + * 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 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; - } + /** + * 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 MultiSignature. */ - interface IMultiSignature { + /** Properties of a CompactBitArray. */ + interface ICompactBitArray { + /** CompactBitArray extraBitsStored */ + extraBitsStored?: number | null; - /** MultiSignature signatures */ - signatures?: (Uint8Array[]|null); - } + /** CompactBitArray elems */ + elems?: Uint8Array | null; + } - /** Represents a MultiSignature. */ - class MultiSignature implements IMultiSignature { + /** Represents a CompactBitArray. */ + class CompactBitArray implements ICompactBitArray { + /** + * Constructs a new CompactBitArray. + * @param [p] Properties to set + */ + constructor(p?: cosmos_sdk.crypto.v1.ICompactBitArray); - /** - * Constructs a new MultiSignature. - * @param [p] Properties to set - */ - constructor(p?: cosmos_sdk.crypto.v1.IMultiSignature); + /** CompactBitArray extraBitsStored. */ + public extraBitsStored: number; - /** MultiSignature signatures. */ - public signatures: Uint8Array[]; + /** CompactBitArray elems. */ + public elems: 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; + /** + * 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 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; + /** + * 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 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; - } - } + /** + * 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 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 crypto. */ + namespace crypto { + /** Namespace merkle. */ + namespace merkle { + /** Properties of a ProofOp. */ + interface IProofOp { + /** ProofOp type */ + type?: string | null; - /** Namespace merkle. */ - namespace merkle { + /** ProofOp key */ + key?: Uint8Array | null; - /** Properties of a ProofOp. */ - interface IProofOp { + /** ProofOp data */ + data?: Uint8Array | null; + } - /** ProofOp type */ - type?: (string|null); + /** Represents a ProofOp. */ + class ProofOp implements IProofOp { + /** + * Constructs a new ProofOp. + * @param [p] Properties to set + */ + constructor(p?: tendermint.crypto.merkle.IProofOp); - /** ProofOp key */ - key?: (Uint8Array|null); + /** ProofOp type. */ + public type: string; - /** ProofOp data */ - data?: (Uint8Array|null); - } + /** ProofOp key. */ + public key: Uint8Array; - /** Represents a ProofOp. */ - class ProofOp implements IProofOp { + /** ProofOp data. */ + public data: Uint8Array; - /** - * Constructs a new ProofOp. - * @param [p] Properties to set - */ - constructor(p?: tendermint.crypto.merkle.IProofOp); + /** + * 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; - /** ProofOp type. */ - public type: string; + /** + * 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; - /** ProofOp key. */ - public key: Uint8Array; + /** + * 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; + } - /** ProofOp data. */ - public data: Uint8Array; + /** Properties of a Proof. */ + interface IProof { + /** Proof ops */ + ops?: tendermint.crypto.merkle.IProofOp[] | null; + } - /** - * 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; + /** Represents a Proof. */ + class Proof implements IProof { + /** + * Constructs a new Proof. + * @param [p] Properties to set + */ + constructor(p?: tendermint.crypto.merkle.IProof); - /** - * 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; + /** Proof ops. */ + public ops: tendermint.crypto.merkle.IProofOp[]; - /** - * 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; - } + /** + * 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; - /** Properties of a Proof. */ - interface IProof { + /** + * 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; - /** 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; - } - } + /** + * 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 libs. */ + namespace libs { + /** Namespace kv. */ + namespace kv { + /** Properties of a Pair. */ + interface IPair { + /** Pair key */ + key?: Uint8Array | null; - /** Namespace kv. */ - namespace kv { + /** Pair value */ + value?: Uint8Array | null; + } - /** Properties of a Pair. */ - interface IPair { + /** Represents a Pair. */ + class Pair implements IPair { + /** + * Constructs a new Pair. + * @param [p] Properties to set + */ + constructor(p?: tendermint.libs.kv.IPair); - /** Pair key */ - key?: (Uint8Array|null); + /** Pair key. */ + public key: Uint8Array; - /** Pair value */ - value?: (Uint8Array|null); - } + /** Pair value. */ + public value: Uint8Array; - /** Represents a Pair. */ - class Pair implements IPair { + /** + * 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; - /** - * Constructs a new Pair. - * @param [p] Properties to set - */ - constructor(p?: tendermint.libs.kv.IPair); + /** + * 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; - /** Pair key. */ - public key: Uint8Array; + /** + * 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; + } - /** Pair value. */ - public value: Uint8Array; + /** Properties of a KI64Pair. */ + interface IKI64Pair { + /** KI64Pair key */ + key?: Uint8Array | null; - /** - * 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; + /** KI64Pair value */ + value?: number | Long | null; + } - /** - * 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; + /** Represents a KI64Pair. */ + class KI64Pair implements IKI64Pair { + /** + * Constructs a new KI64Pair. + * @param [p] Properties to set + */ + constructor(p?: tendermint.libs.kv.IKI64Pair); - /** - * 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; - } + /** KI64Pair key. */ + public key: Uint8Array; - /** Properties of a KI64Pair. */ - interface IKI64Pair { + /** KI64Pair value. */ + public value: number | Long; - /** KI64Pair key */ - key?: (Uint8Array|null); + /** + * 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; - /** KI64Pair value */ - value?: (number|Long|null); - } + /** + * 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; - /** 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; - } - } + /** + * 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; - /** 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; - } + /** 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 index 99911965..97f9943f 100644 --- a/packages/demo-protobuf/src/generated/codecimpl.js +++ b/packages/demo-protobuf/src/generated/codecimpl.js @@ -1,9739 +1,3791 @@ -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ "use strict"; - var $protobuf = require("protobufjs/minimal"); - -// Common aliases -var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - -// Exported root namespace +var $Reader = $protobuf.Reader, + $Writer = $protobuf.Writer, + $util = $protobuf.util; var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {}); - -$root.cosmos_sdk = (function() { - - /** - * Namespace cosmos_sdk. - * @exports cosmos_sdk - * @namespace - */ - var cosmos_sdk = {}; - - cosmos_sdk.x = (function() { - - /** - * Namespace x. - * @memberof cosmos_sdk - * @namespace - */ - var x = {}; - - x.bank = (function() { - - /** - * Namespace bank. - * @memberof cosmos_sdk.x - * @namespace - */ - var bank = {}; - - bank.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.x.bank - * @namespace - */ - var v1 = {}; - - v1.MsgSend = (function() { - - /** - * Properties of a MsgSend. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IMsgSend - * @property {Uint8Array|null} [fromAddress] MsgSend fromAddress - * @property {Uint8Array|null} [toAddress] MsgSend toAddress - * @property {Array.|null} [amount] MsgSend amount - */ - - /** - * Constructs a new MsgSend. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a MsgSend. - * @implements IMsgSend - * @constructor - * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [p] Properties to set - */ - 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 fromAddress. - * @member {Uint8Array} fromAddress - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @instance - */ - MsgSend.prototype.fromAddress = $util.newBuffer([]); - - /** - * MsgSend toAddress. - * @member {Uint8Array} toAddress - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @instance - */ - MsgSend.prototype.toAddress = $util.newBuffer([]); - - /** - * MsgSend amount. - * @member {Array.} amount - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @instance - */ - MsgSend.prototype.amount = $util.emptyArray; - - /** - * Creates a new MsgSend instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgSend=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend instance - */ - MsgSend.create = function create(properties) { - return new MsgSend(properties); - }; - - /** - * Encodes the specified MsgSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgSend.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgSend} m MsgSend message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a MsgSend message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.MsgSend - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.MsgSend} MsgSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgSend.decode = function decode(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() { - - /** - * Properties of an Input. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IInput - * @property {Uint8Array|null} [address] Input address - * @property {Array.|null} [coins] Input coins - */ - - /** - * Constructs a new Input. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents an Input. - * @implements IInput - * @constructor - * @param {cosmos_sdk.x.bank.v1.IInput=} [p] Properties to set - */ - 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 address. - * @member {Uint8Array} address - * @memberof cosmos_sdk.x.bank.v1.Input - * @instance - */ - Input.prototype.address = $util.newBuffer([]); - - /** - * Input coins. - * @member {Array.} coins - * @memberof cosmos_sdk.x.bank.v1.Input - * @instance - */ - Input.prototype.coins = $util.emptyArray; - - /** - * Creates a new Input instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {cosmos_sdk.x.bank.v1.IInput=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.Input} Input instance - */ - Input.create = function create(properties) { - return new Input(properties); - }; - - /** - * Encodes the specified Input message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Input.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {cosmos_sdk.x.bank.v1.IInput} m Input message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an Input message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.Input - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.Input} Input - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Input.decode = function decode(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() { - - /** - * Properties of an Output. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IOutput - * @property {Uint8Array|null} [address] Output address - * @property {Array.|null} [coins] Output coins - */ - - /** - * Constructs a new Output. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents an Output. - * @implements IOutput - * @constructor - * @param {cosmos_sdk.x.bank.v1.IOutput=} [p] Properties to set - */ - 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 address. - * @member {Uint8Array} address - * @memberof cosmos_sdk.x.bank.v1.Output - * @instance - */ - Output.prototype.address = $util.newBuffer([]); - - /** - * Output coins. - * @member {Array.} coins - * @memberof cosmos_sdk.x.bank.v1.Output - * @instance - */ - Output.prototype.coins = $util.emptyArray; - - /** - * Creates a new Output instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {cosmos_sdk.x.bank.v1.IOutput=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.Output} Output instance - */ - Output.create = function create(properties) { - return new Output(properties); - }; - - /** - * Encodes the specified Output message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Output.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {cosmos_sdk.x.bank.v1.IOutput} m Output message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an Output message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.Output - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.Output} Output - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Output.decode = function decode(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() { - - /** - * Properties of a MsgMultiSend. - * @memberof cosmos_sdk.x.bank.v1 - * @interface IMsgMultiSend - * @property {Array.|null} [inputs] MsgMultiSend inputs - * @property {Array.|null} [outputs] MsgMultiSend outputs - */ - - /** - * Constructs a new MsgMultiSend. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a MsgMultiSend. - * @implements IMsgMultiSend - * @constructor - * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [p] Properties to set - */ - 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 inputs. - * @member {Array.} inputs - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @instance - */ - MsgMultiSend.prototype.inputs = $util.emptyArray; - - /** - * MsgMultiSend outputs. - * @member {Array.} outputs - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @instance - */ - MsgMultiSend.prototype.outputs = $util.emptyArray; - - /** - * Creates a new MsgMultiSend instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend instance - */ - MsgMultiSend.create = function create(properties) { - return new MsgMultiSend(properties); - }; - - /** - * Encodes the specified MsgMultiSend message. Does not implicitly {@link cosmos_sdk.x.bank.v1.MsgMultiSend.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {cosmos_sdk.x.bank.v1.IMsgMultiSend} m MsgMultiSend message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a MsgMultiSend message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.MsgMultiSend - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.MsgMultiSend} MsgMultiSend - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgMultiSend.decode = function decode(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() { - - /** - * Properties of a Supply. - * @memberof cosmos_sdk.x.bank.v1 - * @interface ISupply - * @property {Array.|null} [total] Supply total - */ - - /** - * Constructs a new Supply. - * @memberof cosmos_sdk.x.bank.v1 - * @classdesc Represents a Supply. - * @implements ISupply - * @constructor - * @param {cosmos_sdk.x.bank.v1.ISupply=} [p] Properties to set - */ - 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 total. - * @member {Array.} total - * @memberof cosmos_sdk.x.bank.v1.Supply - * @instance - */ - Supply.prototype.total = $util.emptyArray; - - /** - * Creates a new Supply instance using the specified properties. - * @function create - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {cosmos_sdk.x.bank.v1.ISupply=} [properties] Properties to set - * @returns {cosmos_sdk.x.bank.v1.Supply} Supply instance - */ - Supply.create = function create(properties) { - return new Supply(properties); - }; - - /** - * Encodes the specified Supply message. Does not implicitly {@link cosmos_sdk.x.bank.v1.Supply.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {cosmos_sdk.x.bank.v1.ISupply} m Supply message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Supply message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.x.bank.v1.Supply - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.x.bank.v1.Supply} Supply - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Supply.decode = function decode(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() { - - /** - * Namespace v1. - * @memberof cosmos_sdk - * @namespace - */ +$root.cosmos_sdk = (function () { + var cosmos_sdk = {}; + cosmos_sdk.x = (function () { + var x = {}; + x.bank = (function () { + var bank = {}; + bank.v1 = (function () { var v1 = {}; - - v1.Coin = (function() { - - /** - * Properties of a Coin. - * @memberof cosmos_sdk.v1 - * @interface ICoin - * @property {string|null} [denom] Coin denom - * @property {string|null} [amount] Coin amount - */ - - /** - * Constructs a new Coin. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a Coin. - * @implements ICoin - * @constructor - * @param {cosmos_sdk.v1.ICoin=} [p] Properties to set - */ - 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]]; + 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(); } - - /** - * Coin denom. - * @member {string} denom - * @memberof cosmos_sdk.v1.Coin - * @instance - */ - Coin.prototype.denom = ""; - - /** - * Coin amount. - * @member {string} amount - * @memberof cosmos_sdk.v1.Coin - * @instance - */ - Coin.prototype.amount = ""; - - /** - * Creates a new Coin instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {cosmos_sdk.v1.ICoin=} [properties] Properties to set - * @returns {cosmos_sdk.v1.Coin} Coin instance - */ - Coin.create = function create(properties) { - return new Coin(properties); - }; - - /** - * Encodes the specified Coin message. Does not implicitly {@link cosmos_sdk.v1.Coin.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {cosmos_sdk.v1.ICoin} m Coin message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Coin message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.Coin - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.Coin} Coin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a DecCoin. - * @memberof cosmos_sdk.v1 - * @interface IDecCoin - * @property {string|null} [denom] DecCoin denom - * @property {string|null} [amount] DecCoin amount - */ - - /** - * Constructs a new DecCoin. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a DecCoin. - * @implements IDecCoin - * @constructor - * @param {cosmos_sdk.v1.IDecCoin=} [p] Properties to set - */ - 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]]; + 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; + } } - - /** - * DecCoin denom. - * @member {string} denom - * @memberof cosmos_sdk.v1.DecCoin - * @instance - */ - DecCoin.prototype.denom = ""; - - /** - * DecCoin amount. - * @member {string} amount - * @memberof cosmos_sdk.v1.DecCoin - * @instance - */ - DecCoin.prototype.amount = ""; - - /** - * Creates a new DecCoin instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {cosmos_sdk.v1.IDecCoin=} [properties] Properties to set - * @returns {cosmos_sdk.v1.DecCoin} DecCoin instance - */ - DecCoin.create = function create(properties) { - return new DecCoin(properties); - }; - - /** - * Encodes the specified DecCoin message. Does not implicitly {@link cosmos_sdk.v1.DecCoin.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {cosmos_sdk.v1.IDecCoin} m DecCoin message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a DecCoin message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.DecCoin - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.DecCoin} DecCoin - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; + return m; + }; + return MsgSend; })(); - - v1.IntProto = (function() { - - /** - * Properties of an IntProto. - * @memberof cosmos_sdk.v1 - * @interface IIntProto - * @property {string|null} [int] IntProto int - */ - - /** - * Constructs a new IntProto. - * @memberof cosmos_sdk.v1 - * @classdesc Represents an IntProto. - * @implements IIntProto - * @constructor - * @param {cosmos_sdk.v1.IIntProto=} [p] Properties to set - */ - 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]]; + 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(); } - - /** - * IntProto int. - * @member {string} int - * @memberof cosmos_sdk.v1.IntProto - * @instance - */ - IntProto.prototype.int = ""; - - /** - * Creates a new IntProto instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {cosmos_sdk.v1.IIntProto=} [properties] Properties to set - * @returns {cosmos_sdk.v1.IntProto} IntProto instance - */ - IntProto.create = function create(properties) { - return new IntProto(properties); - }; - - /** - * Encodes the specified IntProto message. Does not implicitly {@link cosmos_sdk.v1.IntProto.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {cosmos_sdk.v1.IIntProto} m IntProto message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an IntProto message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.IntProto - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.IntProto} IntProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a DecProto. - * @memberof cosmos_sdk.v1 - * @interface IDecProto - * @property {string|null} [dec] DecProto dec - */ - - /** - * Constructs a new DecProto. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a DecProto. - * @implements IDecProto - * @constructor - * @param {cosmos_sdk.v1.IDecProto=} [p] Properties to set - */ - 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]]; + 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; + } } - - /** - * DecProto dec. - * @member {string} dec - * @memberof cosmos_sdk.v1.DecProto - * @instance - */ - DecProto.prototype.dec = ""; - - /** - * Creates a new DecProto instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {cosmos_sdk.v1.IDecProto=} [properties] Properties to set - * @returns {cosmos_sdk.v1.DecProto} DecProto instance - */ - DecProto.create = function create(properties) { - return new DecProto(properties); - }; - - /** - * Encodes the specified DecProto message. Does not implicitly {@link cosmos_sdk.v1.DecProto.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {cosmos_sdk.v1.IDecProto} m DecProto message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a DecProto message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.DecProto - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.DecProto} DecProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; + return m; + }; + return Input; })(); - - v1.ValAddresses = (function() { - - /** - * Properties of a ValAddresses. - * @memberof cosmos_sdk.v1 - * @interface IValAddresses - * @property {Array.|null} [addresses] ValAddresses addresses - */ - - /** - * Constructs a new ValAddresses. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a ValAddresses. - * @implements IValAddresses - * @constructor - * @param {cosmos_sdk.v1.IValAddresses=} [p] Properties to set - */ - 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]]; + 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(); } - - /** - * ValAddresses addresses. - * @member {Array.} addresses - * @memberof cosmos_sdk.v1.ValAddresses - * @instance - */ - ValAddresses.prototype.addresses = $util.emptyArray; - - /** - * Creates a new ValAddresses instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {cosmos_sdk.v1.IValAddresses=} [properties] Properties to set - * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses instance - */ - ValAddresses.create = function create(properties) { - return new ValAddresses(properties); - }; - - /** - * Encodes the specified ValAddresses message. Does not implicitly {@link cosmos_sdk.v1.ValAddresses.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {cosmos_sdk.v1.IValAddresses} m ValAddresses message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ValAddresses message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.ValAddresses - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.ValAddresses} ValAddresses - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a GasInfo. - * @memberof cosmos_sdk.v1 - * @interface IGasInfo - * @property {number|Long|null} [gasWanted] GasInfo gasWanted - * @property {number|Long|null} [gasUsed] GasInfo gasUsed - */ - - /** - * Constructs a new GasInfo. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a GasInfo. - * @implements IGasInfo - * @constructor - * @param {cosmos_sdk.v1.IGasInfo=} [p] Properties to set - */ - 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]]; + 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; + } } - - /** - * GasInfo gasWanted. - * @member {number|Long} gasWanted - * @memberof cosmos_sdk.v1.GasInfo - * @instance - */ - GasInfo.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * GasInfo gasUsed. - * @member {number|Long} gasUsed - * @memberof cosmos_sdk.v1.GasInfo - * @instance - */ - GasInfo.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new GasInfo instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {cosmos_sdk.v1.IGasInfo=} [properties] Properties to set - * @returns {cosmos_sdk.v1.GasInfo} GasInfo instance - */ - GasInfo.create = function create(properties) { - return new GasInfo(properties); - }; - - /** - * Encodes the specified GasInfo message. Does not implicitly {@link cosmos_sdk.v1.GasInfo.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {cosmos_sdk.v1.IGasInfo} m GasInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a GasInfo message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.GasInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.GasInfo} GasInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GasInfo.decode = function decode(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; + return m; + }; + return Output; })(); - - v1.Result = (function() { - - /** - * Properties of a Result. - * @memberof cosmos_sdk.v1 - * @interface IResult - * @property {Uint8Array|null} [data] Result data - * @property {string|null} [log] Result log - * @property {Array.|null} [events] Result events - */ - - /** - * Constructs a new Result. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a Result. - * @implements IResult - * @constructor - * @param {cosmos_sdk.v1.IResult=} [p] Properties to set - */ - 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]]; + 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(); } - - /** - * Result data. - * @member {Uint8Array} data - * @memberof cosmos_sdk.v1.Result - * @instance - */ - Result.prototype.data = $util.newBuffer([]); - - /** - * Result log. - * @member {string} log - * @memberof cosmos_sdk.v1.Result - * @instance - */ - Result.prototype.log = ""; - - /** - * Result events. - * @member {Array.} events - * @memberof cosmos_sdk.v1.Result - * @instance - */ - Result.prototype.events = $util.emptyArray; - - /** - * Creates a new Result instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.Result - * @static - * @param {cosmos_sdk.v1.IResult=} [properties] Properties to set - * @returns {cosmos_sdk.v1.Result} Result instance - */ - Result.create = function create(properties) { - return new Result(properties); - }; - - /** - * Encodes the specified Result message. Does not implicitly {@link cosmos_sdk.v1.Result.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.Result - * @static - * @param {cosmos_sdk.v1.IResult} m Result message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Result message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.Result - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.Result} Result - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Result.decode = function decode(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() { - - /** - * Properties of a SimulationResponse. - * @memberof cosmos_sdk.v1 - * @interface ISimulationResponse - * @property {cosmos_sdk.v1.IGasInfo|null} [gasInfo] SimulationResponse gasInfo - * @property {cosmos_sdk.v1.IResult|null} [result] SimulationResponse result - */ - - /** - * Constructs a new SimulationResponse. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a SimulationResponse. - * @implements ISimulationResponse - * @constructor - * @param {cosmos_sdk.v1.ISimulationResponse=} [p] Properties to set - */ - 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]]; + 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(); } - - /** - * SimulationResponse gasInfo. - * @member {cosmos_sdk.v1.IGasInfo|null|undefined} gasInfo - * @memberof cosmos_sdk.v1.SimulationResponse - * @instance - */ - SimulationResponse.prototype.gasInfo = null; - - /** - * SimulationResponse result. - * @member {cosmos_sdk.v1.IResult|null|undefined} result - * @memberof cosmos_sdk.v1.SimulationResponse - * @instance - */ - SimulationResponse.prototype.result = null; - - /** - * Creates a new SimulationResponse instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {cosmos_sdk.v1.ISimulationResponse=} [properties] Properties to set - * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse instance - */ - SimulationResponse.create = function create(properties) { - return new SimulationResponse(properties); - }; - - /** - * Encodes the specified SimulationResponse message. Does not implicitly {@link cosmos_sdk.v1.SimulationResponse.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {cosmos_sdk.v1.ISimulationResponse} m SimulationResponse message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a SimulationResponse message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.SimulationResponse - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.SimulationResponse} SimulationResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SimulationResponse.decode = function decode(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() { - - /** - * Properties of a MsgData. - * @memberof cosmos_sdk.v1 - * @interface IMsgData - * @property {string|null} [msgType] MsgData msgType - * @property {Uint8Array|null} [data] MsgData data - */ - - /** - * Constructs a new MsgData. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a MsgData. - * @implements IMsgData - * @constructor - * @param {cosmos_sdk.v1.IMsgData=} [p] Properties to set - */ - 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]]; + 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; + } } - - /** - * MsgData msgType. - * @member {string} msgType - * @memberof cosmos_sdk.v1.MsgData - * @instance - */ - MsgData.prototype.msgType = ""; - - /** - * MsgData data. - * @member {Uint8Array} data - * @memberof cosmos_sdk.v1.MsgData - * @instance - */ - MsgData.prototype.data = $util.newBuffer([]); - - /** - * Creates a new MsgData instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {cosmos_sdk.v1.IMsgData=} [properties] Properties to set - * @returns {cosmos_sdk.v1.MsgData} MsgData instance - */ - MsgData.create = function create(properties) { - return new MsgData(properties); - }; - - /** - * Encodes the specified MsgData message. Does not implicitly {@link cosmos_sdk.v1.MsgData.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {cosmos_sdk.v1.IMsgData} m MsgData message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a MsgData message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.MsgData - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.MsgData} MsgData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MsgData.decode = function decode(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; + return m; + }; + return MsgMultiSend; })(); - - v1.TxData = (function() { - - /** - * Properties of a TxData. - * @memberof cosmos_sdk.v1 - * @interface ITxData - * @property {Array.|null} [data] TxData data - */ - - /** - * Constructs a new TxData. - * @memberof cosmos_sdk.v1 - * @classdesc Represents a TxData. - * @implements ITxData - * @constructor - * @param {cosmos_sdk.v1.ITxData=} [p] Properties to set - */ - 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]]; + 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(); } - - /** - * TxData data. - * @member {Array.} data - * @memberof cosmos_sdk.v1.TxData - * @instance - */ - TxData.prototype.data = $util.emptyArray; - - /** - * Creates a new TxData instance using the specified properties. - * @function create - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {cosmos_sdk.v1.ITxData=} [properties] Properties to set - * @returns {cosmos_sdk.v1.TxData} TxData instance - */ - TxData.create = function create(properties) { - return new TxData(properties); - }; - - /** - * Encodes the specified TxData message. Does not implicitly {@link cosmos_sdk.v1.TxData.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {cosmos_sdk.v1.ITxData} m TxData message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a TxData message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.v1.TxData - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.v1.TxData} TxData - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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 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; })(); - - cosmos_sdk.tx = (function() { - - /** - * Namespace tx. - * @memberof cosmos_sdk - * @namespace - */ - var tx = {}; - - tx.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.tx - * @namespace - */ - var v1 = {}; - - v1.Tx = (function() { - - /** - * Properties of a Tx. - * @memberof cosmos_sdk.tx.v1 - * @interface ITx - * @property {cosmos_sdk.tx.v1.ITxBody|null} [body] Tx body - * @property {cosmos_sdk.tx.v1.IAuthInfo|null} [authInfo] Tx authInfo - * @property {Array.|null} [signatures] Tx signatures - */ - - /** - * Constructs a new Tx. - * @memberof cosmos_sdk.tx.v1 - * @classdesc Represents a Tx. - * @implements ITx - * @constructor - * @param {cosmos_sdk.tx.v1.ITx=} [p] Properties to set - */ - 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 body. - * @member {cosmos_sdk.tx.v1.ITxBody|null|undefined} body - * @memberof cosmos_sdk.tx.v1.Tx - * @instance - */ - Tx.prototype.body = null; - - /** - * Tx authInfo. - * @member {cosmos_sdk.tx.v1.IAuthInfo|null|undefined} authInfo - * @memberof cosmos_sdk.tx.v1.Tx - * @instance - */ - Tx.prototype.authInfo = null; - - /** - * Tx signatures. - * @member {Array.} signatures - * @memberof cosmos_sdk.tx.v1.Tx - * @instance - */ - Tx.prototype.signatures = $util.emptyArray; - - /** - * Creates a new Tx instance using the specified properties. - * @function create - * @memberof cosmos_sdk.tx.v1.Tx - * @static - * @param {cosmos_sdk.tx.v1.ITx=} [properties] Properties to set - * @returns {cosmos_sdk.tx.v1.Tx} Tx instance - */ - Tx.create = function create(properties) { - return new Tx(properties); - }; - - /** - * Encodes the specified Tx message. Does not implicitly {@link cosmos_sdk.tx.v1.Tx.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.tx.v1.Tx - * @static - * @param {cosmos_sdk.tx.v1.ITx} m Tx message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Tx message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.tx.v1.Tx - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.tx.v1.Tx} Tx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a SignDoc. - * @memberof cosmos_sdk.tx.v1 - * @interface ISignDoc - * @property {cosmos_sdk.tx.v1.ITxBody|null} [body] SignDoc body - * @property {cosmos_sdk.tx.v1.IAuthInfo|null} [authInfo] SignDoc authInfo - * @property {string|null} [chainId] SignDoc chainId - * @property {number|Long|null} [accountNumber] SignDoc accountNumber - * @property {number|Long|null} [accountSequence] SignDoc accountSequence - */ - - /** - * Constructs a new SignDoc. - * @memberof cosmos_sdk.tx.v1 - * @classdesc Represents a SignDoc. - * @implements ISignDoc - * @constructor - * @param {cosmos_sdk.tx.v1.ISignDoc=} [p] Properties to set - */ - 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 body. - * @member {cosmos_sdk.tx.v1.ITxBody|null|undefined} body - * @memberof cosmos_sdk.tx.v1.SignDoc - * @instance - */ - SignDoc.prototype.body = null; - - /** - * SignDoc authInfo. - * @member {cosmos_sdk.tx.v1.IAuthInfo|null|undefined} authInfo - * @memberof cosmos_sdk.tx.v1.SignDoc - * @instance - */ - SignDoc.prototype.authInfo = null; - - /** - * SignDoc chainId. - * @member {string} chainId - * @memberof cosmos_sdk.tx.v1.SignDoc - * @instance - */ - SignDoc.prototype.chainId = ""; - - /** - * SignDoc accountNumber. - * @member {number|Long} accountNumber - * @memberof cosmos_sdk.tx.v1.SignDoc - * @instance - */ - SignDoc.prototype.accountNumber = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * SignDoc accountSequence. - * @member {number|Long} accountSequence - * @memberof cosmos_sdk.tx.v1.SignDoc - * @instance - */ - SignDoc.prototype.accountSequence = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new SignDoc instance using the specified properties. - * @function create - * @memberof cosmos_sdk.tx.v1.SignDoc - * @static - * @param {cosmos_sdk.tx.v1.ISignDoc=} [properties] Properties to set - * @returns {cosmos_sdk.tx.v1.SignDoc} SignDoc instance - */ - SignDoc.create = function create(properties) { - return new SignDoc(properties); - }; - - /** - * Encodes the specified SignDoc message. Does not implicitly {@link cosmos_sdk.tx.v1.SignDoc.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.tx.v1.SignDoc - * @static - * @param {cosmos_sdk.tx.v1.ISignDoc} m SignDoc message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a SignDoc message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.tx.v1.SignDoc - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.tx.v1.SignDoc} SignDoc - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a TxBody. - * @memberof cosmos_sdk.tx.v1 - * @interface ITxBody - * @property {Array.|null} [messages] TxBody messages - * @property {string|null} [memo] TxBody memo - * @property {number|Long|null} [timeoutHeight] TxBody timeoutHeight - * @property {Array.|null} [extensionOptions] TxBody extensionOptions - * @property {Array.|null} [nonCriticalExtensionOptions] TxBody nonCriticalExtensionOptions - */ - - /** - * Constructs a new TxBody. - * @memberof cosmos_sdk.tx.v1 - * @classdesc Represents a TxBody. - * @implements ITxBody - * @constructor - * @param {cosmos_sdk.tx.v1.ITxBody=} [p] Properties to set - */ - 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 messages. - * @member {Array.} messages - * @memberof cosmos_sdk.tx.v1.TxBody - * @instance - */ - TxBody.prototype.messages = $util.emptyArray; - - /** - * TxBody memo. - * @member {string} memo - * @memberof cosmos_sdk.tx.v1.TxBody - * @instance - */ - TxBody.prototype.memo = ""; - - /** - * TxBody timeoutHeight. - * @member {number|Long} timeoutHeight - * @memberof cosmos_sdk.tx.v1.TxBody - * @instance - */ - TxBody.prototype.timeoutHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * TxBody extensionOptions. - * @member {Array.} extensionOptions - * @memberof cosmos_sdk.tx.v1.TxBody - * @instance - */ - TxBody.prototype.extensionOptions = $util.emptyArray; - - /** - * TxBody nonCriticalExtensionOptions. - * @member {Array.} nonCriticalExtensionOptions - * @memberof cosmos_sdk.tx.v1.TxBody - * @instance - */ - TxBody.prototype.nonCriticalExtensionOptions = $util.emptyArray; - - /** - * Creates a new TxBody instance using the specified properties. - * @function create - * @memberof cosmos_sdk.tx.v1.TxBody - * @static - * @param {cosmos_sdk.tx.v1.ITxBody=} [properties] Properties to set - * @returns {cosmos_sdk.tx.v1.TxBody} TxBody instance - */ - TxBody.create = function create(properties) { - return new TxBody(properties); - }; - - /** - * Encodes the specified TxBody message. Does not implicitly {@link cosmos_sdk.tx.v1.TxBody.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.tx.v1.TxBody - * @static - * @param {cosmos_sdk.tx.v1.ITxBody} m TxBody message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a TxBody message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.tx.v1.TxBody - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.tx.v1.TxBody} TxBody - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of an AuthInfo. - * @memberof cosmos_sdk.tx.v1 - * @interface IAuthInfo - * @property {Array.|null} [signerInfos] AuthInfo signerInfos - * @property {cosmos_sdk.tx.v1.IFee|null} [fee] AuthInfo fee - */ - - /** - * Constructs a new AuthInfo. - * @memberof cosmos_sdk.tx.v1 - * @classdesc Represents an AuthInfo. - * @implements IAuthInfo - * @constructor - * @param {cosmos_sdk.tx.v1.IAuthInfo=} [p] Properties to set - */ - 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 signerInfos. - * @member {Array.} signerInfos - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @instance - */ - AuthInfo.prototype.signerInfos = $util.emptyArray; - - /** - * AuthInfo fee. - * @member {cosmos_sdk.tx.v1.IFee|null|undefined} fee - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @instance - */ - AuthInfo.prototype.fee = null; - - /** - * Creates a new AuthInfo instance using the specified properties. - * @function create - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @static - * @param {cosmos_sdk.tx.v1.IAuthInfo=} [properties] Properties to set - * @returns {cosmos_sdk.tx.v1.AuthInfo} AuthInfo instance - */ - AuthInfo.create = function create(properties) { - return new AuthInfo(properties); - }; - - /** - * Encodes the specified AuthInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.AuthInfo.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @static - * @param {cosmos_sdk.tx.v1.IAuthInfo} m AuthInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an AuthInfo message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.tx.v1.AuthInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.tx.v1.AuthInfo} AuthInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a SignerInfo. - * @memberof cosmos_sdk.tx.v1 - * @interface ISignerInfo - * @property {google.protobuf.IAny|null} [publicKey] SignerInfo publicKey - * @property {cosmos_sdk.tx.v1.IModeInfo|null} [modeInfo] SignerInfo modeInfo - */ - - /** - * Constructs a new SignerInfo. - * @memberof cosmos_sdk.tx.v1 - * @classdesc Represents a SignerInfo. - * @implements ISignerInfo - * @constructor - * @param {cosmos_sdk.tx.v1.ISignerInfo=} [p] Properties to set - */ - 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 publicKey. - * @member {google.protobuf.IAny|null|undefined} publicKey - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @instance - */ - SignerInfo.prototype.publicKey = null; - - /** - * SignerInfo modeInfo. - * @member {cosmos_sdk.tx.v1.IModeInfo|null|undefined} modeInfo - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @instance - */ - SignerInfo.prototype.modeInfo = null; - - /** - * Creates a new SignerInfo instance using the specified properties. - * @function create - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @static - * @param {cosmos_sdk.tx.v1.ISignerInfo=} [properties] Properties to set - * @returns {cosmos_sdk.tx.v1.SignerInfo} SignerInfo instance - */ - SignerInfo.create = function create(properties) { - return new SignerInfo(properties); - }; - - /** - * Encodes the specified SignerInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.SignerInfo.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @static - * @param {cosmos_sdk.tx.v1.ISignerInfo} m SignerInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a SignerInfo message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.tx.v1.SignerInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.tx.v1.SignerInfo} SignerInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ModeInfo. - * @memberof cosmos_sdk.tx.v1 - * @interface IModeInfo - * @property {cosmos_sdk.tx.v1.ModeInfo.ISingle|null} [single] ModeInfo single - * @property {cosmos_sdk.tx.v1.ModeInfo.IMulti|null} [multi] ModeInfo multi - */ - - /** - * Constructs a new ModeInfo. - * @memberof cosmos_sdk.tx.v1 - * @classdesc Represents a ModeInfo. - * @implements IModeInfo - * @constructor - * @param {cosmos_sdk.tx.v1.IModeInfo=} [p] Properties to set - */ - 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 single. - * @member {cosmos_sdk.tx.v1.ModeInfo.ISingle|null|undefined} single - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @instance - */ - ModeInfo.prototype.single = null; - - /** - * ModeInfo multi. - * @member {cosmos_sdk.tx.v1.ModeInfo.IMulti|null|undefined} multi - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @instance - */ - ModeInfo.prototype.multi = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ModeInfo sum. - * @member {"single"|"multi"|undefined} sum - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @instance - */ - Object.defineProperty(ModeInfo.prototype, "sum", { - get: $util.oneOfGetter($oneOfFields = ["single", "multi"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ModeInfo instance using the specified properties. - * @function create - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @static - * @param {cosmos_sdk.tx.v1.IModeInfo=} [properties] Properties to set - * @returns {cosmos_sdk.tx.v1.ModeInfo} ModeInfo instance - */ - ModeInfo.create = function create(properties) { - return new ModeInfo(properties); - }; - - /** - * Encodes the specified ModeInfo message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @static - * @param {cosmos_sdk.tx.v1.IModeInfo} m ModeInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ModeInfo message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.tx.v1.ModeInfo} ModeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Single. - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @interface ISingle - * @property {cosmos_sdk.tx.signing.v1.SignMode|null} [mode] Single mode - */ - - /** - * Constructs a new Single. - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @classdesc Represents a Single. - * @implements ISingle - * @constructor - * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle=} [p] Properties to set - */ - 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 mode. - * @member {cosmos_sdk.tx.signing.v1.SignMode} mode - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @instance - */ - Single.prototype.mode = 0; - - /** - * Creates a new Single instance using the specified properties. - * @function create - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle=} [properties] Properties to set - * @returns {cosmos_sdk.tx.v1.ModeInfo.Single} Single instance - */ - Single.create = function create(properties) { - return new Single(properties); - }; - - /** - * Encodes the specified Single message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Single.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.ISingle} m Single message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Single message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.tx.v1.ModeInfo.Single - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.tx.v1.ModeInfo.Single} Single - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Multi. - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @interface IMulti - * @property {cosmos_sdk.crypto.v1.ICompactBitArray|null} [bitarray] Multi bitarray - * @property {Array.|null} [modeInfos] Multi modeInfos - */ - - /** - * Constructs a new Multi. - * @memberof cosmos_sdk.tx.v1.ModeInfo - * @classdesc Represents a Multi. - * @implements IMulti - * @constructor - * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti=} [p] Properties to set - */ - 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 bitarray. - * @member {cosmos_sdk.crypto.v1.ICompactBitArray|null|undefined} bitarray - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @instance - */ - Multi.prototype.bitarray = null; - - /** - * Multi modeInfos. - * @member {Array.} modeInfos - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @instance - */ - Multi.prototype.modeInfos = $util.emptyArray; - - /** - * Creates a new Multi instance using the specified properties. - * @function create - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti=} [properties] Properties to set - * @returns {cosmos_sdk.tx.v1.ModeInfo.Multi} Multi instance - */ - Multi.create = function create(properties) { - return new Multi(properties); - }; - - /** - * Encodes the specified Multi message. Does not implicitly {@link cosmos_sdk.tx.v1.ModeInfo.Multi.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @static - * @param {cosmos_sdk.tx.v1.ModeInfo.IMulti} m Multi message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Multi message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.tx.v1.ModeInfo.Multi - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.tx.v1.ModeInfo.Multi} Multi - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Fee. - * @memberof cosmos_sdk.tx.v1 - * @interface IFee - * @property {Array.|null} [amount] Fee amount - * @property {number|Long|null} [gasLimit] Fee gasLimit - */ - - /** - * Constructs a new Fee. - * @memberof cosmos_sdk.tx.v1 - * @classdesc Represents a Fee. - * @implements IFee - * @constructor - * @param {cosmos_sdk.tx.v1.IFee=} [p] Properties to set - */ - 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 amount. - * @member {Array.} amount - * @memberof cosmos_sdk.tx.v1.Fee - * @instance - */ - Fee.prototype.amount = $util.emptyArray; - - /** - * Fee gasLimit. - * @member {number|Long} gasLimit - * @memberof cosmos_sdk.tx.v1.Fee - * @instance - */ - Fee.prototype.gasLimit = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new Fee instance using the specified properties. - * @function create - * @memberof cosmos_sdk.tx.v1.Fee - * @static - * @param {cosmos_sdk.tx.v1.IFee=} [properties] Properties to set - * @returns {cosmos_sdk.tx.v1.Fee} Fee instance - */ - Fee.create = function create(properties) { - return new Fee(properties); - }; - - /** - * Encodes the specified Fee message. Does not implicitly {@link cosmos_sdk.tx.v1.Fee.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.tx.v1.Fee - * @static - * @param {cosmos_sdk.tx.v1.IFee} m Fee message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Fee message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.tx.v1.Fee - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.tx.v1.Fee} Fee - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Namespace signing. - * @memberof cosmos_sdk.tx - * @namespace - */ - var signing = {}; - - signing.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.tx.signing - * @namespace - */ - var v1 = {}; - - /** - * SignMode enum. - * @name cosmos_sdk.tx.signing.v1.SignMode - * @enum {number} - * @property {number} SIGN_MODE_UNSPECIFIED=0 SIGN_MODE_UNSPECIFIED value - * @property {number} SIGN_MODE_DIRECT=1 SIGN_MODE_DIRECT value - * @property {number} SIGN_MODE_TEXTUAL=2 SIGN_MODE_TEXTUAL value - * @property {number} SIGN_MODE_LEGACY_AMINO_JSON=127 SIGN_MODE_LEGACY_AMINO_JSON value - */ - 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; + 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; })(); - - cosmos_sdk.crypto = (function() { - - /** - * Namespace crypto. - * @memberof cosmos_sdk - * @namespace - */ - var crypto = {}; - - crypto.v1 = (function() { - - /** - * Namespace v1. - * @memberof cosmos_sdk.crypto - * @namespace - */ - var v1 = {}; - - v1.PublicKey = (function() { - - /** - * Properties of a PublicKey. - * @memberof cosmos_sdk.crypto.v1 - * @interface IPublicKey - * @property {Uint8Array|null} [secp256k1] PublicKey secp256k1 - * @property {Uint8Array|null} [ed25519] PublicKey ed25519 - * @property {Uint8Array|null} [sr25519] PublicKey sr25519 - * @property {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null} [multisig] PublicKey multisig - * @property {Uint8Array|null} [secp256r1] PublicKey secp256r1 - * @property {google.protobuf.IAny|null} [anyPubkey] PublicKey anyPubkey - */ - - /** - * Constructs a new PublicKey. - * @memberof cosmos_sdk.crypto.v1 - * @classdesc Represents a PublicKey. - * @implements IPublicKey - * @constructor - * @param {cosmos_sdk.crypto.v1.IPublicKey=} [p] Properties to set - */ - 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 secp256k1. - * @member {Uint8Array} secp256k1 - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.secp256k1 = $util.newBuffer([]); - - /** - * PublicKey ed25519. - * @member {Uint8Array} ed25519 - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.ed25519 = $util.newBuffer([]); - - /** - * PublicKey sr25519. - * @member {Uint8Array} sr25519 - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.sr25519 = $util.newBuffer([]); - - /** - * PublicKey multisig. - * @member {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold|null|undefined} multisig - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.multisig = null; - - /** - * PublicKey secp256r1. - * @member {Uint8Array} secp256r1 - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.secp256r1 = $util.newBuffer([]); - - /** - * PublicKey anyPubkey. - * @member {google.protobuf.IAny|null|undefined} anyPubkey - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - PublicKey.prototype.anyPubkey = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PublicKey sum. - * @member {"secp256k1"|"ed25519"|"sr25519"|"multisig"|"secp256r1"|"anyPubkey"|undefined} sum - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @instance - */ - Object.defineProperty(PublicKey.prototype, "sum", { - get: $util.oneOfGetter($oneOfFields = ["secp256k1", "ed25519", "sr25519", "multisig", "secp256r1", "anyPubkey"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PublicKey instance using the specified properties. - * @function create - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {cosmos_sdk.crypto.v1.IPublicKey=} [properties] Properties to set - * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey instance - */ - PublicKey.create = function create(properties) { - return new PublicKey(properties); - }; - - /** - * Encodes the specified PublicKey message. Does not implicitly {@link cosmos_sdk.crypto.v1.PublicKey.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {cosmos_sdk.crypto.v1.IPublicKey} m PublicKey message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a PublicKey message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.crypto.v1.PublicKey - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.crypto.v1.PublicKey} PublicKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a PubKeyMultisigThreshold. - * @memberof cosmos_sdk.crypto.v1 - * @interface IPubKeyMultisigThreshold - * @property {number|null} [threshold] PubKeyMultisigThreshold threshold - * @property {Array.|null} [publicKeys] PubKeyMultisigThreshold publicKeys - */ - - /** - * Constructs a new PubKeyMultisigThreshold. - * @memberof cosmos_sdk.crypto.v1 - * @classdesc Represents a PubKeyMultisigThreshold. - * @implements IPubKeyMultisigThreshold - * @constructor - * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [p] Properties to set - */ - 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 threshold. - * @member {number} threshold - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @instance - */ - PubKeyMultisigThreshold.prototype.threshold = 0; - - /** - * PubKeyMultisigThreshold publicKeys. - * @member {Array.} publicKeys - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @instance - */ - PubKeyMultisigThreshold.prototype.publicKeys = $util.emptyArray; - - /** - * Creates a new PubKeyMultisigThreshold instance using the specified properties. - * @function create - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold=} [properties] Properties to set - * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold instance - */ - PubKeyMultisigThreshold.create = function create(properties) { - return new PubKeyMultisigThreshold(properties); - }; - - /** - * Encodes the specified PubKeyMultisigThreshold message. Does not implicitly {@link cosmos_sdk.crypto.v1.PubKeyMultisigThreshold.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {cosmos_sdk.crypto.v1.IPubKeyMultisigThreshold} m PubKeyMultisigThreshold message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a PubKeyMultisigThreshold message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.crypto.v1.PubKeyMultisigThreshold - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.crypto.v1.PubKeyMultisigThreshold} PubKeyMultisigThreshold - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a MultiSignature. - * @memberof cosmos_sdk.crypto.v1 - * @interface IMultiSignature - * @property {Array.|null} [signatures] MultiSignature signatures - */ - - /** - * Constructs a new MultiSignature. - * @memberof cosmos_sdk.crypto.v1 - * @classdesc Represents a MultiSignature. - * @implements IMultiSignature - * @constructor - * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [p] Properties to set - */ - 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 signatures. - * @member {Array.} signatures - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @instance - */ - MultiSignature.prototype.signatures = $util.emptyArray; - - /** - * Creates a new MultiSignature instance using the specified properties. - * @function create - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {cosmos_sdk.crypto.v1.IMultiSignature=} [properties] Properties to set - * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature instance - */ - MultiSignature.create = function create(properties) { - return new MultiSignature(properties); - }; - - /** - * Encodes the specified MultiSignature message. Does not implicitly {@link cosmos_sdk.crypto.v1.MultiSignature.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {cosmos_sdk.crypto.v1.IMultiSignature} m MultiSignature message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a MultiSignature message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.crypto.v1.MultiSignature - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.crypto.v1.MultiSignature} MultiSignature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a CompactBitArray. - * @memberof cosmos_sdk.crypto.v1 - * @interface ICompactBitArray - * @property {number|null} [extraBitsStored] CompactBitArray extraBitsStored - * @property {Uint8Array|null} [elems] CompactBitArray elems - */ - - /** - * Constructs a new CompactBitArray. - * @memberof cosmos_sdk.crypto.v1 - * @classdesc Represents a CompactBitArray. - * @implements ICompactBitArray - * @constructor - * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [p] Properties to set - */ - 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 extraBitsStored. - * @member {number} extraBitsStored - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @instance - */ - CompactBitArray.prototype.extraBitsStored = 0; - - /** - * CompactBitArray elems. - * @member {Uint8Array} elems - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @instance - */ - CompactBitArray.prototype.elems = $util.newBuffer([]); - - /** - * Creates a new CompactBitArray instance using the specified properties. - * @function create - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {cosmos_sdk.crypto.v1.ICompactBitArray=} [properties] Properties to set - * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray instance - */ - CompactBitArray.create = function create(properties) { - return new CompactBitArray(properties); - }; - - /** - * Encodes the specified CompactBitArray message. Does not implicitly {@link cosmos_sdk.crypto.v1.CompactBitArray.verify|verify} messages. - * @function encode - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {cosmos_sdk.crypto.v1.ICompactBitArray} m CompactBitArray message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a CompactBitArray message from the specified reader or buffer. - * @function decode - * @memberof cosmos_sdk.crypto.v1.CompactBitArray - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {cosmos_sdk.crypto.v1.CompactBitArray} CompactBitArray - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; + 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; })(); - - return cosmos_sdk; -})(); - -$root.tendermint = (function() { - - /** - * Namespace tendermint. - * @exports tendermint - * @namespace - */ - var tendermint = {}; - - tendermint.abci = (function() { - - /** - * Namespace abci. - * @memberof tendermint - * @namespace - */ - var abci = {}; - - abci.types = (function() { - - /** - * Namespace types. - * @memberof tendermint.abci - * @namespace - */ - var types = {}; - - types.Request = (function() { - - /** - * Properties of a Request. - * @memberof tendermint.abci.types - * @interface IRequest - * @property {tendermint.abci.types.IRequestEcho|null} [echo] Request echo - * @property {tendermint.abci.types.IRequestFlush|null} [flush] Request flush - * @property {tendermint.abci.types.IRequestInfo|null} [info] Request info - * @property {tendermint.abci.types.IRequestSetOption|null} [setOption] Request setOption - * @property {tendermint.abci.types.IRequestInitChain|null} [initChain] Request initChain - * @property {tendermint.abci.types.IRequestQuery|null} [query] Request query - * @property {tendermint.abci.types.IRequestBeginBlock|null} [beginBlock] Request beginBlock - * @property {tendermint.abci.types.IRequestCheckTx|null} [checkTx] Request checkTx - * @property {tendermint.abci.types.IRequestDeliverTx|null} [deliverTx] Request deliverTx - * @property {tendermint.abci.types.IRequestEndBlock|null} [endBlock] Request endBlock - * @property {tendermint.abci.types.IRequestCommit|null} [commit] Request commit - */ - - /** - * Constructs a new Request. - * @memberof tendermint.abci.types - * @classdesc Represents a Request. - * @implements IRequest - * @constructor - * @param {tendermint.abci.types.IRequest=} [p] Properties to set - */ - 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 echo. - * @member {tendermint.abci.types.IRequestEcho|null|undefined} echo - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.echo = null; - - /** - * Request flush. - * @member {tendermint.abci.types.IRequestFlush|null|undefined} flush - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.flush = null; - - /** - * Request info. - * @member {tendermint.abci.types.IRequestInfo|null|undefined} info - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.info = null; - - /** - * Request setOption. - * @member {tendermint.abci.types.IRequestSetOption|null|undefined} setOption - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.setOption = null; - - /** - * Request initChain. - * @member {tendermint.abci.types.IRequestInitChain|null|undefined} initChain - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.initChain = null; - - /** - * Request query. - * @member {tendermint.abci.types.IRequestQuery|null|undefined} query - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.query = null; - - /** - * Request beginBlock. - * @member {tendermint.abci.types.IRequestBeginBlock|null|undefined} beginBlock - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.beginBlock = null; - - /** - * Request checkTx. - * @member {tendermint.abci.types.IRequestCheckTx|null|undefined} checkTx - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.checkTx = null; - - /** - * Request deliverTx. - * @member {tendermint.abci.types.IRequestDeliverTx|null|undefined} deliverTx - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.deliverTx = null; - - /** - * Request endBlock. - * @member {tendermint.abci.types.IRequestEndBlock|null|undefined} endBlock - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.endBlock = null; - - /** - * Request commit. - * @member {tendermint.abci.types.IRequestCommit|null|undefined} commit - * @memberof tendermint.abci.types.Request - * @instance - */ - Request.prototype.commit = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Request value. - * @member {"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|undefined} value - * @memberof tendermint.abci.types.Request - * @instance - */ - Object.defineProperty(Request.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["echo", "flush", "info", "setOption", "initChain", "query", "beginBlock", "checkTx", "deliverTx", "endBlock", "commit"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Request instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.Request - * @static - * @param {tendermint.abci.types.IRequest=} [properties] Properties to set - * @returns {tendermint.abci.types.Request} Request instance - */ - Request.create = function create(properties) { - return new Request(properties); - }; - - /** - * Encodes the specified Request message. Does not implicitly {@link tendermint.abci.types.Request.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.Request - * @static - * @param {tendermint.abci.types.IRequest} m Request message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Request message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.Request - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.Request} Request - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestEcho. - * @memberof tendermint.abci.types - * @interface IRequestEcho - * @property {string|null} [message] RequestEcho message - */ - - /** - * Constructs a new RequestEcho. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestEcho. - * @implements IRequestEcho - * @constructor - * @param {tendermint.abci.types.IRequestEcho=} [p] Properties to set - */ - 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 message. - * @member {string} message - * @memberof tendermint.abci.types.RequestEcho - * @instance - */ - RequestEcho.prototype.message = ""; - - /** - * Creates a new RequestEcho instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestEcho - * @static - * @param {tendermint.abci.types.IRequestEcho=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestEcho} RequestEcho instance - */ - RequestEcho.create = function create(properties) { - return new RequestEcho(properties); - }; - - /** - * Encodes the specified RequestEcho message. Does not implicitly {@link tendermint.abci.types.RequestEcho.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestEcho - * @static - * @param {tendermint.abci.types.IRequestEcho} m RequestEcho message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a RequestEcho message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestEcho - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestEcho} RequestEcho - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestFlush. - * @memberof tendermint.abci.types - * @interface IRequestFlush - */ - - /** - * Constructs a new RequestFlush. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestFlush. - * @implements IRequestFlush - * @constructor - * @param {tendermint.abci.types.IRequestFlush=} [p] Properties to set - */ - 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]]; - } - - /** - * Creates a new RequestFlush instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestFlush - * @static - * @param {tendermint.abci.types.IRequestFlush=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestFlush} RequestFlush instance - */ - RequestFlush.create = function create(properties) { - return new RequestFlush(properties); - }; - - /** - * Encodes the specified RequestFlush message. Does not implicitly {@link tendermint.abci.types.RequestFlush.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestFlush - * @static - * @param {tendermint.abci.types.IRequestFlush} m RequestFlush message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestFlush.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Decodes a RequestFlush message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestFlush - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestFlush} RequestFlush - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestInfo. - * @memberof tendermint.abci.types - * @interface IRequestInfo - * @property {string|null} [version] RequestInfo version - * @property {number|Long|null} [blockVersion] RequestInfo blockVersion - * @property {number|Long|null} [p2pVersion] RequestInfo p2pVersion - */ - - /** - * Constructs a new RequestInfo. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestInfo. - * @implements IRequestInfo - * @constructor - * @param {tendermint.abci.types.IRequestInfo=} [p] Properties to set - */ - 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 version. - * @member {string} version - * @memberof tendermint.abci.types.RequestInfo - * @instance - */ - RequestInfo.prototype.version = ""; - - /** - * RequestInfo blockVersion. - * @member {number|Long} blockVersion - * @memberof tendermint.abci.types.RequestInfo - * @instance - */ - RequestInfo.prototype.blockVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * RequestInfo p2pVersion. - * @member {number|Long} p2pVersion - * @memberof tendermint.abci.types.RequestInfo - * @instance - */ - RequestInfo.prototype.p2pVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new RequestInfo instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestInfo - * @static - * @param {tendermint.abci.types.IRequestInfo=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestInfo} RequestInfo instance - */ - RequestInfo.create = function create(properties) { - return new RequestInfo(properties); - }; - - /** - * Encodes the specified RequestInfo message. Does not implicitly {@link tendermint.abci.types.RequestInfo.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestInfo - * @static - * @param {tendermint.abci.types.IRequestInfo} m RequestInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a RequestInfo message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestInfo} RequestInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestSetOption. - * @memberof tendermint.abci.types - * @interface IRequestSetOption - * @property {string|null} [key] RequestSetOption key - * @property {string|null} [value] RequestSetOption value - */ - - /** - * Constructs a new RequestSetOption. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestSetOption. - * @implements IRequestSetOption - * @constructor - * @param {tendermint.abci.types.IRequestSetOption=} [p] Properties to set - */ - 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 key. - * @member {string} key - * @memberof tendermint.abci.types.RequestSetOption - * @instance - */ - RequestSetOption.prototype.key = ""; - - /** - * RequestSetOption value. - * @member {string} value - * @memberof tendermint.abci.types.RequestSetOption - * @instance - */ - RequestSetOption.prototype.value = ""; - - /** - * Creates a new RequestSetOption instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestSetOption - * @static - * @param {tendermint.abci.types.IRequestSetOption=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestSetOption} RequestSetOption instance - */ - RequestSetOption.create = function create(properties) { - return new RequestSetOption(properties); - }; - - /** - * Encodes the specified RequestSetOption message. Does not implicitly {@link tendermint.abci.types.RequestSetOption.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestSetOption - * @static - * @param {tendermint.abci.types.IRequestSetOption} m RequestSetOption message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a RequestSetOption message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestSetOption - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestSetOption} RequestSetOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestInitChain. - * @memberof tendermint.abci.types - * @interface IRequestInitChain - * @property {google.protobuf.ITimestamp|null} [time] RequestInitChain time - * @property {string|null} [chainId] RequestInitChain chainId - * @property {tendermint.abci.types.IConsensusParams|null} [consensusParams] RequestInitChain consensusParams - * @property {Array.|null} [validators] RequestInitChain validators - * @property {Uint8Array|null} [appStateBytes] RequestInitChain appStateBytes - */ - - /** - * Constructs a new RequestInitChain. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestInitChain. - * @implements IRequestInitChain - * @constructor - * @param {tendermint.abci.types.IRequestInitChain=} [p] Properties to set - */ - 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 time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof tendermint.abci.types.RequestInitChain - * @instance - */ - RequestInitChain.prototype.time = null; - - /** - * RequestInitChain chainId. - * @member {string} chainId - * @memberof tendermint.abci.types.RequestInitChain - * @instance - */ - RequestInitChain.prototype.chainId = ""; - - /** - * RequestInitChain consensusParams. - * @member {tendermint.abci.types.IConsensusParams|null|undefined} consensusParams - * @memberof tendermint.abci.types.RequestInitChain - * @instance - */ - RequestInitChain.prototype.consensusParams = null; - - /** - * RequestInitChain validators. - * @member {Array.} validators - * @memberof tendermint.abci.types.RequestInitChain - * @instance - */ - RequestInitChain.prototype.validators = $util.emptyArray; - - /** - * RequestInitChain appStateBytes. - * @member {Uint8Array} appStateBytes - * @memberof tendermint.abci.types.RequestInitChain - * @instance - */ - RequestInitChain.prototype.appStateBytes = $util.newBuffer([]); - - /** - * Creates a new RequestInitChain instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestInitChain - * @static - * @param {tendermint.abci.types.IRequestInitChain=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestInitChain} RequestInitChain instance - */ - RequestInitChain.create = function create(properties) { - return new RequestInitChain(properties); - }; - - /** - * Encodes the specified RequestInitChain message. Does not implicitly {@link tendermint.abci.types.RequestInitChain.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestInitChain - * @static - * @param {tendermint.abci.types.IRequestInitChain} m RequestInitChain message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a RequestInitChain message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestInitChain - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestInitChain} RequestInitChain - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestQuery. - * @memberof tendermint.abci.types - * @interface IRequestQuery - * @property {Uint8Array|null} [data] RequestQuery data - * @property {string|null} [path] RequestQuery path - * @property {number|Long|null} [height] RequestQuery height - * @property {boolean|null} [prove] RequestQuery prove - */ - - /** - * Constructs a new RequestQuery. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestQuery. - * @implements IRequestQuery - * @constructor - * @param {tendermint.abci.types.IRequestQuery=} [p] Properties to set - */ - 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 data. - * @member {Uint8Array} data - * @memberof tendermint.abci.types.RequestQuery - * @instance - */ - RequestQuery.prototype.data = $util.newBuffer([]); - - /** - * RequestQuery path. - * @member {string} path - * @memberof tendermint.abci.types.RequestQuery - * @instance - */ - RequestQuery.prototype.path = ""; - - /** - * RequestQuery height. - * @member {number|Long} height - * @memberof tendermint.abci.types.RequestQuery - * @instance - */ - RequestQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * RequestQuery prove. - * @member {boolean} prove - * @memberof tendermint.abci.types.RequestQuery - * @instance - */ - RequestQuery.prototype.prove = false; - - /** - * Creates a new RequestQuery instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestQuery - * @static - * @param {tendermint.abci.types.IRequestQuery=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestQuery} RequestQuery instance - */ - RequestQuery.create = function create(properties) { - return new RequestQuery(properties); - }; - - /** - * Encodes the specified RequestQuery message. Does not implicitly {@link tendermint.abci.types.RequestQuery.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestQuery - * @static - * @param {tendermint.abci.types.IRequestQuery} m RequestQuery message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a RequestQuery message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestQuery - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestQuery} RequestQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestBeginBlock. - * @memberof tendermint.abci.types - * @interface IRequestBeginBlock - * @property {Uint8Array|null} [hash] RequestBeginBlock hash - * @property {tendermint.abci.types.IHeader|null} [header] RequestBeginBlock header - * @property {tendermint.abci.types.ILastCommitInfo|null} [lastCommitInfo] RequestBeginBlock lastCommitInfo - * @property {Array.|null} [byzantineValidators] RequestBeginBlock byzantineValidators - */ - - /** - * Constructs a new RequestBeginBlock. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestBeginBlock. - * @implements IRequestBeginBlock - * @constructor - * @param {tendermint.abci.types.IRequestBeginBlock=} [p] Properties to set - */ - 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 hash. - * @member {Uint8Array} hash - * @memberof tendermint.abci.types.RequestBeginBlock - * @instance - */ - RequestBeginBlock.prototype.hash = $util.newBuffer([]); - - /** - * RequestBeginBlock header. - * @member {tendermint.abci.types.IHeader|null|undefined} header - * @memberof tendermint.abci.types.RequestBeginBlock - * @instance - */ - RequestBeginBlock.prototype.header = null; - - /** - * RequestBeginBlock lastCommitInfo. - * @member {tendermint.abci.types.ILastCommitInfo|null|undefined} lastCommitInfo - * @memberof tendermint.abci.types.RequestBeginBlock - * @instance - */ - RequestBeginBlock.prototype.lastCommitInfo = null; - - /** - * RequestBeginBlock byzantineValidators. - * @member {Array.} byzantineValidators - * @memberof tendermint.abci.types.RequestBeginBlock - * @instance - */ - RequestBeginBlock.prototype.byzantineValidators = $util.emptyArray; - - /** - * Creates a new RequestBeginBlock instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestBeginBlock - * @static - * @param {tendermint.abci.types.IRequestBeginBlock=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestBeginBlock} RequestBeginBlock instance - */ - RequestBeginBlock.create = function create(properties) { - return new RequestBeginBlock(properties); - }; - - /** - * Encodes the specified RequestBeginBlock message. Does not implicitly {@link tendermint.abci.types.RequestBeginBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestBeginBlock - * @static - * @param {tendermint.abci.types.IRequestBeginBlock} m RequestBeginBlock message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a RequestBeginBlock message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestBeginBlock - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestBeginBlock} RequestBeginBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; - })(); - - /** - * CheckTxType enum. - * @name tendermint.abci.types.CheckTxType - * @enum {number} - * @property {number} New=0 New value - * @property {number} Recheck=1 Recheck value - */ - types.CheckTxType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "New"] = 0; - values[valuesById[1] = "Recheck"] = 1; - return values; - })(); - - types.RequestCheckTx = (function() { - - /** - * Properties of a RequestCheckTx. - * @memberof tendermint.abci.types - * @interface IRequestCheckTx - * @property {Uint8Array|null} [tx] RequestCheckTx tx - * @property {tendermint.abci.types.CheckTxType|null} [type] RequestCheckTx type - */ - - /** - * Constructs a new RequestCheckTx. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestCheckTx. - * @implements IRequestCheckTx - * @constructor - * @param {tendermint.abci.types.IRequestCheckTx=} [p] Properties to set - */ - 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 tx. - * @member {Uint8Array} tx - * @memberof tendermint.abci.types.RequestCheckTx - * @instance - */ - RequestCheckTx.prototype.tx = $util.newBuffer([]); - - /** - * RequestCheckTx type. - * @member {tendermint.abci.types.CheckTxType} type - * @memberof tendermint.abci.types.RequestCheckTx - * @instance - */ - RequestCheckTx.prototype.type = 0; - - /** - * Creates a new RequestCheckTx instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestCheckTx - * @static - * @param {tendermint.abci.types.IRequestCheckTx=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestCheckTx} RequestCheckTx instance - */ - RequestCheckTx.create = function create(properties) { - return new RequestCheckTx(properties); - }; - - /** - * Encodes the specified RequestCheckTx message. Does not implicitly {@link tendermint.abci.types.RequestCheckTx.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestCheckTx - * @static - * @param {tendermint.abci.types.IRequestCheckTx} m RequestCheckTx message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a RequestCheckTx message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestCheckTx - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestCheckTx} RequestCheckTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestDeliverTx. - * @memberof tendermint.abci.types - * @interface IRequestDeliverTx - * @property {Uint8Array|null} [tx] RequestDeliverTx tx - */ - - /** - * Constructs a new RequestDeliverTx. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestDeliverTx. - * @implements IRequestDeliverTx - * @constructor - * @param {tendermint.abci.types.IRequestDeliverTx=} [p] Properties to set - */ - 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 tx. - * @member {Uint8Array} tx - * @memberof tendermint.abci.types.RequestDeliverTx - * @instance - */ - RequestDeliverTx.prototype.tx = $util.newBuffer([]); - - /** - * Creates a new RequestDeliverTx instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestDeliverTx - * @static - * @param {tendermint.abci.types.IRequestDeliverTx=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestDeliverTx} RequestDeliverTx instance - */ - RequestDeliverTx.create = function create(properties) { - return new RequestDeliverTx(properties); - }; - - /** - * Encodes the specified RequestDeliverTx message. Does not implicitly {@link tendermint.abci.types.RequestDeliverTx.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestDeliverTx - * @static - * @param {tendermint.abci.types.IRequestDeliverTx} m RequestDeliverTx message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a RequestDeliverTx message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestDeliverTx - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestDeliverTx} RequestDeliverTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestEndBlock. - * @memberof tendermint.abci.types - * @interface IRequestEndBlock - * @property {number|Long|null} [height] RequestEndBlock height - */ - - /** - * Constructs a new RequestEndBlock. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestEndBlock. - * @implements IRequestEndBlock - * @constructor - * @param {tendermint.abci.types.IRequestEndBlock=} [p] Properties to set - */ - 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 height. - * @member {number|Long} height - * @memberof tendermint.abci.types.RequestEndBlock - * @instance - */ - RequestEndBlock.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new RequestEndBlock instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestEndBlock - * @static - * @param {tendermint.abci.types.IRequestEndBlock=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestEndBlock} RequestEndBlock instance - */ - RequestEndBlock.create = function create(properties) { - return new RequestEndBlock(properties); - }; - - /** - * Encodes the specified RequestEndBlock message. Does not implicitly {@link tendermint.abci.types.RequestEndBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestEndBlock - * @static - * @param {tendermint.abci.types.IRequestEndBlock} m RequestEndBlock message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a RequestEndBlock message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestEndBlock - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestEndBlock} RequestEndBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a RequestCommit. - * @memberof tendermint.abci.types - * @interface IRequestCommit - */ - - /** - * Constructs a new RequestCommit. - * @memberof tendermint.abci.types - * @classdesc Represents a RequestCommit. - * @implements IRequestCommit - * @constructor - * @param {tendermint.abci.types.IRequestCommit=} [p] Properties to set - */ - 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]]; - } - - /** - * Creates a new RequestCommit instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.RequestCommit - * @static - * @param {tendermint.abci.types.IRequestCommit=} [properties] Properties to set - * @returns {tendermint.abci.types.RequestCommit} RequestCommit instance - */ - RequestCommit.create = function create(properties) { - return new RequestCommit(properties); - }; - - /** - * Encodes the specified RequestCommit message. Does not implicitly {@link tendermint.abci.types.RequestCommit.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.RequestCommit - * @static - * @param {tendermint.abci.types.IRequestCommit} m RequestCommit message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestCommit.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Decodes a RequestCommit message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.RequestCommit - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.RequestCommit} RequestCommit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Response. - * @memberof tendermint.abci.types - * @interface IResponse - * @property {tendermint.abci.types.IResponseException|null} [exception] Response exception - * @property {tendermint.abci.types.IResponseEcho|null} [echo] Response echo - * @property {tendermint.abci.types.IResponseFlush|null} [flush] Response flush - * @property {tendermint.abci.types.IResponseInfo|null} [info] Response info - * @property {tendermint.abci.types.IResponseSetOption|null} [setOption] Response setOption - * @property {tendermint.abci.types.IResponseInitChain|null} [initChain] Response initChain - * @property {tendermint.abci.types.IResponseQuery|null} [query] Response query - * @property {tendermint.abci.types.IResponseBeginBlock|null} [beginBlock] Response beginBlock - * @property {tendermint.abci.types.IResponseCheckTx|null} [checkTx] Response checkTx - * @property {tendermint.abci.types.IResponseDeliverTx|null} [deliverTx] Response deliverTx - * @property {tendermint.abci.types.IResponseEndBlock|null} [endBlock] Response endBlock - * @property {tendermint.abci.types.IResponseCommit|null} [commit] Response commit - */ - - /** - * Constructs a new Response. - * @memberof tendermint.abci.types - * @classdesc Represents a Response. - * @implements IResponse - * @constructor - * @param {tendermint.abci.types.IResponse=} [p] Properties to set - */ - 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 exception. - * @member {tendermint.abci.types.IResponseException|null|undefined} exception - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.exception = null; - - /** - * Response echo. - * @member {tendermint.abci.types.IResponseEcho|null|undefined} echo - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.echo = null; - - /** - * Response flush. - * @member {tendermint.abci.types.IResponseFlush|null|undefined} flush - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.flush = null; - - /** - * Response info. - * @member {tendermint.abci.types.IResponseInfo|null|undefined} info - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.info = null; - - /** - * Response setOption. - * @member {tendermint.abci.types.IResponseSetOption|null|undefined} setOption - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.setOption = null; - - /** - * Response initChain. - * @member {tendermint.abci.types.IResponseInitChain|null|undefined} initChain - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.initChain = null; - - /** - * Response query. - * @member {tendermint.abci.types.IResponseQuery|null|undefined} query - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.query = null; - - /** - * Response beginBlock. - * @member {tendermint.abci.types.IResponseBeginBlock|null|undefined} beginBlock - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.beginBlock = null; - - /** - * Response checkTx. - * @member {tendermint.abci.types.IResponseCheckTx|null|undefined} checkTx - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.checkTx = null; - - /** - * Response deliverTx. - * @member {tendermint.abci.types.IResponseDeliverTx|null|undefined} deliverTx - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.deliverTx = null; - - /** - * Response endBlock. - * @member {tendermint.abci.types.IResponseEndBlock|null|undefined} endBlock - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.endBlock = null; - - /** - * Response commit. - * @member {tendermint.abci.types.IResponseCommit|null|undefined} commit - * @memberof tendermint.abci.types.Response - * @instance - */ - Response.prototype.commit = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Response value. - * @member {"exception"|"echo"|"flush"|"info"|"setOption"|"initChain"|"query"|"beginBlock"|"checkTx"|"deliverTx"|"endBlock"|"commit"|undefined} value - * @memberof tendermint.abci.types.Response - * @instance - */ - 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) - }); - - /** - * Creates a new Response instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.Response - * @static - * @param {tendermint.abci.types.IResponse=} [properties] Properties to set - * @returns {tendermint.abci.types.Response} Response instance - */ - Response.create = function create(properties) { - return new Response(properties); - }; - - /** - * Encodes the specified Response message. Does not implicitly {@link tendermint.abci.types.Response.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.Response - * @static - * @param {tendermint.abci.types.IResponse} m Response message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Response message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.Response - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.Response} Response - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseException. - * @memberof tendermint.abci.types - * @interface IResponseException - * @property {string|null} [error] ResponseException error - */ - - /** - * Constructs a new ResponseException. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseException. - * @implements IResponseException - * @constructor - * @param {tendermint.abci.types.IResponseException=} [p] Properties to set - */ - 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 error. - * @member {string} error - * @memberof tendermint.abci.types.ResponseException - * @instance - */ - ResponseException.prototype.error = ""; - - /** - * Creates a new ResponseException instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseException - * @static - * @param {tendermint.abci.types.IResponseException=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseException} ResponseException instance - */ - ResponseException.create = function create(properties) { - return new ResponseException(properties); - }; - - /** - * Encodes the specified ResponseException message. Does not implicitly {@link tendermint.abci.types.ResponseException.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseException - * @static - * @param {tendermint.abci.types.IResponseException} m ResponseException message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseException message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseException - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseException} ResponseException - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseEcho. - * @memberof tendermint.abci.types - * @interface IResponseEcho - * @property {string|null} [message] ResponseEcho message - */ - - /** - * Constructs a new ResponseEcho. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseEcho. - * @implements IResponseEcho - * @constructor - * @param {tendermint.abci.types.IResponseEcho=} [p] Properties to set - */ - 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 message. - * @member {string} message - * @memberof tendermint.abci.types.ResponseEcho - * @instance - */ - ResponseEcho.prototype.message = ""; - - /** - * Creates a new ResponseEcho instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseEcho - * @static - * @param {tendermint.abci.types.IResponseEcho=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseEcho} ResponseEcho instance - */ - ResponseEcho.create = function create(properties) { - return new ResponseEcho(properties); - }; - - /** - * Encodes the specified ResponseEcho message. Does not implicitly {@link tendermint.abci.types.ResponseEcho.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseEcho - * @static - * @param {tendermint.abci.types.IResponseEcho} m ResponseEcho message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseEcho message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseEcho - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseEcho} ResponseEcho - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseFlush. - * @memberof tendermint.abci.types - * @interface IResponseFlush - */ - - /** - * Constructs a new ResponseFlush. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseFlush. - * @implements IResponseFlush - * @constructor - * @param {tendermint.abci.types.IResponseFlush=} [p] Properties to set - */ - 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]]; - } - - /** - * Creates a new ResponseFlush instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseFlush - * @static - * @param {tendermint.abci.types.IResponseFlush=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseFlush} ResponseFlush instance - */ - ResponseFlush.create = function create(properties) { - return new ResponseFlush(properties); - }; - - /** - * Encodes the specified ResponseFlush message. Does not implicitly {@link tendermint.abci.types.ResponseFlush.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseFlush - * @static - * @param {tendermint.abci.types.IResponseFlush} m ResponseFlush message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResponseFlush.encode = function encode(m, w) { - if (!w) - w = $Writer.create(); - return w; - }; - - /** - * Decodes a ResponseFlush message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseFlush - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseFlush} ResponseFlush - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseInfo. - * @memberof tendermint.abci.types - * @interface IResponseInfo - * @property {string|null} [data] ResponseInfo data - * @property {string|null} [version] ResponseInfo version - * @property {number|Long|null} [appVersion] ResponseInfo appVersion - * @property {number|Long|null} [lastBlockHeight] ResponseInfo lastBlockHeight - * @property {Uint8Array|null} [lastBlockAppHash] ResponseInfo lastBlockAppHash - */ - - /** - * Constructs a new ResponseInfo. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseInfo. - * @implements IResponseInfo - * @constructor - * @param {tendermint.abci.types.IResponseInfo=} [p] Properties to set - */ - 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 data. - * @member {string} data - * @memberof tendermint.abci.types.ResponseInfo - * @instance - */ - ResponseInfo.prototype.data = ""; - - /** - * ResponseInfo version. - * @member {string} version - * @memberof tendermint.abci.types.ResponseInfo - * @instance - */ - ResponseInfo.prototype.version = ""; - - /** - * ResponseInfo appVersion. - * @member {number|Long} appVersion - * @memberof tendermint.abci.types.ResponseInfo - * @instance - */ - ResponseInfo.prototype.appVersion = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * ResponseInfo lastBlockHeight. - * @member {number|Long} lastBlockHeight - * @memberof tendermint.abci.types.ResponseInfo - * @instance - */ - ResponseInfo.prototype.lastBlockHeight = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseInfo lastBlockAppHash. - * @member {Uint8Array} lastBlockAppHash - * @memberof tendermint.abci.types.ResponseInfo - * @instance - */ - ResponseInfo.prototype.lastBlockAppHash = $util.newBuffer([]); - - /** - * Creates a new ResponseInfo instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseInfo - * @static - * @param {tendermint.abci.types.IResponseInfo=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseInfo} ResponseInfo instance - */ - ResponseInfo.create = function create(properties) { - return new ResponseInfo(properties); - }; - - /** - * Encodes the specified ResponseInfo message. Does not implicitly {@link tendermint.abci.types.ResponseInfo.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseInfo - * @static - * @param {tendermint.abci.types.IResponseInfo} m ResponseInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseInfo message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseInfo} ResponseInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseSetOption. - * @memberof tendermint.abci.types - * @interface IResponseSetOption - * @property {number|null} [code] ResponseSetOption code - * @property {string|null} [log] ResponseSetOption log - * @property {string|null} [info] ResponseSetOption info - */ - - /** - * Constructs a new ResponseSetOption. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseSetOption. - * @implements IResponseSetOption - * @constructor - * @param {tendermint.abci.types.IResponseSetOption=} [p] Properties to set - */ - 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 code. - * @member {number} code - * @memberof tendermint.abci.types.ResponseSetOption - * @instance - */ - ResponseSetOption.prototype.code = 0; - - /** - * ResponseSetOption log. - * @member {string} log - * @memberof tendermint.abci.types.ResponseSetOption - * @instance - */ - ResponseSetOption.prototype.log = ""; - - /** - * ResponseSetOption info. - * @member {string} info - * @memberof tendermint.abci.types.ResponseSetOption - * @instance - */ - ResponseSetOption.prototype.info = ""; - - /** - * Creates a new ResponseSetOption instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseSetOption - * @static - * @param {tendermint.abci.types.IResponseSetOption=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseSetOption} ResponseSetOption instance - */ - ResponseSetOption.create = function create(properties) { - return new ResponseSetOption(properties); - }; - - /** - * Encodes the specified ResponseSetOption message. Does not implicitly {@link tendermint.abci.types.ResponseSetOption.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseSetOption - * @static - * @param {tendermint.abci.types.IResponseSetOption} m ResponseSetOption message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseSetOption message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseSetOption - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseSetOption} ResponseSetOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseInitChain. - * @memberof tendermint.abci.types - * @interface IResponseInitChain - * @property {tendermint.abci.types.IConsensusParams|null} [consensusParams] ResponseInitChain consensusParams - * @property {Array.|null} [validators] ResponseInitChain validators - */ - - /** - * Constructs a new ResponseInitChain. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseInitChain. - * @implements IResponseInitChain - * @constructor - * @param {tendermint.abci.types.IResponseInitChain=} [p] Properties to set - */ - 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 consensusParams. - * @member {tendermint.abci.types.IConsensusParams|null|undefined} consensusParams - * @memberof tendermint.abci.types.ResponseInitChain - * @instance - */ - ResponseInitChain.prototype.consensusParams = null; - - /** - * ResponseInitChain validators. - * @member {Array.} validators - * @memberof tendermint.abci.types.ResponseInitChain - * @instance - */ - ResponseInitChain.prototype.validators = $util.emptyArray; - - /** - * Creates a new ResponseInitChain instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseInitChain - * @static - * @param {tendermint.abci.types.IResponseInitChain=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseInitChain} ResponseInitChain instance - */ - ResponseInitChain.create = function create(properties) { - return new ResponseInitChain(properties); - }; - - /** - * Encodes the specified ResponseInitChain message. Does not implicitly {@link tendermint.abci.types.ResponseInitChain.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseInitChain - * @static - * @param {tendermint.abci.types.IResponseInitChain} m ResponseInitChain message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseInitChain message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseInitChain - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseInitChain} ResponseInitChain - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseQuery. - * @memberof tendermint.abci.types - * @interface IResponseQuery - * @property {number|null} [code] ResponseQuery code - * @property {string|null} [log] ResponseQuery log - * @property {string|null} [info] ResponseQuery info - * @property {number|Long|null} [index] ResponseQuery index - * @property {Uint8Array|null} [key] ResponseQuery key - * @property {Uint8Array|null} [value] ResponseQuery value - * @property {tendermint.crypto.merkle.IProof|null} [proof] ResponseQuery proof - * @property {number|Long|null} [height] ResponseQuery height - * @property {string|null} [codespace] ResponseQuery codespace - */ - - /** - * Constructs a new ResponseQuery. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseQuery. - * @implements IResponseQuery - * @constructor - * @param {tendermint.abci.types.IResponseQuery=} [p] Properties to set - */ - 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 code. - * @member {number} code - * @memberof tendermint.abci.types.ResponseQuery - * @instance - */ - ResponseQuery.prototype.code = 0; - - /** - * ResponseQuery log. - * @member {string} log - * @memberof tendermint.abci.types.ResponseQuery - * @instance - */ - ResponseQuery.prototype.log = ""; - - /** - * ResponseQuery info. - * @member {string} info - * @memberof tendermint.abci.types.ResponseQuery - * @instance - */ - ResponseQuery.prototype.info = ""; - - /** - * ResponseQuery index. - * @member {number|Long} index - * @memberof tendermint.abci.types.ResponseQuery - * @instance - */ - ResponseQuery.prototype.index = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseQuery key. - * @member {Uint8Array} key - * @memberof tendermint.abci.types.ResponseQuery - * @instance - */ - ResponseQuery.prototype.key = $util.newBuffer([]); - - /** - * ResponseQuery value. - * @member {Uint8Array} value - * @memberof tendermint.abci.types.ResponseQuery - * @instance - */ - ResponseQuery.prototype.value = $util.newBuffer([]); - - /** - * ResponseQuery proof. - * @member {tendermint.crypto.merkle.IProof|null|undefined} proof - * @memberof tendermint.abci.types.ResponseQuery - * @instance - */ - ResponseQuery.prototype.proof = null; - - /** - * ResponseQuery height. - * @member {number|Long} height - * @memberof tendermint.abci.types.ResponseQuery - * @instance - */ - ResponseQuery.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseQuery codespace. - * @member {string} codespace - * @memberof tendermint.abci.types.ResponseQuery - * @instance - */ - ResponseQuery.prototype.codespace = ""; - - /** - * Creates a new ResponseQuery instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseQuery - * @static - * @param {tendermint.abci.types.IResponseQuery=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseQuery} ResponseQuery instance - */ - ResponseQuery.create = function create(properties) { - return new ResponseQuery(properties); - }; - - /** - * Encodes the specified ResponseQuery message. Does not implicitly {@link tendermint.abci.types.ResponseQuery.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseQuery - * @static - * @param {tendermint.abci.types.IResponseQuery} m ResponseQuery message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseQuery message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseQuery - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseQuery} ResponseQuery - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseBeginBlock. - * @memberof tendermint.abci.types - * @interface IResponseBeginBlock - * @property {Array.|null} [events] ResponseBeginBlock events - */ - - /** - * Constructs a new ResponseBeginBlock. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseBeginBlock. - * @implements IResponseBeginBlock - * @constructor - * @param {tendermint.abci.types.IResponseBeginBlock=} [p] Properties to set - */ - 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 events. - * @member {Array.} events - * @memberof tendermint.abci.types.ResponseBeginBlock - * @instance - */ - ResponseBeginBlock.prototype.events = $util.emptyArray; - - /** - * Creates a new ResponseBeginBlock instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseBeginBlock - * @static - * @param {tendermint.abci.types.IResponseBeginBlock=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseBeginBlock} ResponseBeginBlock instance - */ - ResponseBeginBlock.create = function create(properties) { - return new ResponseBeginBlock(properties); - }; - - /** - * Encodes the specified ResponseBeginBlock message. Does not implicitly {@link tendermint.abci.types.ResponseBeginBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseBeginBlock - * @static - * @param {tendermint.abci.types.IResponseBeginBlock} m ResponseBeginBlock message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseBeginBlock message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseBeginBlock - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseBeginBlock} ResponseBeginBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseCheckTx. - * @memberof tendermint.abci.types - * @interface IResponseCheckTx - * @property {number|null} [code] ResponseCheckTx code - * @property {Uint8Array|null} [data] ResponseCheckTx data - * @property {string|null} [log] ResponseCheckTx log - * @property {string|null} [info] ResponseCheckTx info - * @property {number|Long|null} [gasWanted] ResponseCheckTx gasWanted - * @property {number|Long|null} [gasUsed] ResponseCheckTx gasUsed - * @property {Array.|null} [events] ResponseCheckTx events - * @property {string|null} [codespace] ResponseCheckTx codespace - */ - - /** - * Constructs a new ResponseCheckTx. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseCheckTx. - * @implements IResponseCheckTx - * @constructor - * @param {tendermint.abci.types.IResponseCheckTx=} [p] Properties to set - */ - 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 code. - * @member {number} code - * @memberof tendermint.abci.types.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.code = 0; - - /** - * ResponseCheckTx data. - * @member {Uint8Array} data - * @memberof tendermint.abci.types.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.data = $util.newBuffer([]); - - /** - * ResponseCheckTx log. - * @member {string} log - * @memberof tendermint.abci.types.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.log = ""; - - /** - * ResponseCheckTx info. - * @member {string} info - * @memberof tendermint.abci.types.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.info = ""; - - /** - * ResponseCheckTx gasWanted. - * @member {number|Long} gasWanted - * @memberof tendermint.abci.types.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseCheckTx gasUsed. - * @member {number|Long} gasUsed - * @memberof tendermint.abci.types.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseCheckTx events. - * @member {Array.} events - * @memberof tendermint.abci.types.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.events = $util.emptyArray; - - /** - * ResponseCheckTx codespace. - * @member {string} codespace - * @memberof tendermint.abci.types.ResponseCheckTx - * @instance - */ - ResponseCheckTx.prototype.codespace = ""; - - /** - * Creates a new ResponseCheckTx instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseCheckTx - * @static - * @param {tendermint.abci.types.IResponseCheckTx=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseCheckTx} ResponseCheckTx instance - */ - ResponseCheckTx.create = function create(properties) { - return new ResponseCheckTx(properties); - }; - - /** - * Encodes the specified ResponseCheckTx message. Does not implicitly {@link tendermint.abci.types.ResponseCheckTx.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseCheckTx - * @static - * @param {tendermint.abci.types.IResponseCheckTx} m ResponseCheckTx message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseCheckTx message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseCheckTx - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseCheckTx} ResponseCheckTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseDeliverTx. - * @memberof tendermint.abci.types - * @interface IResponseDeliverTx - * @property {number|null} [code] ResponseDeliverTx code - * @property {Uint8Array|null} [data] ResponseDeliverTx data - * @property {string|null} [log] ResponseDeliverTx log - * @property {string|null} [info] ResponseDeliverTx info - * @property {number|Long|null} [gasWanted] ResponseDeliverTx gasWanted - * @property {number|Long|null} [gasUsed] ResponseDeliverTx gasUsed - * @property {Array.|null} [events] ResponseDeliverTx events - * @property {string|null} [codespace] ResponseDeliverTx codespace - */ - - /** - * Constructs a new ResponseDeliverTx. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseDeliverTx. - * @implements IResponseDeliverTx - * @constructor - * @param {tendermint.abci.types.IResponseDeliverTx=} [p] Properties to set - */ - 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 code. - * @member {number} code - * @memberof tendermint.abci.types.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.code = 0; - - /** - * ResponseDeliverTx data. - * @member {Uint8Array} data - * @memberof tendermint.abci.types.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.data = $util.newBuffer([]); - - /** - * ResponseDeliverTx log. - * @member {string} log - * @memberof tendermint.abci.types.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.log = ""; - - /** - * ResponseDeliverTx info. - * @member {string} info - * @memberof tendermint.abci.types.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.info = ""; - - /** - * ResponseDeliverTx gasWanted. - * @member {number|Long} gasWanted - * @memberof tendermint.abci.types.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.gasWanted = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseDeliverTx gasUsed. - * @member {number|Long} gasUsed - * @memberof tendermint.abci.types.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.gasUsed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ResponseDeliverTx events. - * @member {Array.} events - * @memberof tendermint.abci.types.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.events = $util.emptyArray; - - /** - * ResponseDeliverTx codespace. - * @member {string} codespace - * @memberof tendermint.abci.types.ResponseDeliverTx - * @instance - */ - ResponseDeliverTx.prototype.codespace = ""; - - /** - * Creates a new ResponseDeliverTx instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseDeliverTx - * @static - * @param {tendermint.abci.types.IResponseDeliverTx=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseDeliverTx} ResponseDeliverTx instance - */ - ResponseDeliverTx.create = function create(properties) { - return new ResponseDeliverTx(properties); - }; - - /** - * Encodes the specified ResponseDeliverTx message. Does not implicitly {@link tendermint.abci.types.ResponseDeliverTx.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseDeliverTx - * @static - * @param {tendermint.abci.types.IResponseDeliverTx} m ResponseDeliverTx message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseDeliverTx message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseDeliverTx - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseDeliverTx} ResponseDeliverTx - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseEndBlock. - * @memberof tendermint.abci.types - * @interface IResponseEndBlock - * @property {Array.|null} [validatorUpdates] ResponseEndBlock validatorUpdates - * @property {tendermint.abci.types.IConsensusParams|null} [consensusParamUpdates] ResponseEndBlock consensusParamUpdates - * @property {Array.|null} [events] ResponseEndBlock events - */ - - /** - * Constructs a new ResponseEndBlock. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseEndBlock. - * @implements IResponseEndBlock - * @constructor - * @param {tendermint.abci.types.IResponseEndBlock=} [p] Properties to set - */ - 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 validatorUpdates. - * @member {Array.} validatorUpdates - * @memberof tendermint.abci.types.ResponseEndBlock - * @instance - */ - ResponseEndBlock.prototype.validatorUpdates = $util.emptyArray; - - /** - * ResponseEndBlock consensusParamUpdates. - * @member {tendermint.abci.types.IConsensusParams|null|undefined} consensusParamUpdates - * @memberof tendermint.abci.types.ResponseEndBlock - * @instance - */ - ResponseEndBlock.prototype.consensusParamUpdates = null; - - /** - * ResponseEndBlock events. - * @member {Array.} events - * @memberof tendermint.abci.types.ResponseEndBlock - * @instance - */ - ResponseEndBlock.prototype.events = $util.emptyArray; - - /** - * Creates a new ResponseEndBlock instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseEndBlock - * @static - * @param {tendermint.abci.types.IResponseEndBlock=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseEndBlock} ResponseEndBlock instance - */ - ResponseEndBlock.create = function create(properties) { - return new ResponseEndBlock(properties); - }; - - /** - * Encodes the specified ResponseEndBlock message. Does not implicitly {@link tendermint.abci.types.ResponseEndBlock.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseEndBlock - * @static - * @param {tendermint.abci.types.IResponseEndBlock} m ResponseEndBlock message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseEndBlock message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseEndBlock - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseEndBlock} ResponseEndBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ResponseCommit. - * @memberof tendermint.abci.types - * @interface IResponseCommit - * @property {Uint8Array|null} [data] ResponseCommit data - */ - - /** - * Constructs a new ResponseCommit. - * @memberof tendermint.abci.types - * @classdesc Represents a ResponseCommit. - * @implements IResponseCommit - * @constructor - * @param {tendermint.abci.types.IResponseCommit=} [p] Properties to set - */ - 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 data. - * @member {Uint8Array} data - * @memberof tendermint.abci.types.ResponseCommit - * @instance - */ - ResponseCommit.prototype.data = $util.newBuffer([]); - - /** - * Creates a new ResponseCommit instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ResponseCommit - * @static - * @param {tendermint.abci.types.IResponseCommit=} [properties] Properties to set - * @returns {tendermint.abci.types.ResponseCommit} ResponseCommit instance - */ - ResponseCommit.create = function create(properties) { - return new ResponseCommit(properties); - }; - - /** - * Encodes the specified ResponseCommit message. Does not implicitly {@link tendermint.abci.types.ResponseCommit.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ResponseCommit - * @static - * @param {tendermint.abci.types.IResponseCommit} m ResponseCommit message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ResponseCommit message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ResponseCommit - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ResponseCommit} ResponseCommit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ConsensusParams. - * @memberof tendermint.abci.types - * @interface IConsensusParams - * @property {tendermint.abci.types.IBlockParams|null} [block] ConsensusParams block - * @property {tendermint.abci.types.IEvidenceParams|null} [evidence] ConsensusParams evidence - * @property {tendermint.abci.types.IValidatorParams|null} [validator] ConsensusParams validator - */ - - /** - * Constructs a new ConsensusParams. - * @memberof tendermint.abci.types - * @classdesc Represents a ConsensusParams. - * @implements IConsensusParams - * @constructor - * @param {tendermint.abci.types.IConsensusParams=} [p] Properties to set - */ - 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 block. - * @member {tendermint.abci.types.IBlockParams|null|undefined} block - * @memberof tendermint.abci.types.ConsensusParams - * @instance - */ - ConsensusParams.prototype.block = null; - - /** - * ConsensusParams evidence. - * @member {tendermint.abci.types.IEvidenceParams|null|undefined} evidence - * @memberof tendermint.abci.types.ConsensusParams - * @instance - */ - ConsensusParams.prototype.evidence = null; - - /** - * ConsensusParams validator. - * @member {tendermint.abci.types.IValidatorParams|null|undefined} validator - * @memberof tendermint.abci.types.ConsensusParams - * @instance - */ - ConsensusParams.prototype.validator = null; - - /** - * Creates a new ConsensusParams instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ConsensusParams - * @static - * @param {tendermint.abci.types.IConsensusParams=} [properties] Properties to set - * @returns {tendermint.abci.types.ConsensusParams} ConsensusParams instance - */ - ConsensusParams.create = function create(properties) { - return new ConsensusParams(properties); - }; - - /** - * Encodes the specified ConsensusParams message. Does not implicitly {@link tendermint.abci.types.ConsensusParams.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ConsensusParams - * @static - * @param {tendermint.abci.types.IConsensusParams} m ConsensusParams message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ConsensusParams message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ConsensusParams - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ConsensusParams} ConsensusParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a BlockParams. - * @memberof tendermint.abci.types - * @interface IBlockParams - * @property {number|Long|null} [maxBytes] BlockParams maxBytes - * @property {number|Long|null} [maxGas] BlockParams maxGas - */ - - /** - * Constructs a new BlockParams. - * @memberof tendermint.abci.types - * @classdesc Represents a BlockParams. - * @implements IBlockParams - * @constructor - * @param {tendermint.abci.types.IBlockParams=} [p] Properties to set - */ - 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 maxBytes. - * @member {number|Long} maxBytes - * @memberof tendermint.abci.types.BlockParams - * @instance - */ - BlockParams.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * BlockParams maxGas. - * @member {number|Long} maxGas - * @memberof tendermint.abci.types.BlockParams - * @instance - */ - BlockParams.prototype.maxGas = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new BlockParams instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.BlockParams - * @static - * @param {tendermint.abci.types.IBlockParams=} [properties] Properties to set - * @returns {tendermint.abci.types.BlockParams} BlockParams instance - */ - BlockParams.create = function create(properties) { - return new BlockParams(properties); - }; - - /** - * Encodes the specified BlockParams message. Does not implicitly {@link tendermint.abci.types.BlockParams.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.BlockParams - * @static - * @param {tendermint.abci.types.IBlockParams} m BlockParams message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a BlockParams message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.BlockParams - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.BlockParams} BlockParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of an EvidenceParams. - * @memberof tendermint.abci.types - * @interface IEvidenceParams - * @property {number|Long|null} [maxAgeNumBlocks] EvidenceParams maxAgeNumBlocks - * @property {google.protobuf.IDuration|null} [maxAgeDuration] EvidenceParams maxAgeDuration - */ - - /** - * Constructs a new EvidenceParams. - * @memberof tendermint.abci.types - * @classdesc Represents an EvidenceParams. - * @implements IEvidenceParams - * @constructor - * @param {tendermint.abci.types.IEvidenceParams=} [p] Properties to set - */ - 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 maxAgeNumBlocks. - * @member {number|Long} maxAgeNumBlocks - * @memberof tendermint.abci.types.EvidenceParams - * @instance - */ - EvidenceParams.prototype.maxAgeNumBlocks = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * EvidenceParams maxAgeDuration. - * @member {google.protobuf.IDuration|null|undefined} maxAgeDuration - * @memberof tendermint.abci.types.EvidenceParams - * @instance - */ - EvidenceParams.prototype.maxAgeDuration = null; - - /** - * Creates a new EvidenceParams instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.EvidenceParams - * @static - * @param {tendermint.abci.types.IEvidenceParams=} [properties] Properties to set - * @returns {tendermint.abci.types.EvidenceParams} EvidenceParams instance - */ - EvidenceParams.create = function create(properties) { - return new EvidenceParams(properties); - }; - - /** - * Encodes the specified EvidenceParams message. Does not implicitly {@link tendermint.abci.types.EvidenceParams.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.EvidenceParams - * @static - * @param {tendermint.abci.types.IEvidenceParams} m EvidenceParams message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an EvidenceParams message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.EvidenceParams - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.EvidenceParams} EvidenceParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ValidatorParams. - * @memberof tendermint.abci.types - * @interface IValidatorParams - * @property {Array.|null} [pubKeyTypes] ValidatorParams pubKeyTypes - */ - - /** - * Constructs a new ValidatorParams. - * @memberof tendermint.abci.types - * @classdesc Represents a ValidatorParams. - * @implements IValidatorParams - * @constructor - * @param {tendermint.abci.types.IValidatorParams=} [p] Properties to set - */ - 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 pubKeyTypes. - * @member {Array.} pubKeyTypes - * @memberof tendermint.abci.types.ValidatorParams - * @instance - */ - ValidatorParams.prototype.pubKeyTypes = $util.emptyArray; - - /** - * Creates a new ValidatorParams instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ValidatorParams - * @static - * @param {tendermint.abci.types.IValidatorParams=} [properties] Properties to set - * @returns {tendermint.abci.types.ValidatorParams} ValidatorParams instance - */ - ValidatorParams.create = function create(properties) { - return new ValidatorParams(properties); - }; - - /** - * Encodes the specified ValidatorParams message. Does not implicitly {@link tendermint.abci.types.ValidatorParams.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ValidatorParams - * @static - * @param {tendermint.abci.types.IValidatorParams} m ValidatorParams message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ValidatorParams message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ValidatorParams - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ValidatorParams} ValidatorParams - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a LastCommitInfo. - * @memberof tendermint.abci.types - * @interface ILastCommitInfo - * @property {number|null} [round] LastCommitInfo round - * @property {Array.|null} [votes] LastCommitInfo votes - */ - - /** - * Constructs a new LastCommitInfo. - * @memberof tendermint.abci.types - * @classdesc Represents a LastCommitInfo. - * @implements ILastCommitInfo - * @constructor - * @param {tendermint.abci.types.ILastCommitInfo=} [p] Properties to set - */ - 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 round. - * @member {number} round - * @memberof tendermint.abci.types.LastCommitInfo - * @instance - */ - LastCommitInfo.prototype.round = 0; - - /** - * LastCommitInfo votes. - * @member {Array.} votes - * @memberof tendermint.abci.types.LastCommitInfo - * @instance - */ - LastCommitInfo.prototype.votes = $util.emptyArray; - - /** - * Creates a new LastCommitInfo instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.LastCommitInfo - * @static - * @param {tendermint.abci.types.ILastCommitInfo=} [properties] Properties to set - * @returns {tendermint.abci.types.LastCommitInfo} LastCommitInfo instance - */ - LastCommitInfo.create = function create(properties) { - return new LastCommitInfo(properties); - }; - - /** - * Encodes the specified LastCommitInfo message. Does not implicitly {@link tendermint.abci.types.LastCommitInfo.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.LastCommitInfo - * @static - * @param {tendermint.abci.types.ILastCommitInfo} m LastCommitInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a LastCommitInfo message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.LastCommitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.LastCommitInfo} LastCommitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of an Event. - * @memberof tendermint.abci.types - * @interface IEvent - * @property {string|null} [type] Event type - * @property {Array.|null} [attributes] Event attributes - */ - - /** - * Constructs a new Event. - * @memberof tendermint.abci.types - * @classdesc Represents an Event. - * @implements IEvent - * @constructor - * @param {tendermint.abci.types.IEvent=} [p] Properties to set - */ - 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 type. - * @member {string} type - * @memberof tendermint.abci.types.Event - * @instance - */ - Event.prototype.type = ""; - - /** - * Event attributes. - * @member {Array.} attributes - * @memberof tendermint.abci.types.Event - * @instance - */ - Event.prototype.attributes = $util.emptyArray; - - /** - * Creates a new Event instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.Event - * @static - * @param {tendermint.abci.types.IEvent=} [properties] Properties to set - * @returns {tendermint.abci.types.Event} Event instance - */ - Event.create = function create(properties) { - return new Event(properties); - }; - - /** - * Encodes the specified Event message. Does not implicitly {@link tendermint.abci.types.Event.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.Event - * @static - * @param {tendermint.abci.types.IEvent} m Event message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an Event message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.Event - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.Event} Event - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Header. - * @memberof tendermint.abci.types - * @interface IHeader - * @property {tendermint.abci.types.IVersion|null} [version] Header version - * @property {string|null} [chainId] Header chainId - * @property {number|Long|null} [height] Header height - * @property {google.protobuf.ITimestamp|null} [time] Header time - * @property {tendermint.abci.types.IBlockID|null} [lastBlockId] Header lastBlockId - * @property {Uint8Array|null} [lastCommitHash] Header lastCommitHash - * @property {Uint8Array|null} [dataHash] Header dataHash - * @property {Uint8Array|null} [validatorsHash] Header validatorsHash - * @property {Uint8Array|null} [nextValidatorsHash] Header nextValidatorsHash - * @property {Uint8Array|null} [consensusHash] Header consensusHash - * @property {Uint8Array|null} [appHash] Header appHash - * @property {Uint8Array|null} [lastResultsHash] Header lastResultsHash - * @property {Uint8Array|null} [evidenceHash] Header evidenceHash - * @property {Uint8Array|null} [proposerAddress] Header proposerAddress - */ - - /** - * Constructs a new Header. - * @memberof tendermint.abci.types - * @classdesc Represents a Header. - * @implements IHeader - * @constructor - * @param {tendermint.abci.types.IHeader=} [p] Properties to set - */ - 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 version. - * @member {tendermint.abci.types.IVersion|null|undefined} version - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.version = null; - - /** - * Header chainId. - * @member {string} chainId - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.chainId = ""; - - /** - * Header height. - * @member {number|Long} height - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Header time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.time = null; - - /** - * Header lastBlockId. - * @member {tendermint.abci.types.IBlockID|null|undefined} lastBlockId - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.lastBlockId = null; - - /** - * Header lastCommitHash. - * @member {Uint8Array} lastCommitHash - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.lastCommitHash = $util.newBuffer([]); - - /** - * Header dataHash. - * @member {Uint8Array} dataHash - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.dataHash = $util.newBuffer([]); - - /** - * Header validatorsHash. - * @member {Uint8Array} validatorsHash - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.validatorsHash = $util.newBuffer([]); - - /** - * Header nextValidatorsHash. - * @member {Uint8Array} nextValidatorsHash - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.nextValidatorsHash = $util.newBuffer([]); - - /** - * Header consensusHash. - * @member {Uint8Array} consensusHash - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.consensusHash = $util.newBuffer([]); - - /** - * Header appHash. - * @member {Uint8Array} appHash - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.appHash = $util.newBuffer([]); - - /** - * Header lastResultsHash. - * @member {Uint8Array} lastResultsHash - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.lastResultsHash = $util.newBuffer([]); - - /** - * Header evidenceHash. - * @member {Uint8Array} evidenceHash - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.evidenceHash = $util.newBuffer([]); - - /** - * Header proposerAddress. - * @member {Uint8Array} proposerAddress - * @memberof tendermint.abci.types.Header - * @instance - */ - Header.prototype.proposerAddress = $util.newBuffer([]); - - /** - * Creates a new Header instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.Header - * @static - * @param {tendermint.abci.types.IHeader=} [properties] Properties to set - * @returns {tendermint.abci.types.Header} Header instance - */ - Header.create = function create(properties) { - return new Header(properties); - }; - - /** - * Encodes the specified Header message. Does not implicitly {@link tendermint.abci.types.Header.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.Header - * @static - * @param {tendermint.abci.types.IHeader} m Header message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Header message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.Header - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.Header} Header - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Version. - * @memberof tendermint.abci.types - * @interface IVersion - * @property {number|Long|null} [Block] Version Block - * @property {number|Long|null} [App] Version App - */ - - /** - * Constructs a new Version. - * @memberof tendermint.abci.types - * @classdesc Represents a Version. - * @implements IVersion - * @constructor - * @param {tendermint.abci.types.IVersion=} [p] Properties to set - */ - 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 Block. - * @member {number|Long} Block - * @memberof tendermint.abci.types.Version - * @instance - */ - Version.prototype.Block = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Version App. - * @member {number|Long} App - * @memberof tendermint.abci.types.Version - * @instance - */ - Version.prototype.App = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * Creates a new Version instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.Version - * @static - * @param {tendermint.abci.types.IVersion=} [properties] Properties to set - * @returns {tendermint.abci.types.Version} Version instance - */ - Version.create = function create(properties) { - return new Version(properties); - }; - - /** - * Encodes the specified Version message. Does not implicitly {@link tendermint.abci.types.Version.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.Version - * @static - * @param {tendermint.abci.types.IVersion} m Version message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Version message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.Version - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.Version} Version - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a BlockID. - * @memberof tendermint.abci.types - * @interface IBlockID - * @property {Uint8Array|null} [hash] BlockID hash - * @property {tendermint.abci.types.IPartSetHeader|null} [partsHeader] BlockID partsHeader - */ - - /** - * Constructs a new BlockID. - * @memberof tendermint.abci.types - * @classdesc Represents a BlockID. - * @implements IBlockID - * @constructor - * @param {tendermint.abci.types.IBlockID=} [p] Properties to set - */ - 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 hash. - * @member {Uint8Array} hash - * @memberof tendermint.abci.types.BlockID - * @instance - */ - BlockID.prototype.hash = $util.newBuffer([]); - - /** - * BlockID partsHeader. - * @member {tendermint.abci.types.IPartSetHeader|null|undefined} partsHeader - * @memberof tendermint.abci.types.BlockID - * @instance - */ - BlockID.prototype.partsHeader = null; - - /** - * Creates a new BlockID instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.BlockID - * @static - * @param {tendermint.abci.types.IBlockID=} [properties] Properties to set - * @returns {tendermint.abci.types.BlockID} BlockID instance - */ - BlockID.create = function create(properties) { - return new BlockID(properties); - }; - - /** - * Encodes the specified BlockID message. Does not implicitly {@link tendermint.abci.types.BlockID.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.BlockID - * @static - * @param {tendermint.abci.types.IBlockID} m BlockID message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a BlockID message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.BlockID - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.BlockID} BlockID - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a PartSetHeader. - * @memberof tendermint.abci.types - * @interface IPartSetHeader - * @property {number|null} [total] PartSetHeader total - * @property {Uint8Array|null} [hash] PartSetHeader hash - */ - - /** - * Constructs a new PartSetHeader. - * @memberof tendermint.abci.types - * @classdesc Represents a PartSetHeader. - * @implements IPartSetHeader - * @constructor - * @param {tendermint.abci.types.IPartSetHeader=} [p] Properties to set - */ - 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 total. - * @member {number} total - * @memberof tendermint.abci.types.PartSetHeader - * @instance - */ - PartSetHeader.prototype.total = 0; - - /** - * PartSetHeader hash. - * @member {Uint8Array} hash - * @memberof tendermint.abci.types.PartSetHeader - * @instance - */ - PartSetHeader.prototype.hash = $util.newBuffer([]); - - /** - * Creates a new PartSetHeader instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.PartSetHeader - * @static - * @param {tendermint.abci.types.IPartSetHeader=} [properties] Properties to set - * @returns {tendermint.abci.types.PartSetHeader} PartSetHeader instance - */ - PartSetHeader.create = function create(properties) { - return new PartSetHeader(properties); - }; - - /** - * Encodes the specified PartSetHeader message. Does not implicitly {@link tendermint.abci.types.PartSetHeader.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.PartSetHeader - * @static - * @param {tendermint.abci.types.IPartSetHeader} m PartSetHeader message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a PartSetHeader message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.PartSetHeader - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.PartSetHeader} PartSetHeader - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Validator. - * @memberof tendermint.abci.types - * @interface IValidator - * @property {Uint8Array|null} [address] Validator address - * @property {number|Long|null} [power] Validator power - */ - - /** - * Constructs a new Validator. - * @memberof tendermint.abci.types - * @classdesc Represents a Validator. - * @implements IValidator - * @constructor - * @param {tendermint.abci.types.IValidator=} [p] Properties to set - */ - 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 address. - * @member {Uint8Array} address - * @memberof tendermint.abci.types.Validator - * @instance - */ - Validator.prototype.address = $util.newBuffer([]); - - /** - * Validator power. - * @member {number|Long} power - * @memberof tendermint.abci.types.Validator - * @instance - */ - Validator.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Validator instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.Validator - * @static - * @param {tendermint.abci.types.IValidator=} [properties] Properties to set - * @returns {tendermint.abci.types.Validator} Validator instance - */ - Validator.create = function create(properties) { - return new Validator(properties); - }; - - /** - * Encodes the specified Validator message. Does not implicitly {@link tendermint.abci.types.Validator.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.Validator - * @static - * @param {tendermint.abci.types.IValidator} m Validator message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Validator message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.Validator - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.Validator} Validator - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a ValidatorUpdate. - * @memberof tendermint.abci.types - * @interface IValidatorUpdate - * @property {tendermint.abci.types.IPubKey|null} [pubKey] ValidatorUpdate pubKey - * @property {number|Long|null} [power] ValidatorUpdate power - */ - - /** - * Constructs a new ValidatorUpdate. - * @memberof tendermint.abci.types - * @classdesc Represents a ValidatorUpdate. - * @implements IValidatorUpdate - * @constructor - * @param {tendermint.abci.types.IValidatorUpdate=} [p] Properties to set - */ - 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 pubKey. - * @member {tendermint.abci.types.IPubKey|null|undefined} pubKey - * @memberof tendermint.abci.types.ValidatorUpdate - * @instance - */ - ValidatorUpdate.prototype.pubKey = null; - - /** - * ValidatorUpdate power. - * @member {number|Long} power - * @memberof tendermint.abci.types.ValidatorUpdate - * @instance - */ - ValidatorUpdate.prototype.power = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new ValidatorUpdate instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.ValidatorUpdate - * @static - * @param {tendermint.abci.types.IValidatorUpdate=} [properties] Properties to set - * @returns {tendermint.abci.types.ValidatorUpdate} ValidatorUpdate instance - */ - ValidatorUpdate.create = function create(properties) { - return new ValidatorUpdate(properties); - }; - - /** - * Encodes the specified ValidatorUpdate message. Does not implicitly {@link tendermint.abci.types.ValidatorUpdate.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.ValidatorUpdate - * @static - * @param {tendermint.abci.types.IValidatorUpdate} m ValidatorUpdate message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ValidatorUpdate message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.ValidatorUpdate - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.ValidatorUpdate} ValidatorUpdate - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a VoteInfo. - * @memberof tendermint.abci.types - * @interface IVoteInfo - * @property {tendermint.abci.types.IValidator|null} [validator] VoteInfo validator - * @property {boolean|null} [signedLastBlock] VoteInfo signedLastBlock - */ - - /** - * Constructs a new VoteInfo. - * @memberof tendermint.abci.types - * @classdesc Represents a VoteInfo. - * @implements IVoteInfo - * @constructor - * @param {tendermint.abci.types.IVoteInfo=} [p] Properties to set - */ - 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 validator. - * @member {tendermint.abci.types.IValidator|null|undefined} validator - * @memberof tendermint.abci.types.VoteInfo - * @instance - */ - VoteInfo.prototype.validator = null; - - /** - * VoteInfo signedLastBlock. - * @member {boolean} signedLastBlock - * @memberof tendermint.abci.types.VoteInfo - * @instance - */ - VoteInfo.prototype.signedLastBlock = false; - - /** - * Creates a new VoteInfo instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.VoteInfo - * @static - * @param {tendermint.abci.types.IVoteInfo=} [properties] Properties to set - * @returns {tendermint.abci.types.VoteInfo} VoteInfo instance - */ - VoteInfo.create = function create(properties) { - return new VoteInfo(properties); - }; - - /** - * Encodes the specified VoteInfo message. Does not implicitly {@link tendermint.abci.types.VoteInfo.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.VoteInfo - * @static - * @param {tendermint.abci.types.IVoteInfo} m VoteInfo message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a VoteInfo message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.VoteInfo - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.VoteInfo} VoteInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a PubKey. - * @memberof tendermint.abci.types - * @interface IPubKey - * @property {string|null} [type] PubKey type - * @property {Uint8Array|null} [data] PubKey data - */ - - /** - * Constructs a new PubKey. - * @memberof tendermint.abci.types - * @classdesc Represents a PubKey. - * @implements IPubKey - * @constructor - * @param {tendermint.abci.types.IPubKey=} [p] Properties to set - */ - 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 type. - * @member {string} type - * @memberof tendermint.abci.types.PubKey - * @instance - */ - PubKey.prototype.type = ""; - - /** - * PubKey data. - * @member {Uint8Array} data - * @memberof tendermint.abci.types.PubKey - * @instance - */ - PubKey.prototype.data = $util.newBuffer([]); - - /** - * Creates a new PubKey instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.PubKey - * @static - * @param {tendermint.abci.types.IPubKey=} [properties] Properties to set - * @returns {tendermint.abci.types.PubKey} PubKey instance - */ - PubKey.create = function create(properties) { - return new PubKey(properties); - }; - - /** - * Encodes the specified PubKey message. Does not implicitly {@link tendermint.abci.types.PubKey.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.PubKey - * @static - * @param {tendermint.abci.types.IPubKey} m PubKey message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a PubKey message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.PubKey - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.PubKey} PubKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of an Evidence. - * @memberof tendermint.abci.types - * @interface IEvidence - * @property {string|null} [type] Evidence type - * @property {tendermint.abci.types.IValidator|null} [validator] Evidence validator - * @property {number|Long|null} [height] Evidence height - * @property {google.protobuf.ITimestamp|null} [time] Evidence time - * @property {number|Long|null} [totalVotingPower] Evidence totalVotingPower - */ - - /** - * Constructs a new Evidence. - * @memberof tendermint.abci.types - * @classdesc Represents an Evidence. - * @implements IEvidence - * @constructor - * @param {tendermint.abci.types.IEvidence=} [p] Properties to set - */ - 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 type. - * @member {string} type - * @memberof tendermint.abci.types.Evidence - * @instance - */ - Evidence.prototype.type = ""; - - /** - * Evidence validator. - * @member {tendermint.abci.types.IValidator|null|undefined} validator - * @memberof tendermint.abci.types.Evidence - * @instance - */ - Evidence.prototype.validator = null; - - /** - * Evidence height. - * @member {number|Long} height - * @memberof tendermint.abci.types.Evidence - * @instance - */ - Evidence.prototype.height = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Evidence time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof tendermint.abci.types.Evidence - * @instance - */ - Evidence.prototype.time = null; - - /** - * Evidence totalVotingPower. - * @member {number|Long} totalVotingPower - * @memberof tendermint.abci.types.Evidence - * @instance - */ - Evidence.prototype.totalVotingPower = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new Evidence instance using the specified properties. - * @function create - * @memberof tendermint.abci.types.Evidence - * @static - * @param {tendermint.abci.types.IEvidence=} [properties] Properties to set - * @returns {tendermint.abci.types.Evidence} Evidence instance - */ - Evidence.create = function create(properties) { - return new Evidence(properties); - }; - - /** - * Encodes the specified Evidence message. Does not implicitly {@link tendermint.abci.types.Evidence.verify|verify} messages. - * @function encode - * @memberof tendermint.abci.types.Evidence - * @static - * @param {tendermint.abci.types.IEvidence} m Evidence message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an Evidence message from the specified reader or buffer. - * @function decode - * @memberof tendermint.abci.types.Evidence - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.abci.types.Evidence} Evidence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Constructs a new ABCIApplication service. - * @memberof tendermint.abci.types - * @classdesc Represents a ABCIApplication - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function ABCIApplication(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ABCIApplication.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ABCIApplication; - - /** - * Creates new ABCIApplication service using the specified rpc implementation. - * @function create - * @memberof tendermint.abci.types.ABCIApplication - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {ABCIApplication} RPC service. Useful where requests and/or responses are streamed. - */ - ABCIApplication.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#echo}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef EchoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseEcho} [response] ResponseEcho - */ - - /** - * Calls Echo. - * @function echo - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestEcho} request RequestEcho message or plain object - * @param {tendermint.abci.types.ABCIApplication.EchoCallback} callback Node-style callback called with the error, if any, and ResponseEcho - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls Echo. - * @function echo - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestEcho} request RequestEcho message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#flush}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef FlushCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseFlush} [response] ResponseFlush - */ - - /** - * Calls Flush. - * @function flush - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestFlush} request RequestFlush message or plain object - * @param {tendermint.abci.types.ABCIApplication.FlushCallback} callback Node-style callback called with the error, if any, and ResponseFlush - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls Flush. - * @function flush - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestFlush} request RequestFlush message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#info}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef InfoCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseInfo} [response] ResponseInfo - */ - - /** - * Calls Info. - * @function info - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestInfo} request RequestInfo message or plain object - * @param {tendermint.abci.types.ABCIApplication.InfoCallback} callback Node-style callback called with the error, if any, and ResponseInfo - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls Info. - * @function info - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestInfo} request RequestInfo message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#setOption}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef SetOptionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseSetOption} [response] ResponseSetOption - */ - - /** - * Calls SetOption. - * @function setOption - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestSetOption} request RequestSetOption message or plain object - * @param {tendermint.abci.types.ABCIApplication.SetOptionCallback} callback Node-style callback called with the error, if any, and ResponseSetOption - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls SetOption. - * @function setOption - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestSetOption} request RequestSetOption message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#deliverTx}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef DeliverTxCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseDeliverTx} [response] ResponseDeliverTx - */ - - /** - * Calls DeliverTx. - * @function deliverTx - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestDeliverTx} request RequestDeliverTx message or plain object - * @param {tendermint.abci.types.ABCIApplication.DeliverTxCallback} callback Node-style callback called with the error, if any, and ResponseDeliverTx - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls DeliverTx. - * @function deliverTx - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestDeliverTx} request RequestDeliverTx message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#checkTx}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef CheckTxCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseCheckTx} [response] ResponseCheckTx - */ - - /** - * Calls CheckTx. - * @function checkTx - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestCheckTx} request RequestCheckTx message or plain object - * @param {tendermint.abci.types.ABCIApplication.CheckTxCallback} callback Node-style callback called with the error, if any, and ResponseCheckTx - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls CheckTx. - * @function checkTx - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestCheckTx} request RequestCheckTx message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#query}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef QueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseQuery} [response] ResponseQuery - */ - - /** - * Calls Query. - * @function query - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestQuery} request RequestQuery message or plain object - * @param {tendermint.abci.types.ABCIApplication.QueryCallback} callback Node-style callback called with the error, if any, and ResponseQuery - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls Query. - * @function query - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestQuery} request RequestQuery message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#commit}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef CommitCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseCommit} [response] ResponseCommit - */ - - /** - * Calls Commit. - * @function commit - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestCommit} request RequestCommit message or plain object - * @param {tendermint.abci.types.ABCIApplication.CommitCallback} callback Node-style callback called with the error, if any, and ResponseCommit - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls Commit. - * @function commit - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestCommit} request RequestCommit message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#initChain}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef InitChainCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseInitChain} [response] ResponseInitChain - */ - - /** - * Calls InitChain. - * @function initChain - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestInitChain} request RequestInitChain message or plain object - * @param {tendermint.abci.types.ABCIApplication.InitChainCallback} callback Node-style callback called with the error, if any, and ResponseInitChain - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls InitChain. - * @function initChain - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestInitChain} request RequestInitChain message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#beginBlock}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef BeginBlockCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseBeginBlock} [response] ResponseBeginBlock - */ - - /** - * Calls BeginBlock. - * @function beginBlock - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestBeginBlock} request RequestBeginBlock message or plain object - * @param {tendermint.abci.types.ABCIApplication.BeginBlockCallback} callback Node-style callback called with the error, if any, and ResponseBeginBlock - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls BeginBlock. - * @function beginBlock - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestBeginBlock} request RequestBeginBlock message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link tendermint.abci.types.ABCIApplication#endBlock}. - * @memberof tendermint.abci.types.ABCIApplication - * @typedef EndBlockCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {tendermint.abci.types.ResponseEndBlock} [response] ResponseEndBlock - */ - - /** - * Calls EndBlock. - * @function endBlock - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestEndBlock} request RequestEndBlock message or plain object - * @param {tendermint.abci.types.ABCIApplication.EndBlockCallback} callback Node-style callback called with the error, if any, and ResponseEndBlock - * @returns {undefined} - * @variation 1 - */ - 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" }); - - /** - * Calls EndBlock. - * @function endBlock - * @memberof tendermint.abci.types.ABCIApplication - * @instance - * @param {tendermint.abci.types.IRequestEndBlock} request RequestEndBlock message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ABCIApplication; - })(); - - return types; - })(); - - return abci; + 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; })(); - - tendermint.crypto = (function() { - - /** - * Namespace crypto. - * @memberof tendermint - * @namespace - */ - var crypto = {}; - - crypto.merkle = (function() { - - /** - * Namespace merkle. - * @memberof tendermint.crypto - * @namespace - */ - var merkle = {}; - - merkle.ProofOp = (function() { - - /** - * Properties of a ProofOp. - * @memberof tendermint.crypto.merkle - * @interface IProofOp - * @property {string|null} [type] ProofOp type - * @property {Uint8Array|null} [key] ProofOp key - * @property {Uint8Array|null} [data] ProofOp data - */ - - /** - * Constructs a new ProofOp. - * @memberof tendermint.crypto.merkle - * @classdesc Represents a ProofOp. - * @implements IProofOp - * @constructor - * @param {tendermint.crypto.merkle.IProofOp=} [p] Properties to set - */ - 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 type. - * @member {string} type - * @memberof tendermint.crypto.merkle.ProofOp - * @instance - */ - ProofOp.prototype.type = ""; - - /** - * ProofOp key. - * @member {Uint8Array} key - * @memberof tendermint.crypto.merkle.ProofOp - * @instance - */ - ProofOp.prototype.key = $util.newBuffer([]); - - /** - * ProofOp data. - * @member {Uint8Array} data - * @memberof tendermint.crypto.merkle.ProofOp - * @instance - */ - ProofOp.prototype.data = $util.newBuffer([]); - - /** - * Creates a new ProofOp instance using the specified properties. - * @function create - * @memberof tendermint.crypto.merkle.ProofOp - * @static - * @param {tendermint.crypto.merkle.IProofOp=} [properties] Properties to set - * @returns {tendermint.crypto.merkle.ProofOp} ProofOp instance - */ - ProofOp.create = function create(properties) { - return new ProofOp(properties); - }; - - /** - * Encodes the specified ProofOp message. Does not implicitly {@link tendermint.crypto.merkle.ProofOp.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.merkle.ProofOp - * @static - * @param {tendermint.crypto.merkle.IProofOp} m ProofOp message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a ProofOp message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.merkle.ProofOp - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.crypto.merkle.ProofOp} ProofOp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Proof. - * @memberof tendermint.crypto.merkle - * @interface IProof - * @property {Array.|null} [ops] Proof ops - */ - - /** - * Constructs a new Proof. - * @memberof tendermint.crypto.merkle - * @classdesc Represents a Proof. - * @implements IProof - * @constructor - * @param {tendermint.crypto.merkle.IProof=} [p] Properties to set - */ - 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 ops. - * @member {Array.} ops - * @memberof tendermint.crypto.merkle.Proof - * @instance - */ - Proof.prototype.ops = $util.emptyArray; - - /** - * Creates a new Proof instance using the specified properties. - * @function create - * @memberof tendermint.crypto.merkle.Proof - * @static - * @param {tendermint.crypto.merkle.IProof=} [properties] Properties to set - * @returns {tendermint.crypto.merkle.Proof} Proof instance - */ - Proof.create = function create(properties) { - return new Proof(properties); - }; - - /** - * Encodes the specified Proof message. Does not implicitly {@link tendermint.crypto.merkle.Proof.verify|verify} messages. - * @function encode - * @memberof tendermint.crypto.merkle.Proof - * @static - * @param {tendermint.crypto.merkle.IProof} m Proof message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Proof message from the specified reader or buffer. - * @function decode - * @memberof tendermint.crypto.merkle.Proof - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.crypto.merkle.Proof} Proof - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; + 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; })(); - - tendermint.libs = (function() { - - /** - * Namespace libs. - * @memberof tendermint - * @namespace - */ - var libs = {}; - - libs.kv = (function() { - - /** - * Namespace kv. - * @memberof tendermint.libs - * @namespace - */ - var kv = {}; - - kv.Pair = (function() { - - /** - * Properties of a Pair. - * @memberof tendermint.libs.kv - * @interface IPair - * @property {Uint8Array|null} [key] Pair key - * @property {Uint8Array|null} [value] Pair value - */ - - /** - * Constructs a new Pair. - * @memberof tendermint.libs.kv - * @classdesc Represents a Pair. - * @implements IPair - * @constructor - * @param {tendermint.libs.kv.IPair=} [p] Properties to set - */ - 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 key. - * @member {Uint8Array} key - * @memberof tendermint.libs.kv.Pair - * @instance - */ - Pair.prototype.key = $util.newBuffer([]); - - /** - * Pair value. - * @member {Uint8Array} value - * @memberof tendermint.libs.kv.Pair - * @instance - */ - Pair.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Pair instance using the specified properties. - * @function create - * @memberof tendermint.libs.kv.Pair - * @static - * @param {tendermint.libs.kv.IPair=} [properties] Properties to set - * @returns {tendermint.libs.kv.Pair} Pair instance - */ - Pair.create = function create(properties) { - return new Pair(properties); - }; - - /** - * Encodes the specified Pair message. Does not implicitly {@link tendermint.libs.kv.Pair.verify|verify} messages. - * @function encode - * @memberof tendermint.libs.kv.Pair - * @static - * @param {tendermint.libs.kv.IPair} m Pair message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Pair message from the specified reader or buffer. - * @function decode - * @memberof tendermint.libs.kv.Pair - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.libs.kv.Pair} Pair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Pair.decode = function decode(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() { - - /** - * Properties of a KI64Pair. - * @memberof tendermint.libs.kv - * @interface IKI64Pair - * @property {Uint8Array|null} [key] KI64Pair key - * @property {number|Long|null} [value] KI64Pair value - */ - - /** - * Constructs a new KI64Pair. - * @memberof tendermint.libs.kv - * @classdesc Represents a KI64Pair. - * @implements IKI64Pair - * @constructor - * @param {tendermint.libs.kv.IKI64Pair=} [p] Properties to set - */ - 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 key. - * @member {Uint8Array} key - * @memberof tendermint.libs.kv.KI64Pair - * @instance - */ - KI64Pair.prototype.key = $util.newBuffer([]); - - /** - * KI64Pair value. - * @member {number|Long} value - * @memberof tendermint.libs.kv.KI64Pair - * @instance - */ - KI64Pair.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new KI64Pair instance using the specified properties. - * @function create - * @memberof tendermint.libs.kv.KI64Pair - * @static - * @param {tendermint.libs.kv.IKI64Pair=} [properties] Properties to set - * @returns {tendermint.libs.kv.KI64Pair} KI64Pair instance - */ - KI64Pair.create = function create(properties) { - return new KI64Pair(properties); - }; - - /** - * Encodes the specified KI64Pair message. Does not implicitly {@link tendermint.libs.kv.KI64Pair.verify|verify} messages. - * @function encode - * @memberof tendermint.libs.kv.KI64Pair - * @static - * @param {tendermint.libs.kv.IKI64Pair} m KI64Pair message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a KI64Pair message from the specified reader or buffer. - * @function decode - * @memberof tendermint.libs.kv.KI64Pair - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {tendermint.libs.kv.KI64Pair} KI64Pair - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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; + 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; })(); - - return tendermint; -})(); - -$root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [p] Properties to set - */ - 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]]; + 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; } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} m Any message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [p] Properties to set - */ - 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]]; + } + 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; } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} m Timestamp message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [p] Properties to set - */ - 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]]; + } + 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; } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} m Duration message or plain object to encode - * @param {$protobuf.Writer} [w] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} r Reader or buffer to decode from - * @param {number} [l] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - 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 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; })(); - - return protobuf; + ModeInfo.Multi = (function () { + function Multi(p) { + this.modeInfos = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + Multi.prototype.bitarray = null; + Multi.prototype.modeInfos = $util.emptyArray; + Multi.create = function create(properties) { + return new Multi(properties); + }; + Multi.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.bitarray != null && Object.hasOwnProperty.call(m, "bitarray")) + $root.cosmos_sdk.crypto.v1.CompactBitArray.encode(m.bitarray, w.uint32(10).fork()).ldelim(); + if (m.modeInfos != null && m.modeInfos.length) { + for (var i = 0; i < m.modeInfos.length; ++i) + $root.cosmos_sdk.tx.v1.ModeInfo.encode(m.modeInfos[i], w.uint32(18).fork()).ldelim(); + } + return w; + }; + Multi.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos_sdk.tx.v1.ModeInfo.Multi(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + m.bitarray = $root.cosmos_sdk.crypto.v1.CompactBitArray.decode(r, r.uint32()); + break; + case 2: + if (!(m.modeInfos && m.modeInfos.length)) m.modeInfos = []; + m.modeInfos.push($root.cosmos_sdk.tx.v1.ModeInfo.decode(r, r.uint32())); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Multi; + })(); + return ModeInfo; + })(); + v1.Fee = (function () { + function Fee(p) { + this.amount = []; + if (p) + for (var ks = Object.keys(p), i = 0; i < ks.length; ++i) + if (p[ks[i]] != null) this[ks[i]] = p[ks[i]]; + } + Fee.prototype.amount = $util.emptyArray; + Fee.prototype.gasLimit = $util.Long ? $util.Long.fromBits(0, 0, true) : 0; + Fee.create = function create(properties) { + return new Fee(properties); + }; + Fee.encode = function encode(m, w) { + if (!w) w = $Writer.create(); + if (m.amount != null && m.amount.length) { + for (var i = 0; i < m.amount.length; ++i) + $root.cosmos_sdk.v1.Coin.encode(m.amount[i], w.uint32(10).fork()).ldelim(); + } + if (m.gasLimit != null && Object.hasOwnProperty.call(m, "gasLimit")) + w.uint32(16).uint64(m.gasLimit); + return w; + }; + Fee.decode = function decode(r, l) { + if (!(r instanceof $Reader)) r = $Reader.create(r); + var c = l === undefined ? r.len : r.pos + l, + m = new $root.cosmos_sdk.tx.v1.Fee(); + while (r.pos < c) { + var t = r.uint32(); + switch (t >>> 3) { + case 1: + if (!(m.amount && m.amount.length)) m.amount = []; + m.amount.push($root.cosmos_sdk.v1.Coin.decode(r, r.uint32())); + break; + case 2: + m.gasLimit = r.uint64(); + break; + default: + r.skipType(t & 7); + break; + } + } + return m; + }; + return Fee; + })(); + return v1; })(); - - return google; + 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; From 26af8174205637330d4d885fd6abda7891bcda43 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Thu, 18 Jun 2020 14:32:59 +0200 Subject: [PATCH 36/41] Move all codecimpl.tmp.js handling into "define-proto" --- packages/demo-protobuf/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/demo-protobuf/package.json b/packages/demo-protobuf/package.json index e0ebdcb3..b1736fb0 100644 --- a/packages/demo-protobuf/package.json +++ b/packages/demo-protobuf/package.json @@ -34,8 +34,8 @@ "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", - "postdefine-proto": "tsc --removeComments --outFile src/generated/codecimpl.js --allowJs src/generated/codecimpl.tmp.js && rm src/generated/codecimpl.tmp.js && prettier --write \"src/generated/codecimpl.*\"" + "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" From 00efb4ad9ce89c849c522bf52a22555ba3910a1f Mon Sep 17 00:00:00 2001 From: willclarktech Date: Thu, 18 Jun 2020 16:18:13 +0200 Subject: [PATCH 37/41] demo-protobuf: Add more protobuf field types to decorator demo --- packages/demo-protobuf/src/decorator.spec.ts | 41 +++++++++++++++++--- packages/demo-protobuf/src/decorator.ts | 10 ++++- packages/demo-protobuf/types/decorator.d.ts | 5 +++ 3 files changed, 49 insertions(+), 7 deletions(-) diff --git a/packages/demo-protobuf/src/decorator.spec.ts b/packages/demo-protobuf/src/decorator.spec.ts index 776f7f4f..dc82e3d3 100644 --- a/packages/demo-protobuf/src/decorator.spec.ts +++ b/packages/demo-protobuf/src/decorator.spec.ts @@ -13,17 +13,38 @@ describe("decorator demo", () => { @CosmosMessage(myRegistry, typeUrl) // eslint-disable-next-line @typescript-eslint/no-unused-vars class MsgDemo extends Message<{}> { - @CosmosField.String(1) - public readonly example: string = ""; + @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.Repeated(6) + public readonly listDemo?: readonly string[]; } const MsgDemoT = myRegistry.lookupType(typeUrl)!; const TxBody = myRegistry.lookupType("/cosmos.tx.TxBody")!; const Any = myRegistry.lookupType("/google.protobuf.Any")!; - const msgDemo = MsgDemoT.create({ - example: "Some example text", - }); + 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"], + }; + const msgDemo = MsgDemoT.create(msgDemoFields); const msgDemoBytes = MsgDemoT.encode(msgDemo).finish(); const msgDemoWrapped = Any.create({ type_url: typeUrl, @@ -43,6 +64,14 @@ describe("decorator demo", () => { assert(msg.value); const msgDemoDecoded = MsgDemoT.decode(msg.value); - expect(msgDemoDecoded.example).toEqual(msgDemo.example); + 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 + expect(msgDemoDecoded.int64Demo.toNumber()).toEqual(msgDemoFields.int64Demo); + expect(msgDemoDecoded.uint64Demo.toNumber()).toEqual(msgDemoFields.uint64Demo); + + expect(msgDemoDecoded.listDemo).toEqual(msgDemoFields.listDemo); }); }); diff --git a/packages/demo-protobuf/src/decorator.ts b/packages/demo-protobuf/src/decorator.ts index febf37c4..6ef95e61 100644 --- a/packages/demo-protobuf/src/decorator.ts +++ b/packages/demo-protobuf/src/decorator.ts @@ -16,5 +16,13 @@ export function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorato } export const CosmosField = { - String: (id: number) => Field.d(id, "string"), + 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"), + + Repeated: (id: number) => Field.d(id, "string", "repeated"), }; diff --git a/packages/demo-protobuf/types/decorator.d.ts b/packages/demo-protobuf/types/decorator.d.ts index ef014457..e0ffda96 100644 --- a/packages/demo-protobuf/types/decorator.d.ts +++ b/packages/demo-protobuf/types/decorator.d.ts @@ -2,5 +2,10 @@ import { 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; + Repeated: (id: number) => import("protobufjs").FieldDecorator; }; From 94ecbca47434886b8131864b9ea2ee100218aa8d Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 23 Jun 2020 11:03:56 +0200 Subject: [PATCH 38/41] demo-protobuf: Add nested msg field to decorator demo --- packages/demo-protobuf/src/decorator.spec.ts | 18 ++++++++++++++++++ packages/demo-protobuf/src/decorator.ts | 1 + packages/demo-protobuf/types/decorator.d.ts | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/packages/demo-protobuf/src/decorator.spec.ts b/packages/demo-protobuf/src/decorator.spec.ts index dc82e3d3..9787f6c7 100644 --- a/packages/demo-protobuf/src/decorator.spec.ts +++ b/packages/demo-protobuf/src/decorator.spec.ts @@ -7,9 +7,16 @@ 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<{}> { @@ -30,12 +37,21 @@ describe("decorator demo", () => { @CosmosField.Repeated(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", @@ -43,6 +59,7 @@ describe("decorator demo", () => { int64Demo: -123, uint64Demo: 123, listDemo: ["this", "is", "a", "list"], + nestedDemo: msgNestedDemo, }; const msgDemo = MsgDemoT.create(msgDemoFields); const msgDemoBytes = MsgDemoT.encode(msgDemo).finish(); @@ -73,5 +90,6 @@ describe("decorator demo", () => { expect(msgDemoDecoded.uint64Demo.toNumber()).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 index 6ef95e61..dfbf98eb 100644 --- a/packages/demo-protobuf/src/decorator.ts +++ b/packages/demo-protobuf/src/decorator.ts @@ -25,4 +25,5 @@ export const CosmosField = { UInt64: (id: number) => Field.d(id, "uint64"), Repeated: (id: number) => Field.d(id, "string", "repeated"), + Nested: (id: number, ctor: Constructor>) => Field.d(id, ctor), }; diff --git a/packages/demo-protobuf/types/decorator.d.ts b/packages/demo-protobuf/types/decorator.d.ts index e0ffda96..33b44050 100644 --- a/packages/demo-protobuf/types/decorator.d.ts +++ b/packages/demo-protobuf/types/decorator.d.ts @@ -1,4 +1,4 @@ -import { TypeDecorator } from "protobufjs"; +import { Constructor, Message, TypeDecorator } from "protobufjs"; import { Registry } from "./registry"; export declare function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator; export declare const CosmosField: { @@ -8,4 +8,5 @@ export declare const CosmosField: { Int64: (id: number) => import("protobufjs").FieldDecorator; UInt64: (id: number) => import("protobufjs").FieldDecorator; Repeated: (id: number) => import("protobufjs").FieldDecorator; + Nested: (id: number, ctor: Constructor>) => import("protobufjs").FieldDecorator; }; From 4bd773eb10b4e39835bc3f22e24890834e8b79e3 Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 23 Jun 2020 11:15:50 +0200 Subject: [PATCH 39/41] demo-protobuf: Rename field Repeated -> RepeatedString --- packages/demo-protobuf/src/decorator.spec.ts | 2 +- packages/demo-protobuf/src/decorator.ts | 6 +++--- packages/demo-protobuf/types/decorator.d.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/demo-protobuf/src/decorator.spec.ts b/packages/demo-protobuf/src/decorator.spec.ts index 9787f6c7..0cd267d0 100644 --- a/packages/demo-protobuf/src/decorator.spec.ts +++ b/packages/demo-protobuf/src/decorator.spec.ts @@ -35,7 +35,7 @@ describe("decorator demo", () => { @CosmosField.UInt64(5) public readonly uint64Demo?: number; - @CosmosField.Repeated(6) + @CosmosField.RepeatedString(6) public readonly listDemo?: readonly string[]; @CosmosField.Nested(7, MsgNestedDemo) diff --git a/packages/demo-protobuf/src/decorator.ts b/packages/demo-protobuf/src/decorator.ts index dfbf98eb..da09fddf 100644 --- a/packages/demo-protobuf/src/decorator.ts +++ b/packages/demo-protobuf/src/decorator.ts @@ -8,9 +8,9 @@ function getTypeName(typeUrl: string): string { } export function CosmosMessage(registry: Registry, typeUrl: string): TypeDecorator { - return (constructor: Constructor>) => { + return (ctor: Constructor>) => { const typeName = getTypeName(typeUrl); - const generatedType = util.decorateType(constructor, typeName); + const generatedType = util.decorateType(ctor, typeName); registry.register(typeUrl, generatedType); }; } @@ -24,6 +24,6 @@ export const CosmosField = { Int64: (id: number) => Field.d(id, "int64"), UInt64: (id: number) => Field.d(id, "uint64"), - Repeated: (id: number) => Field.d(id, "string", "repeated"), + RepeatedString: (id: number) => Field.d(id, "string", "repeated"), Nested: (id: number, ctor: Constructor>) => Field.d(id, ctor), }; diff --git a/packages/demo-protobuf/types/decorator.d.ts b/packages/demo-protobuf/types/decorator.d.ts index 33b44050..ecc80646 100644 --- a/packages/demo-protobuf/types/decorator.d.ts +++ b/packages/demo-protobuf/types/decorator.d.ts @@ -7,6 +7,6 @@ export declare const CosmosField: { Bytes: (id: number) => import("protobufjs").FieldDecorator; Int64: (id: number) => import("protobufjs").FieldDecorator; UInt64: (id: number) => import("protobufjs").FieldDecorator; - Repeated: (id: number) => import("protobufjs").FieldDecorator; + RepeatedString: (id: number) => import("protobufjs").FieldDecorator; Nested: (id: number, ctor: Constructor>) => import("protobufjs").FieldDecorator; }; From 56b1ffb943b6c06472fe393f4bcce202d2ddeaee Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 23 Jun 2020 12:01:44 +0200 Subject: [PATCH 40/41] demo-protobuf: Rename UInt64 -> Uint64 --- packages/demo-protobuf/src/decorator.spec.ts | 2 +- packages/demo-protobuf/src/decorator.ts | 2 +- packages/demo-protobuf/types/decorator.d.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/demo-protobuf/src/decorator.spec.ts b/packages/demo-protobuf/src/decorator.spec.ts index 0cd267d0..53344027 100644 --- a/packages/demo-protobuf/src/decorator.spec.ts +++ b/packages/demo-protobuf/src/decorator.spec.ts @@ -32,7 +32,7 @@ describe("decorator demo", () => { @CosmosField.Int64(4) public readonly int64Demo?: number; - @CosmosField.UInt64(5) + @CosmosField.Uint64(5) public readonly uint64Demo?: number; @CosmosField.RepeatedString(6) diff --git a/packages/demo-protobuf/src/decorator.ts b/packages/demo-protobuf/src/decorator.ts index da09fddf..11748e41 100644 --- a/packages/demo-protobuf/src/decorator.ts +++ b/packages/demo-protobuf/src/decorator.ts @@ -22,7 +22,7 @@ export const CosmosField = { Bytes: (id: number) => Field.d(id, "bytes"), Int64: (id: number) => Field.d(id, "int64"), - UInt64: (id: number) => Field.d(id, "uint64"), + 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/types/decorator.d.ts b/packages/demo-protobuf/types/decorator.d.ts index ecc80646..dd9dbd94 100644 --- a/packages/demo-protobuf/types/decorator.d.ts +++ b/packages/demo-protobuf/types/decorator.d.ts @@ -6,7 +6,7 @@ export declare const CosmosField: { String: (id: number) => import("protobufjs").FieldDecorator; Bytes: (id: number) => import("protobufjs").FieldDecorator; Int64: (id: number) => import("protobufjs").FieldDecorator; - UInt64: (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; }; From 1ecd2204f44a5f00e064abb220431ba5add8b34d Mon Sep 17 00:00:00 2001 From: willclarktech Date: Tue, 23 Jun 2020 12:02:01 +0200 Subject: [PATCH 41/41] demo-protobuf: Fix decorator test for browser --- packages/demo-protobuf/src/decorator.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/demo-protobuf/src/decorator.spec.ts b/packages/demo-protobuf/src/decorator.spec.ts index 53344027..36f7a1b6 100644 --- a/packages/demo-protobuf/src/decorator.spec.ts +++ b/packages/demo-protobuf/src/decorator.spec.ts @@ -85,9 +85,9 @@ describe("decorator demo", () => { 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 - expect(msgDemoDecoded.int64Demo.toNumber()).toEqual(msgDemoFields.int64Demo); - expect(msgDemoDecoded.uint64Demo.toNumber()).toEqual(msgDemoFields.uint64Demo); + // 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);